Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
brian-kelley committed Aug 22, 2023
1 parent 88cd6ac commit 7f2b601
Show file tree
Hide file tree
Showing 3 changed files with 154 additions and 148 deletions.
12 changes: 6 additions & 6 deletions sparse/impl/KokkosSparse_spmv_bsrmatrix_spec.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ struct spmv_mv_bsrmatrix_eti_spec_avail {
template <> \
struct spmv_bsrmatrix_eti_spec_avail< \
EXEC_SPACE_TYPE, \
::KokkosSparse::Experimental::BsrMatrix< \
::KokkosSparse::Experimental::BsrMatrix< \
const SCALAR_TYPE, const ORDINAL_TYPE, \
Kokkos::Device<EXEC_SPACE_TYPE, MEM_SPACE_TYPE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>, const OFFSET_TYPE>, \
Expand All @@ -75,7 +75,7 @@ struct spmv_mv_bsrmatrix_eti_spec_avail {
template <> \
struct spmv_mv_bsrmatrix_eti_spec_avail< \
EXEC_SPACE_TYPE, \
::KokkosSparse::Experimental::BsrMatrix< \
::KokkosSparse::Experimental::BsrMatrix< \
const SCALAR_TYPE, const ORDINAL_TYPE, \
Kokkos::Device<EXEC_SPACE_TYPE, MEM_SPACE_TYPE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>, const OFFSET_TYPE>, \
Expand Down Expand Up @@ -389,7 +389,7 @@ struct SPMV_MV_BSRMATRIX<ExecutionSpace, AMatrix, XVector, YVector, true, false,
MEM_SPACE_TYPE) \
extern template struct SPMV_BSRMATRIX< \
EXEC_SPACE_TYPE, \
::KokkosSparse::Experimental::BsrMatrix< \
::KokkosSparse::Experimental::BsrMatrix< \
const SCALAR_TYPE, const ORDINAL_TYPE, \
Kokkos::Device<EXEC_SPACE_TYPE, MEM_SPACE_TYPE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>, const OFFSET_TYPE>, \
Expand All @@ -407,7 +407,7 @@ struct SPMV_MV_BSRMATRIX<ExecutionSpace, AMatrix, XVector, YVector, true, false,
MEM_SPACE_TYPE) \
template struct SPMV_BSRMATRIX< \
EXEC_SPACE_TYPE, \
::KokkosSparse::Experimental::BsrMatrix< \
::KokkosSparse::Experimental::BsrMatrix< \
const SCALAR_TYPE, const ORDINAL_TYPE, \
Kokkos::Device<EXEC_SPACE_TYPE, MEM_SPACE_TYPE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>, const OFFSET_TYPE>, \
Expand All @@ -428,7 +428,7 @@ struct SPMV_MV_BSRMATRIX<ExecutionSpace, AMatrix, XVector, YVector, true, false,
MEM_SPACE_TYPE) \
extern template struct SPMV_MV_BSRMATRIX< \
EXEC_SPACE_TYPE, \
::KokkosSparse::Experimental::BsrMatrix< \
::KokkosSparse::Experimental::BsrMatrix< \
const SCALAR_TYPE, const ORDINAL_TYPE, \
Kokkos::Device<EXEC_SPACE_TYPE, MEM_SPACE_TYPE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>, const OFFSET_TYPE>, \
Expand All @@ -446,7 +446,7 @@ struct SPMV_MV_BSRMATRIX<ExecutionSpace, AMatrix, XVector, YVector, true, false,
MEM_SPACE_TYPE) \
template struct SPMV_MV_BSRMATRIX< \
EXEC_SPACE_TYPE, \
::KokkosSparse::Experimental::BsrMatrix< \
::KokkosSparse::Experimental::BsrMatrix< \
const SCALAR_TYPE, const ORDINAL_TYPE, \
Kokkos::Device<EXEC_SPACE_TYPE, MEM_SPACE_TYPE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>, const OFFSET_TYPE>, \
Expand Down
95 changes: 48 additions & 47 deletions sparse/tpls/KokkosSparse_spmv_bsrmatrix_tpl_spec_avail.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,20 @@ struct spmv_bsrmatrix_tpl_spec_avail {
// These versions of cuSPARSE require the ordinal and offset types to be the
// same. For KokkosKernels, this means int/int only.

#define KOKKOSSPARSE_SPMV_BSRMATRIX_TPL_SPEC_AVAIL_CUSPARSE( \
SCALAR, ORDINAL, OFFSET, XL, YL, MEMSPACE) \
template <> \
struct spmv_bsrmatrix_tpl_spec_avail< \
Kokkos::Cuda, \
::KokkosSparse::Experimental::BsrMatrix<const SCALAR, const ORDINAL, \
Kokkos::Device<Kokkos::Cuda, MEMSPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>, const OFFSET>, \
Kokkos::View< \
const SCALAR*, XL, Kokkos::Device<Kokkos::Cuda, MEMSPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged | Kokkos::RandomAccess>>, \
Kokkos::View<SCALAR*, YL, Kokkos::Device<Kokkos::Cuda, MEMSPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>> { \
enum : bool { value = true }; \
#define KOKKOSSPARSE_SPMV_BSRMATRIX_TPL_SPEC_AVAIL_CUSPARSE( \
SCALAR, ORDINAL, OFFSET, XL, YL, MEMSPACE) \
template <> \
struct spmv_bsrmatrix_tpl_spec_avail< \
Kokkos::Cuda, \
::KokkosSparse::Experimental::BsrMatrix< \
const SCALAR, const ORDINAL, Kokkos::Device<Kokkos::Cuda, MEMSPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>, const OFFSET>, \
Kokkos::View< \
const SCALAR*, XL, Kokkos::Device<Kokkos::Cuda, MEMSPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged | Kokkos::RandomAccess>>, \
Kokkos::View<SCALAR*, YL, Kokkos::Device<Kokkos::Cuda, MEMSPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>> { \
enum : bool { value = true }; \
};

