diff --git a/src/Particle/ParticleBase.h b/src/Particle/ParticleBase.h index 6680e350c..bc8bce28f 100644 --- a/src/Particle/ParticleBase.h +++ b/src/Particle/ParticleBase.h @@ -227,8 +227,8 @@ namespace ippl { */ unsigned getAttributeNum() const { unsigned total = 0; - forAllAttributes([&](const Attributes& att) { - total += att.size(); + detail::runForAllSpaces([&]() { + total += attributes_m.template get().size(); }); return total; } diff --git a/unit_tests/Particle/ParticleBase.cpp b/unit_tests/Particle/ParticleBase.cpp index a62e2ff81..629d903f1 100644 --- a/unit_tests/Particle/ParticleBase.cpp +++ b/unit_tests/Particle/ParticleBase.cpp @@ -26,7 +26,7 @@ class ParticleBaseTest : public ::testing::Test, public MultirankUtils<1, 2, 3, using playout_type = ippl::detail::ParticleLayout; template - using bunch_type = ippl::ParticleBase>; + using bunch_type = ippl::ParticleBase, Kokkos::DefaultExecutionSpace>; ParticleBaseTest() { setup(this); }