Skip to content

Commit ace369b

Browse files
authored
Merge pull request #809 from aprokop/change_particle_list_to_kokkos_function
Allow calling size and aosoa from ParticleList on device
2 parents 589068b + 3eb3a47 commit ace369b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/Cabana_ParticleList.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,14 +213,14 @@ class ParticleList
213213
}
214214

215215
//! Get the number of particles in the list.
216-
std::size_t size() const { return _aosoa.size(); }
216+
KOKKOS_INLINE_FUNCTION std::size_t size() const { return _aosoa.size(); }
217217
//! Update the number of particles in the list.
218218
void resize( const std::size_t n ) { _aosoa.resize( n ); }
219219

220220
//! Get the AoSoA.
221221
aosoa_type& aosoa() { return _aosoa; }
222222
//! Get the AoSoA (const).
223-
const aosoa_type& aosoa() const { return _aosoa; }
223+
KOKKOS_INLINE_FUNCTION const aosoa_type& aosoa() const { return _aosoa; }
224224

225225
//! Get a single particle.
226226
template <class IndexType>

0 commit comments

Comments
 (0)