Skip to content

Commit

Permalink
check par_reduce for hierarchical patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
acreyes committed Dec 7, 2024
1 parent 6152149 commit 10f3bc2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/kokkos_abstraction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ struct DispatchType {

static constexpr bool is_ParFor =
std::is_same<Tag, dispatch_impl::ParallelForDispatch>::value;
static constexpr bool is_ParRed =
std::is_same<Tag, dispatch_impl::ParallelReduceDispatch>::value;
static constexpr bool is_ParScan =
std::is_same<Tag, dispatch_impl::ParallelScanDispatch>::value;

Expand All @@ -219,7 +221,8 @@ struct DispatchType {
// for now this is guaranteed to be par_for_inner, when par_reduce_inner is
// supported need to check
return PT::simd;
} else if constexpr (IsMDRange) {
} else if constexpr (IsMDRange || is_ParRed) {
// par_reduce does not currently work with either team-based patterns
return PT::md;
} else if constexpr (std::is_same_v<Pattern, OuterLoopPatternTeams>) {
return PT::outer;
Expand Down

0 comments on commit 10f3bc2

Please sign in to comment.