#if (9000 <= CUDA_VERSION)
Expand Down Expand Up @@ -131,9 +131,10 @@ KOKKOSSPARSE_SPMV_BSRMATRIX_TPL_SPEC_AVAIL_CUSPARSE(Kokkos::complex<double>,
template <> \
struct spmv_bsrmatrix_tpl_spec_avail< \
EXECSPACE, \
::KokkosSparse::Experimental::BsrMatrix<const SCALAR, const MKL_INT, \
Kokkos::Device<EXECSPACE, Kokkos::HostSpace>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>, const MKL_INT>, \
::KokkosSparse::Experimental::BsrMatrix< \
const SCALAR, const MKL_INT, \
Kokkos::Device<EXECSPACE, Kokkos::HostSpace>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>, const MKL_INT>, \
Kokkos::View< \
const SCALAR*, Kokkos::LayoutLeft, \
Kokkos::Device<EXECSPACE, Kokkos::HostSpace>, \
Expand Down Expand Up @@ -178,21 +179,21 @@ struct spmv_mv_bsrmatrix_tpl_spec_avail {
// These versions of cuSPARSE require the ordinal and offset types to be the
// same. For KokkosKernels, this means int/int only.
// cuSparse level 3 does not currently support LayoutRight
#define KOKKOSSPARSE_SPMV_MV_BSRMATRIX_TPL_SPEC_AVAIL_CUSPARSE( \
SCALAR, ORDINAL, OFFSET, LAYOUT, MEMSPACE) \
template <> \
struct spmv_mv_bsrmatrix_tpl_spec_avail< \
Kokkos::Cuda, \
::KokkosSparse::Experimental::BsrMatrix<const SCALAR, const ORDINAL, \
Kokkos::Device<Kokkos::Cuda, MEMSPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>, const OFFSET>, \
Kokkos::View< \
const SCALAR**, LAYOUT, Kokkos::Device<Kokkos::Cuda, MEMSPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged | Kokkos::RandomAccess>>, \
Kokkos::View<SCALAR**, LAYOUT, Kokkos::Device<Kokkos::Cuda, MEMSPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>, \
false> { \
enum : bool { value = true }; \
#define KOKKOSSPARSE_SPMV_MV_BSRMATRIX_TPL_SPEC_AVAIL_CUSPARSE( \
SCALAR, ORDINAL, OFFSET, LAYOUT, MEMSPACE) \
template <> \
struct spmv_mv_bsrmatrix_tpl_spec_avail< \
Kokkos::Cuda, \
::KokkosSparse::Experimental::BsrMatrix< \
const SCALAR, const ORDINAL, Kokkos::Device<Kokkos::Cuda, MEMSPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>, const OFFSET>, \
Kokkos::View< \
const SCALAR**, LAYOUT, Kokkos::Device<Kokkos::Cuda, MEMSPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged | Kokkos::RandomAccess>>, \
Kokkos::View<SCALAR**, LAYOUT, Kokkos::Device<Kokkos::Cuda, MEMSPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>, \
false> { \
enum : bool { value = true }; \
};

#if (9000 <= CUDA_VERSION)
Expand Down Expand Up @@ -234,7 +235,7 @@ KOKKOSSPARSE_SPMV_MV_BSRMATRIX_TPL_SPEC_AVAIL_CUSPARSE(Kokkos::complex<double>,
template <> \
struct spmv_mv_bsrmatrix_tpl_spec_avail< \
EXECSPACE, \
::KokkosSparse::Experimental::BsrMatrix< \
::KokkosSparse::Experimental::BsrMatrix< \
const SCALAR, const int, \
Kokkos::Device<EXECSPACE, Kokkos::HostSpace>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>, const int>, \
Expand Down Expand Up @@ -273,20 +274,20 @@ KOKKOSSPARSE_SPMV_MV_BSRMATRIX_TPL_SPEC_AVAIL_MKL(Kokkos::complex<double>,

#include "KokkosSparse_Utils_rocsparse.hpp"

#define KOKKOSSPARSE_SPMV_BSRMATRIX_TPL_SPEC_AVAIL_ROCSPARSE( \
SCALAR, ORDINAL, OFFSET, LAYOUT, MEMSPACE) \
template <> \
struct spmv_bsrmatrix_tpl_spec_avail< \
Kokkos::HIP, \
::KokkosSparse::Experimental::BsrMatrix<const SCALAR, const ORDINAL, \
Kokkos::Device<Kokkos::HIP, MEMSPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>, const OFFSET>, \
Kokkos::View< \
const SCALAR*, LAYOUT, Kokkos::Device<Kokkos::HIP, MEMSPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged | Kokkos::RandomAccess>>, \
Kokkos::View<SCALAR*, LAYOUT, Kokkos::Device<Kokkos::HIP, MEMSPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>> { \
enum : bool { value = true }; \
#define KOKKOSSPARSE_SPMV_BSRMATRIX_TPL_SPEC_AVAIL_ROCSPARSE( \
SCALAR, ORDINAL, OFFSET, LAYOUT, MEMSPACE) \
template <> \
struct spmv_bsrmatrix_tpl_spec_avail< \
Kokkos::HIP, \
::KokkosSparse::Experimental::BsrMatrix< \
const SCALAR, const ORDINAL, Kokkos::Device<Kokkos::HIP, MEMSPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>, const OFFSET>, \
Kokkos::View< \
const SCALAR*, LAYOUT, Kokkos::Device<Kokkos::HIP, MEMSPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged | Kokkos::RandomAccess>>, \
Kokkos::View<SCALAR*, LAYOUT, Kokkos::Device<Kokkos::HIP, MEMSPACE>, \
Kokkos::MemoryTraits<Kokkos::Unmanaged>>> { \
enum : bool { value = true }; \
};

#if KOKKOSSPARSE_IMPL_ROCM_VERSION >= 50200
Expand Down
Loading

0 comments on commit 7f2b601

Please sign in to comment.