From 10f3bc2ba6979ff54adc2fb3515d64cae51fc2ea Mon Sep 17 00:00:00 2001 From: adam reyes Date: Fri, 6 Dec 2024 17:31:08 -0800 Subject: [PATCH] check par_reduce for hierarchical patterns --- src/kokkos_abstraction.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/kokkos_abstraction.hpp b/src/kokkos_abstraction.hpp index 3ad0cf15a820..ecb4ff1b6a74 100644 --- a/src/kokkos_abstraction.hpp +++ b/src/kokkos_abstraction.hpp @@ -195,6 +195,8 @@ struct DispatchType { static constexpr bool is_ParFor = std::is_same::value; + static constexpr bool is_ParRed = + std::is_same::value; static constexpr bool is_ParScan = std::is_same::value; @@ -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) { return PT::outer;