Skip to content

Commit

Permalink
fixup: halo capture for cuda
Browse files Browse the repository at this point in the history
  • Loading branch information
streeve committed Oct 16, 2023
1 parent e68f0d6 commit 14005e1
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/CabanaPD_Comm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,7 @@ struct HaloIds
// balancing).
neighborBounds( local_grid );

build(
positions,
KOKKOS_LAMBDA( const int, const double[3] ) { return true; } );
build( positions );
}

// Find the bounds of each neighbor rank and store for determining which
Expand Down Expand Up @@ -198,6 +196,16 @@ struct HaloIds
Kokkos::fence();
}

template <class PositionSliceType>
void build( const PositionSliceType& positions )
{
auto empty_functor = KOKKOS_LAMBDA( const int, const double[3] )
{
return true;
};
build( positions, empty_functor );
}

template <class PositionSliceType>
void rebuild( const PositionSliceType& positions )
{
Expand All @@ -216,9 +224,7 @@ struct HaloIds
if ( dest_count > dest_size )
{
Kokkos::deep_copy( _send_count, 0 );
build(
positions,
KOKKOS_LAMBDA( const int, const double[3] ) { return true; } );
build( positions );
}
}
};
Expand Down

0 comments on commit 14005e1

Please sign in to comment.