From 894293e2d5f53636c67d7ee5050f1153862e20c9 Mon Sep 17 00:00:00 2001 From: Luc Berger-Vergiat Date: Tue, 21 Nov 2023 16:45:12 -0700 Subject: [PATCH] Applying clang-format --- blas/tpls/KokkosBlas1_nrm1_tpl_spec_decl.hpp | 64 +++++++++++--------- 1 file changed, 34 insertions(+), 30 deletions(-) diff --git a/blas/tpls/KokkosBlas1_nrm1_tpl_spec_decl.hpp b/blas/tpls/KokkosBlas1_nrm1_tpl_spec_decl.hpp index 927bc5de7a..a789e125e5 100644 --- a/blas/tpls/KokkosBlas1_nrm1_tpl_spec_decl.hpp +++ b/blas/tpls/KokkosBlas1_nrm1_tpl_spec_decl.hpp @@ -167,30 +167,31 @@ void cublasAsumWrapper(const ExecutionSpace& space, RViewType& R, KOKKOS_CUBLAS_SAFE_CALL_IMPL(cublasSetStream(s.handle, NULL)); } -#define KOKKOSBLAS1_NRM1_TPL_SPEC_DECL_CUBLAS(SCALAR, LAYOUT, MEMSPACE) \ +#define KOKKOSBLAS1_NRM1_TPL_SPEC_DECL_CUBLAS(SCALAR, LAYOUT, MEMSPACE) \ template <> \ struct Nrm1< \ - Kokkos::Cuda, \ + Kokkos::Cuda, \ Kokkos::View::mag_type, LAYOUT, \ Kokkos::HostSpace, \ Kokkos::MemoryTraits>, \ - Kokkos::View, \ + Kokkos::View, \ Kokkos::MemoryTraits>, \ 1, true, \ nrm1_eti_spec_avail< \ - Kokkos::Cuda, \ + Kokkos::Cuda, \ Kokkos::View::mag_type, LAYOUT, \ Kokkos::HostSpace, \ Kokkos::MemoryTraits>, \ Kokkos::View, \ + Kokkos::Device, \ Kokkos::MemoryTraits>>::value> { \ - using execution_space = Kokkos::Cuda; \ + using execution_space = Kokkos::Cuda; \ using RV = Kokkos::View::mag_type, \ LAYOUT, Kokkos::HostSpace, \ Kokkos::MemoryTraits>; \ using XV = Kokkos::View, \ + Kokkos::Device, \ Kokkos::MemoryTraits>; \ using size_type = typename XV::size_type; \ \ @@ -202,8 +203,8 @@ void cublasAsumWrapper(const ExecutionSpace& space, RViewType& R, cublasAsumWrapper(space, R, X); \ } else { \ Nrm1::value>::nrm1(space, R, \ - X); \ + nrm1_eti_spec_avail::value>::nrm1(space, R, \ + X); \ } \ Kokkos::Profiling::popRegion(); \ } \ @@ -278,42 +279,43 @@ void rocblasAsumWrapper(const ExecutionSpace& space, RViewType& R, KOKKOS_ROCBLAS_SAFE_CALL_IMPL(rocblas_set_stream(s.handle, NULL)); } -#define KOKKOSBLAS1_NRM1_TPL_SPEC_DECL_ROCBLAS(SCALAR, LAYOUT, MEMSPACE) \ +#define KOKKOSBLAS1_NRM1_TPL_SPEC_DECL_ROCBLAS(SCALAR, LAYOUT, MEMSPACE) \ template <> \ struct Nrm1< \ - Kokkos::HIP, \ + Kokkos::HIP, \ Kokkos::View::mag_type, LAYOUT, \ Kokkos::HostSpace, \ Kokkos::MemoryTraits>, \ - Kokkos::View, \ + Kokkos::View, \ Kokkos::MemoryTraits>, \ 1, true, \ nrm1_eti_spec_avail< \ - Kokkos::HIP, \ + Kokkos::HIP, \ Kokkos::View::mag_type, LAYOUT, \ Kokkos::HostSpace, \ Kokkos::MemoryTraits>, \ Kokkos::View, \ + Kokkos::Device, \ Kokkos::MemoryTraits>>::value> { \ using RV = Kokkos::View::mag_type, \ LAYOUT, Kokkos::HostSpace, \ Kokkos::MemoryTraits>; \ using XV = Kokkos::View, \ + Kokkos::Device, \ Kokkos::MemoryTraits>; \ using size_type = typename XV::size_type; \ \ - static void nrm1(const Kokkos::HIP& space, RV& R, const XV& X) { \ + static void nrm1(const Kokkos::HIP& space, RV& R, const XV& X) { \ Kokkos::Profiling::pushRegion("KokkosBlas::nrm1[TPL_ROCBLAS," #SCALAR \ "]"); \ const size_type numElems = X.extent(0); \ if (numElems < static_cast(INT_MAX)) { \ rocblasAsumWrapper(space, R, X); \ } else { \ - Nrm1::value>::nrm1(space, R, \ - X); \ + Nrm1::value>::nrm1(space, R, \ + X); \ } \ Kokkos::Profiling::popRegion(); \ } \ @@ -387,31 +389,33 @@ void onemklAsumWrapper(const ExecutionSpace& space, RViewType& R, Kokkos::deep_copy(space, R, res); } -#define KOKKOSBLAS1_NRM1_ONEMKL(SCALAR, LAYOUT, MEMSPACE) \ +#define KOKKOSBLAS1_NRM1_ONEMKL(SCALAR, LAYOUT, MEMSPACE) \ template <> \ struct Nrm1< \ - Kokkos::Experimental::SYCL, \ + Kokkos::Experimental::SYCL, \ Kokkos::View::mag_type, LAYOUT, \ Kokkos::HostSpace, \ Kokkos::MemoryTraits>, \ - Kokkos::View, \ + Kokkos::View, \ Kokkos::MemoryTraits>, \ 1, true, \ nrm1_eti_spec_avail< \ - Kokkos::Experimental::SYCL, \ + Kokkos::Experimental::SYCL, \ Kokkos::View::mag_type, LAYOUT, \ Kokkos::HostSpace, \ Kokkos::MemoryTraits>, \ Kokkos::View, \ + Kokkos::Device, \ Kokkos::MemoryTraits>>::value> { \ - using execution_space = Kokkos::Experimental::SYCL; \ + using execution_space = Kokkos::Experimental::SYCL; \ using RV = Kokkos::View::mag_type, \ LAYOUT, Kokkos::HostSpace, \ Kokkos::MemoryTraits>; \ - using XV = Kokkos::View, \ - Kokkos::MemoryTraits>; \ + using XV = \ + Kokkos::View, \ + Kokkos::MemoryTraits>; \ using size_type = typename XV::size_type; \ \ static void nrm1(const execution_space& space, RV& R, const XV& X) { \ @@ -422,8 +426,8 @@ void onemklAsumWrapper(const ExecutionSpace& space, RViewType& R, onemklAsumWrapper(space, R, X); \ } else { \ Nrm1::value>::nrm1(space, R, \ - X); \ + nrm1_eti_spec_avail::value>::nrm1(space, R, X); \ } \ Kokkos::Profiling::popRegion(); \ } \