Skip to content

Commit

Permalink
compile time active slice
Browse files Browse the repository at this point in the history
  • Loading branch information
Angelyr committed Sep 5, 2023
1 parent e5d7b77 commit f099fc1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions particle_structs/src/dps/dps.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,7 @@ namespace pumipic {
const auto soa_len = AoSoA_t::vector_length;

kkLidView mask(Kokkos::ViewAllocateWithoutInitializing("mask"), capacity_);
const auto activeSliceIdx = aosoa_->number_of_members-1;
auto mask_slice = Cabana::slice<activeSliceIdx>(*aosoa_);
auto mask_slice = Cabana::slice<DPS_DT::size-1>(*aosoa_);
Kokkos::parallel_for("copy_mask", capacity_,
KOKKOS_LAMBDA(const lid_t ptcl_id) {
mask(ptcl_id) = mask_slice(ptcl_id);
Expand Down

0 comments on commit f099fc1

Please sign in to comment.