Skip to content

Commit

Permalink
Rename two of the definitions of parallel_add back to parallel_sum
Browse files Browse the repository at this point in the history
  • Loading branch information
gojakuch committed Apr 8, 2024
1 parent 0814415 commit e48a790
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions unittests/Kokkos/parallel_add.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ struct ViewSum<Viewtype, Layout, 1, iType> {
update += v(i0);
},
sum );

result += sum;
}
};
Expand Down Expand Up @@ -65,7 +65,7 @@ struct ViewSum<Viewtype, Layout, 2, iType> {
update += v(i0, i1);
},
sum );

result += sum;
}
};
Expand Down Expand Up @@ -99,7 +99,7 @@ struct ViewSum<Viewtype, Layout, 3, iType> {
update += v(i0, i1, i2);
},
sum );

result += sum;
}
};
Expand Down Expand Up @@ -241,9 +241,9 @@ struct ViewAdd<Viewtype, Layout, 3, iType> {


template <class DT, class... DP>
void parallel_add(typename Kokkos::ViewTraits<DT, DP...>::value_type &sum, const Kokkos::View<DT, DP...> A) {
void parallel_sum(typename Kokkos::ViewTraits<DT, DP...>::value_type &sum, const Kokkos::View<DT, DP...> A) {
using ViewtypeA = Kokkos::View<DT, DP...>;
Kokkos::fence("parallel_add: pre sum fence");
Kokkos::fence("parallel_sum: pre sum fence");
if (A.span_is_contiguous()) {

using ViewTypeFlat = Kokkos::View<
Expand All @@ -260,13 +260,13 @@ void parallel_add(typename Kokkos::ViewTraits<DT, DP...>::value_type &sum, const
else {
ViewSum<ViewtypeA, typename ViewtypeA::array_layout, ViewtypeA::rank, int>::template execute<typename ViewtypeA::execution_space>(sum, A);
}
Kokkos::fence("parallel_add: post sum fence");
Kokkos::fence("parallel_sum: post sum fence");
}

template <class ExecSpace, class DT, class... DP>
void parallel_add(const ExecSpace& space, typename Kokkos::ViewTraits<DT, DP...>::value_type &sum, const Kokkos::View<DT, DP...> A) {
void parallel_sum(const ExecSpace& space, typename Kokkos::ViewTraits<DT, DP...>::value_type &sum, const Kokkos::View<DT, DP...> A) {
using ViewtypeA = Kokkos::View<DT, DP...>;
space.fence("parallel_add: pre sum fence");
space.fence("parallel_sum: pre sum fence");
if (A.span_is_contiguous()) {

using ViewTypeFlat = Kokkos::View<
Expand All @@ -283,7 +283,7 @@ void parallel_add(const ExecSpace& space, typename Kokkos::ViewTraits<DT, DP...>
else {
ViewSum<ViewtypeA, typename ViewtypeA::array_layout, ViewtypeA::rank, int>::template execute<ExecSpace>(sum, A, space);
}
space.fence("parallel_add: post sum fence");
space.fence("parallel_sum: post sum fence");
}

template <class DT, class... DP>
Expand Down

0 comments on commit e48a790

Please sign in to comment.