Skip to content

Commit faf6d03

Browse files
committed
Other tweaks
1 parent 2914c15 commit faf6d03

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Diff for: dlext/include/DLExt.h

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
namespace dlext
1515
{
1616

17+
using namespace hoomd;
18+
1719
// { // Aliases
1820

1921
using DLManagedTensorPtr = DLManagedTensor*;

Diff for: dlext/include/Sampler.h

+5-3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
namespace dlext
1111
{
1212

13+
using TimeStep = unsigned int;
14+
1315
template <typename ExternalUpdater, template <typename> class Wrapper>
1416
class DEFAULT_VISIBILITY Sampler : public HalfStepHook {
1517
public:
@@ -24,7 +26,7 @@ class DEFAULT_VISIBILITY Sampler : public HalfStepHook {
2426
{
2527
_sysview = SystemView(sysdef);
2628
}
27-
void update(unsigned int timestep) override
29+
void update(TimeStep timestep) override
2830
{
2931
forward_data(_update_callback, _location, _mode, timestep);
3032
}
@@ -36,12 +38,12 @@ class DEFAULT_VISIBILITY Sampler : public HalfStepHook {
3638
//!
3739
//! The (non-typed) signature of `callback` is expected to be
3840
//! callback(positions, velocities, rtags, images, forces, n)
39-
//! where `n` ìs an additional `unsigned int` parameter.
41+
//! where `n` ìs an additional `TimeStep` parameter.
4042
//!
4143
//! The data for the particles information is requested at the given `location`
4244
//! and access `mode`. NOTE: Forces are always passed in readwrite mode.
4345
template <typename Callback>
44-
void forward_data(Callback callback, AccessLocation location, AccessMode mode, unsigned int n)
46+
void forward_data(Callback callback, AccessLocation location, AccessMode mode, TimeStep n)
4547
{
4648
auto pos_capsule = Wrapper<PositionsTypes>::wrap(_sysview, location, mode);
4749
auto vel_capsule = Wrapper<VelocitiesMasses>::wrap(_sysview, location, mode);

0 commit comments

Comments
 (0)