Skip to content

Commit

Permalink
ROTMG: applying clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
lucbv committed Oct 7, 2022
1 parent 9795b50 commit 16195c1
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 80 deletions.
2 changes: 1 addition & 1 deletion blas/tpls/KokkosBlas1_rotmg_tpl_spec_avail.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ namespace Impl {
#ifdef KOKKOSKERNELS_ENABLE_TPL_BLAS
#define KOKKOSBLAS1_ROTMG_TPL_SPEC_AVAIL_BLAS(SCALAR, LAYOUT, EXEC_SPACE, \
MEM_SPACE) \
template <> \
template <> \
struct rotmg_tpl_spec_avail< \
EXEC_SPACE, \
Kokkos::View<SCALAR, LAYOUT, Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Expand Down
130 changes: 62 additions & 68 deletions blas/tpls/KokkosBlas1_rotmg_tpl_spec_decl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,26 +151,25 @@ namespace Impl {
#define KOKKOSBLAS1_DROTMG_TPL_SPEC_DECL_CUBLAS(LAYOUT, EXEC_SPACE, MEM_SPACE, \
ETI_SPEC_AVAIL) \
template <> \
struct Rotmg<EXEC_SPACE, \
Kokkos::View<double, LAYOUT, \
Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>, \
Kokkos::View<double const, LAYOUT, \
Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>, \
Kokkos::View<double[5], LAYOUT, \
Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>, \
true, ETI_SPEC_AVAIL> { \
using DXView = Kokkos::View<double, LAYOUT, \
Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>; \
using YView = Kokkos::View<double const, LAYOUT, \
Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>; \
using PView = Kokkos::View<double[5], LAYOUT, \
Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>; \
struct Rotmg< \
EXEC_SPACE, \
Kokkos::View<double, LAYOUT, Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>, \
Kokkos::View<double const, LAYOUT, \
Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>, \
Kokkos::View<double[5], LAYOUT, Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>, \
true, ETI_SPEC_AVAIL> { \
using DXView = \
Kokkos::View<double, LAYOUT, Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>; \
using YView = Kokkos::View<double const, LAYOUT, \
Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>; \
using PView = \
Kokkos::View<double[5], LAYOUT, Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>; \
\
static void rotmg(EXEC_SPACE const& space, DXView const& d1, \
DXView const& d2, DXView const& x1, YView const& y1, \
Expand Down Expand Up @@ -201,24 +200,22 @@ KOKKOSBLAS1_DROTMG_TPL_SPEC_DECL_CUBLAS(Kokkos::LayoutRight, Kokkos::Cuda,
template <> \
struct Rotmg< \
EXEC_SPACE, \
Kokkos::View<float, LAYOUT, Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::View<float, LAYOUT, Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>, \
Kokkos::View<float const, LAYOUT, \
Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::View<float const, LAYOUT, Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>, \
Kokkos::View<float[5], LAYOUT, \
Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::View<float[5], LAYOUT, Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>, \
true, ETI_SPEC_AVAIL> { \
using DXView = Kokkos::View<float, LAYOUT, \
Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>; \
using YView = Kokkos::View<float const, LAYOUT, \
Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>; \
using PView = Kokkos::View<float[5], LAYOUT, \
Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>; \
using DXView = \
Kokkos::View<float, LAYOUT, Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>; \
using YView = Kokkos::View<float const, LAYOUT, \
Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>; \
using PView = \
Kokkos::View<float[5], LAYOUT, Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>; \
\
static void rotmg(EXEC_SPACE const& space, DXView const& d1, \
DXView const& d2, DXView const& x1, YView const& y1, \
Expand Down Expand Up @@ -260,26 +257,25 @@ namespace Impl {
#define KOKKOSBLAS1_DROTMG_TPL_SPEC_DECL_ROCBLAS(LAYOUT, EXEC_SPACE, \
MEM_SPACE, ETI_SPEC_AVAIL) \
template <> \
struct Rotmg<EXEC_SPACE, \
Kokkos::View<double, LAYOUT, \
Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>, \
Kokkos::View<double const, LAYOUT, \
Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>, \
Kokkos::View<double[5], LAYOUT, \
Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>, \
true, ETI_SPEC_AVAIL> { \
using DXView = Kokkos::View<double, LAYOUT, \
Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>; \
using YView = Kokkos::View<double const, LAYOUT, \
Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>; \
using PView = Kokkos::View<double[5], LAYOUT, \
Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>; \
struct Rotmg< \
EXEC_SPACE, \
Kokkos::View<double, LAYOUT, Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>, \
Kokkos::View<double const, LAYOUT, \
Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>, \
Kokkos::View<double[5], LAYOUT, Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>, \
true, ETI_SPEC_AVAIL> { \
using DXView = \
Kokkos::View<double, LAYOUT, Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>; \
using YView = Kokkos::View<double const, LAYOUT, \
Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>; \
using PView = \
Kokkos::View<double[5], LAYOUT, Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>; \
\
static void rotmg(EXEC_SPACE const& space, DXView const& d1, \
DXView const& d2, DXView const& x1, YView const& y1, \
Expand Down Expand Up @@ -309,24 +305,22 @@ KOKKOSBLAS1_DROTMG_TPL_SPEC_DECL_ROCBLAS(Kokkos::LayoutRight, Kokkos::HIP,
template <> \
struct Rotmg< \
EXEC_SPACE, \
Kokkos::View<float, LAYOUT, Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::View<float, LAYOUT, Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>, \
Kokkos::View<float const, LAYOUT, \
Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::View<float const, LAYOUT, Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>, \
Kokkos::View<float[5], LAYOUT, \
Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::View<float[5], LAYOUT, Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>, \
true, ETI_SPEC_AVAIL> { \
using DXView = Kokkos::View<float, LAYOUT, \
Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>; \
using YView = Kokkos::View<float const, LAYOUT, \
Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>; \
using PView = Kokkos::View<float[5], LAYOUT, \
Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>; \
using DXView = \
Kokkos::View<float, LAYOUT, Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>; \
using YView = Kokkos::View<float const, LAYOUT, \
Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>; \
using PView = \
Kokkos::View<float[5], LAYOUT, Kokkos::Device<EXEC_SPACE, MEM_SPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>; \
\
static void rotmg(EXEC_SPACE const& space, DXView const& d1, \
DXView const& d2, DXView const& x1, YView const& y1, \
Expand Down
22 changes: 11 additions & 11 deletions blas/unit_test/Test_Blas1_rotmg.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,14 +202,14 @@ void set_rotmg_input_ref_vals(const int test_case, View0& d1, View0& d2,

template <class Scalar, class ExecutionSpace>
int test_rotmg() {
Kokkos::View<Scalar,
Kokkos::Device<ExecutionSpace, typename ExecutionSpace::memory_space>>
Kokkos::View<Scalar, Kokkos::Device<ExecutionSpace,
typename ExecutionSpace::memory_space>>
d1("d1"), d2("d2"), x1("x1"), y1("y1");
Kokkos::View<Scalar[5],
Kokkos::Device<ExecutionSpace, typename ExecutionSpace::memory_space>>
Kokkos::View<Scalar[5], Kokkos::Device<ExecutionSpace,
typename ExecutionSpace::memory_space>>
param("param");
Kokkos::View<Scalar[9], Kokkos::DefaultHostExecutionSpace>
ref_vals("reference values");
Kokkos::View<Scalar[9], Kokkos::DefaultHostExecutionSpace> ref_vals(
"reference values");

constexpr int num_test_cases = 9;
for (int test_case = 0; test_case < num_test_cases; ++test_case) {
Expand All @@ -220,12 +220,12 @@ int test_rotmg() {
return 1;
}

#define KOKKOSKERNELS_EXECUTE_TEST(SCALAR, ORDINAL, OFFSET, DEVICE) \
#define KOKKOSKERNELS_EXECUTE_TEST(SCALAR, ORDINAL, OFFSET, DEVICE) \
TEST_F(TestCategory, rotmg##_##SCALAR##_##ORDINAL##_##OFFSET##_##DEVICE) { \
Kokkos::Profiling::pushRegion("KokkosBlas::Test::rotg"); \
test_rotmg<SCALAR, DEVICE>(); \
Kokkos::Profiling::popRegion(); \
}
Kokkos::Profiling::pushRegion("KokkosBlas::Test::rotg"); \
test_rotmg<SCALAR, DEVICE>(); \
Kokkos::Profiling::popRegion(); \
}

#define NO_TEST_COMPLEX

Expand Down

0 comments on commit 16195c1

Please sign in to comment.