Skip to content

Commit b54f6e2

Browse files
authored
Avoid opening the Kokkos namespace (#2800)
This is a nitpick. Qualify the reduction_identity specialization instead of opening the Kokkos namespace. With that change, one can grep for "namespace Kokkos {" to find all naughty code. Signed-off-by: Damien L-G <dalg24@gmail.com>
1 parent f4dd87a commit b54f6e2

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

common/src/KokkosKernels_Utils.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,16 +1292,14 @@ KOKKOS_INLINE_FUNCTION T *alignPtrTo(InPtr *p) {
12921292
} // namespace KokkosKernels
12931293

12941294
// Define the identity for array_sum_reduce
1295-
namespace Kokkos {
12961295
template <typename scalar_t, int N>
1297-
struct reduction_identity<KokkosKernels::Impl::array_sum_reduce<scalar_t, N>> {
1296+
struct Kokkos::reduction_identity<KokkosKernels::Impl::array_sum_reduce<scalar_t, N>> {
12981297
typedef KokkosKernels::Impl::array_sum_reduce<scalar_t, N> T;
12991298
KOKKOS_FORCEINLINE_FUNCTION static T sum() {
13001299
// default constructor default-initializes each element (this should always
13011300
// be 0)
13021301
return T();
13031302
}
13041303
};
1305-
} // namespace Kokkos
13061304

13071305
#endif

0 commit comments

Comments
 (0)