Skip to content

Commit 593bc99

Browse files
committed
GPU Accelerated Simulation update
1 parent 34f99b1 commit 593bc99

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

simulators/1_mass_spring/src/MassSpringEnergy.cu

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
using namespace muda;
88

9+
// ANCHOR: definition
910
template <typename T, int dim>
1011
struct MassSpringEnergy<T, dim>::Impl
1112
{
@@ -16,6 +17,8 @@ struct MassSpringEnergy<T, dim>::Impl
1617
DeviceBuffer<T> device_grad;
1718
DeviceTripletMatrix<T, 1> device_hess;
1819
};
20+
// ANCHOR_END: definition
21+
1922
template <typename T, int dim>
2023
MassSpringEnergy<T, dim>::MassSpringEnergy() = default;
2124

simulators/1_mass_spring/src/uti.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ DeviceBuffer<T> add_vector(const DeviceBuffer<T> &a, const DeviceBuffer<T> &b, c
1818
.wait();
1919
return c_device;
2020
}
21-
// ANCHOR: add_vector
21+
// ANCHOR_END: add_vector
2222

2323
template DeviceBuffer<float> add_vector<float>(const DeviceBuffer<float> &a, const DeviceBuffer<float> &b, const float &factor1, const float &factor2);
2424
template DeviceBuffer<double> add_vector<double>(const DeviceBuffer<double> &a, const DeviceBuffer<double> &b, const double &factor1, const double &factor2);

0 commit comments

Comments
 (0)