Skip to content

Commit

Permalink
Add SFINAE to fix the selection of the algorithm (#514)
Browse files Browse the repository at this point in the history
  • Loading branch information
tpadioleau authored Jun 28, 2024
1 parent db46b8b commit 729cd84
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/ddc/parallel_for_each.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ void parallel_for_each(
* @param[in] f a functor taking an index as parameter
*/
template <class ExecSpace, class... DDims, class Functor>
void parallel_for_each(
std::enable_if_t<Kokkos::is_execution_space_v<ExecSpace>> parallel_for_each(
ExecSpace const& execution_space,
DiscreteDomain<DDims...> const& domain,
Functor&& f) noexcept
Expand Down
2 changes: 1 addition & 1 deletion include/ddc/parallel_transform_reduce.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ T parallel_transform_reduce(
* range. The return type must be acceptable as input to reduce
*/
template <class ExecSpace, class... DDims, class T, class BinaryReductionOp, class UnaryTransformOp>
T parallel_transform_reduce(
std::enable_if_t<Kokkos::is_execution_space_v<ExecSpace>, T> parallel_transform_reduce(
ExecSpace const& execution_space,
DiscreteDomain<DDims...> const& domain,
T neutral,
Expand Down

0 comments on commit 729cd84

Please sign in to comment.