Skip to content

Commit

Permalink
Implement occupancy for self-collision
Browse files Browse the repository at this point in the history
  • Loading branch information
aprokop committed Feb 1, 2024
1 parent 9253614 commit e981e11
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions src/details/ArborX_DetailsHalfTraversal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,23 @@ struct HalfTraversal
}
else
{
Kokkos::parallel_for(
"ArborX::Experimental::HalfTraversal",
Kokkos::RangePolicy<ExecutionSpace>(space, 0, _bvh.size()), *this);
#if defined(KOKKOS_ENABLE_CUDA)
// While DesiredOccupancy option is only implemented for Cuda and is
// no-op for other backends, we don't want a surprise in the future once
// it's implemented for HIP. It is also unclear at this point what HIP
// value is going to be.
if constexpr (std::is_same_v<ExecutionSpace, Kokkos::Cuda>)
Kokkos::parallel_for(
"ArborX::Experimental::HalfTraversal",
Kokkos::Experimental::prefer(
Kokkos::RangePolicy<ExecutionSpace>(space, 0, _bvh.size()),
Kokkos::Experimental::DesiredOccupancy{75}),
*this);
else
#endif
Kokkos::parallel_for(
"ArborX::Experimental::HalfTraversal",
Kokkos::RangePolicy<ExecutionSpace>(space, 0, _bvh.size()), *this);
}
}

Expand Down

0 comments on commit e981e11

Please sign in to comment.