Skip to content

Commit

Permalink
Applying clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
lucbv committed Oct 17, 2023
1 parent ef296cc commit 5f30552
Show file tree
Hide file tree
Showing 16 changed files with 268 additions and 314 deletions.
3 changes: 1 addition & 2 deletions batched/dense/impl/KokkosBatched_HostLevel_Gemm_Impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ constexpr KOKKOS_INLINE_FUNCTION int kk_gemm_dbl_buf_tile_k() {
// buffering algorithm by a factor of 2.
#if defined(KOKKOS_ENABLE_HIP) && defined(KOKKOS_ARCH_VEGA908)
template <>
constexpr KOKKOS_INLINE_FUNCTION int
kk_gemm_dbl_buf_tile_k<Kokkos::HIP>() {
constexpr KOKKOS_INLINE_FUNCTION int kk_gemm_dbl_buf_tile_k<Kokkos::HIP>() {
return 16;
}
#endif
Expand Down
12 changes: 4 additions & 8 deletions batched/dense/src/KokkosBatched_Vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,11 @@ struct DefaultVectorLength<double, Kokkos::HIPSpace> {
enum : int { value = 16 };
};
template <>
struct DefaultVectorLength<Kokkos::complex<float>,
Kokkos::HIPSpace> {
struct DefaultVectorLength<Kokkos::complex<float>, Kokkos::HIPSpace> {
enum : int { value = 16 };
};
template <>
struct DefaultVectorLength<Kokkos::complex<double>,
Kokkos::HIPSpace> {
struct DefaultVectorLength<Kokkos::complex<double>, Kokkos::HIPSpace> {
enum : int { value = 16 };
};
#endif
Expand Down Expand Up @@ -197,13 +195,11 @@ struct DefaultInternalVectorLength<double, Kokkos::HIPSpace> {
enum : int { value = 4 };
};
template <>
struct DefaultInternalVectorLength<Kokkos::complex<float>,
Kokkos::HIPSpace> {
struct DefaultInternalVectorLength<Kokkos::complex<float>, Kokkos::HIPSpace> {
enum : int { value = 4 };
};
template <>
struct DefaultInternalVectorLength<Kokkos::complex<double>,
Kokkos::HIPSpace> {
struct DefaultInternalVectorLength<Kokkos::complex<double>, Kokkos::HIPSpace> {
enum : int { value = 2 };
};
#endif
Expand Down
3 changes: 1 addition & 2 deletions blas/impl/KokkosBlas3_gemm_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ struct impl_gemm_choose_copy_layout<Kokkos::Cuda, LayoutA, LayoutAScratch> {

#ifdef KOKKOS_ENABLE_HIP
template <class LayoutA, class LayoutAScratch>
struct impl_gemm_choose_copy_layout<Kokkos::HIP, LayoutA,
LayoutAScratch> {
struct impl_gemm_choose_copy_layout<Kokkos::HIP, LayoutA, LayoutAScratch> {
using type = LayoutA;
};
#endif
Expand Down
10 changes: 5 additions & 5 deletions blas/src/KokkosBlas2_gemv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,11 @@ void gemv(const ExecutionSpace& space, const char trans[],
#endif
#ifdef KOKKOSKERNELS_ENABLE_TPL_ROCBLAS
useFallback =
useFallback || (tolower(*trans) == 'c' &&
std::is_same<typename AViewType::array_layout,
Kokkos::LayoutRight>::value &&
std::is_same<typename AViewType::memory_space,
Kokkos::HIPSpace>::value);
useFallback ||
(tolower(*trans) == 'c' &&
std::is_same<typename AViewType::array_layout,
Kokkos::LayoutRight>::value &&
std::is_same<typename AViewType::memory_space, Kokkos::HIPSpace>::value);
#endif
#ifdef KOKKOSKERNELS_ENABLE_TPL_BLAS
useFallback = useFallback || (tolower(*trans) == 'c' &&
Expand Down
31 changes: 14 additions & 17 deletions blas/tpls/KokkosBlas2_gemv_tpl_spec_avail.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,23 +127,20 @@ KOKKOSBLAS2_GEMV_TPL_SPEC_AVAIL_CUBLAS(Kokkos::complex<float>,
// rocBLAS
#ifdef KOKKOSKERNELS_ENABLE_TPL_ROCBLAS

#define KOKKOSBLAS2_GEMV_TPL_SPEC_AVAIL_ROCBLAS(SCALAR, LAYOUT) \
template <class ExecSpace> \
struct gemv_tpl_spec_avail< \
ExecSpace, \
Kokkos::View<const SCALAR**, LAYOUT, \
Kokkos::Device<Kokkos::HIP, \
Kokkos::HIPSpace>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged> >, \
Kokkos::View<const SCALAR*, LAYOUT, \
Kokkos::Device<Kokkos::HIP, \
Kokkos::HIPSpace>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged> >, \
Kokkos::View<SCALAR*, LAYOUT, \
Kokkos::Device<Kokkos::HIP, \
Kokkos::HIPSpace>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged> > > { \
enum : bool { value = true }; \
#define KOKKOSBLAS2_GEMV_TPL_SPEC_AVAIL_ROCBLAS(SCALAR, LAYOUT) \
template <class ExecSpace> \
struct gemv_tpl_spec_avail< \
ExecSpace, \
Kokkos::View<const SCALAR**, LAYOUT, \
Kokkos::Device<Kokkos::HIP, Kokkos::HIPSpace>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged> >, \
Kokkos::View<const SCALAR*, LAYOUT, \
Kokkos::Device<Kokkos::HIP, Kokkos::HIPSpace>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged> >, \
Kokkos::View<SCALAR*, LAYOUT, \
Kokkos::Device<Kokkos::HIP, Kokkos::HIPSpace>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged> > > { \
enum : bool { value = true }; \
};

KOKKOSBLAS2_GEMV_TPL_SPEC_AVAIL_ROCBLAS(double, Kokkos::LayoutLeft)
Expand Down
Loading

0 comments on commit 5f30552

Please sign in to comment.