Skip to content

Commit

Permalink
Do not negate the dependent true traits helper
Browse files Browse the repository at this point in the history
  • Loading branch information
dalg24 committed Dec 13, 2023
1 parent ed08974 commit 76ea3a3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 13 deletions.
3 changes: 1 addition & 2 deletions core/src/OpenACC/Kokkos_OpenACC_ParallelReduce_MDRange.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ template <class Functor, class Reducer, class Policy,
struct OpenACCParallelReduceMDRangeHelper {
OpenACCParallelReduceMDRangeHelper(Functor const&, Reducer const&,
Policy const&) {
static_assert(!Kokkos::Impl::always_true<Functor>::value,
"not implemented");
static_assert(std::is_void_v<Functor>, "not implemented");
}
};
} // namespace Kokkos::Experimental::Impl
Expand Down
3 changes: 1 addition & 2 deletions core/src/OpenACC/Kokkos_OpenACC_ParallelReduce_Range.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ template <class Functor, class Reducer, class Policy,
bool = std::is_arithmetic_v<typename Reducer::value_type>>
struct OpenACCParallelReduceHelper {
OpenACCParallelReduceHelper(Functor const&, Reducer const&, Policy const&) {
static_assert(!Kokkos::Impl::always_true<Functor>::value,
"not implemented");
static_assert(std::is_void_v<Functor>, "not implemented");
}
};

Expand Down
9 changes: 3 additions & 6 deletions core/src/OpenACC/Kokkos_OpenACC_ParallelReduce_Team.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ template <class Functor, class Reducer, class Policy,
struct OpenACCParallelReduceTeamHelper {
OpenACCParallelReduceTeamHelper(Functor const&, Reducer const&,
Policy const&) {
static_assert(!Kokkos::Impl::always_true<Functor>::value,
"not implemented");
static_assert(std::is_void_v<Functor>, "not implemented");
}
};

Expand Down Expand Up @@ -129,8 +128,7 @@ KOKKOS_INLINE_FUNCTION void parallel_reduce(
const Impl::TeamThreadRangeBoundariesStruct<iType, Impl::OpenACCTeamMember>&
loop_boundaries,
const Lambda& lambda, const JoinType& join, ValueType& init_result) {
static_assert(!Kokkos::Impl::always_true<Lambda>::value,
"custom reduction is not implemented");
static_assert(std::is_void_v<Lambda>, "custom reduction is not implemented");
}

// Hierarchical Parallelism -> Thread vector level implementation
Expand All @@ -140,8 +138,7 @@ KOKKOS_INLINE_FUNCTION void parallel_reduce(
const Impl::ThreadVectorRangeBoundariesStruct<
iType, Impl::OpenACCTeamMember>& loop_boundaries,
const Lambda& lambda, const JoinType& join, ValueType& init_result) {
static_assert(!Kokkos::Impl::always_true<Lambda>::value,
"custom reduction is not implemented");
static_assert(std::is_void_v<Lambda>, "custom reduction is not implemented");
}

} // namespace Kokkos
Expand Down
6 changes: 3 additions & 3 deletions core/src/OpenACC/Kokkos_OpenACC_Team.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class OpenACCTeamMember {
// FIXME_OPENACC: team_broadcast() is not implemented.
template <class ValueType>
KOKKOS_FUNCTION void team_broadcast(ValueType& value, int thread_id) const {
static_assert(!Kokkos::Impl::always_true<ValueType>::value,
static_assert(std::is_void_v<ValueType>,
"Kokkos Error: team_broadcast() is not implemented for the "
"OpenACC backend");
return ValueType();
Expand All @@ -99,7 +99,7 @@ class OpenACCTeamMember {
template <class ValueType, class JoinOp>
KOKKOS_FUNCTION ValueType team_reduce(const ValueType& value,
const JoinOp& op_in) const {
static_assert(!Kokkos::Impl::always_true<ValueType>::value,
static_assert(std::is_void_v<ValueType>,
"Kokkos Error: team_reduce() is not implemented for the "
"OpenACC backend");
return ValueType();
Expand All @@ -110,7 +110,7 @@ class OpenACCTeamMember {
KOKKOS_FUNCTION ArgType team_scan(const ArgType& /*value*/,
ArgType* const /*global_accum*/) const {
static_assert(
!Kokkos::Impl::always_true<ArgType>::value,
std::is_void_v<ArgType>,
"Kokkos Error: team_scan() is not implemented for the OpenACC backend");
return ArgType();
}
Expand Down

0 comments on commit 76ea3a3

Please sign in to comment.