Skip to content

Commit

Permalink
Added missing enable_ifs to hpx team parallel_reduce
Browse files Browse the repository at this point in the history
  • Loading branch information
ldh4 committed Jan 12, 2023
1 parent b475233 commit e5e8742
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions core/src/Kokkos_HPX.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2177,7 +2177,8 @@ KOKKOS_INLINE_FUNCTION void parallel_for(
* The range i=0..N-1 is mapped to all threads of the the calling thread team
* and a summation of val is performed and put into result.
*/
template <typename iType, class Lambda, typename ValueType>
template <typename iType, class Lambda, typename ValueType,
typename = std::enable_if_t<!Kokkos::is_reducer<ValueType>::value>>
KOKKOS_INLINE_FUNCTION void parallel_reduce(
const Impl::TeamThreadRangeBoundariesStruct<iType, Impl::HPXTeamMember>
&loop_boundaries,
Expand Down Expand Up @@ -2214,7 +2215,8 @@ KOKKOS_INLINE_FUNCTION void parallel_for(
* The range i=0..N-1 is mapped to all vector lanes of the the calling thread
* and a summation of val is performed and put into result.
*/
template <typename iType, class Lambda, typename ValueType>
template <typename iType, class Lambda, typename ValueType,
typename = std::enable_if_t<!Kokkos::is_reducer<ValueType>::value>>
KOKKOS_INLINE_FUNCTION void parallel_reduce(
const Impl::ThreadVectorRangeBoundariesStruct<iType, Impl::HPXTeamMember>
&loop_boundaries,
Expand All @@ -2229,7 +2231,8 @@ KOKKOS_INLINE_FUNCTION void parallel_reduce(
}
}

template <typename iType, class Lambda, typename ReducerType>
template <typename iType, class Lambda, typename ReducerType,
typename = std::enable_if_t<Kokkos::is_reducer<ReducerType>::value>>
KOKKOS_INLINE_FUNCTION void parallel_reduce(
const Impl::TeamThreadRangeBoundariesStruct<iType, Impl::HPXTeamMember>
&loop_boundaries,
Expand All @@ -2241,7 +2244,8 @@ KOKKOS_INLINE_FUNCTION void parallel_reduce(
}
}

template <typename iType, class Lambda, typename ReducerType>
template <typename iType, class Lambda, typename ReducerType,
typename = std::enable_if_t<Kokkos::is_reducer<ReducerType>::value>>
KOKKOS_INLINE_FUNCTION void parallel_reduce(
const Impl::ThreadVectorRangeBoundariesStruct<iType, Impl::HPXTeamMember>
&loop_boundaries,
Expand Down

0 comments on commit e5e8742

Please sign in to comment.