Skip to content

Commit

Permalink
Merge Pull Request #11278 from brian-kelley/Trilinos/Fix11033
Browse files Browse the repository at this point in the history
Automatically Merged using Trilinos Pull Request AutoTester
PR Title: KokkosKernels: Fix #11033
PR Author: brian-kelley
  • Loading branch information
trilinos-autotester authored Nov 16, 2022
2 parents 3c00e5f + 3527450 commit 3b7bfa4
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions packages/kokkos-kernels/src/sparse/KokkosSparse_Utils_mkl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,24 +123,28 @@ template <typename value_type>
class MKLSparseMatrix {
sparse_matrix_t mtx;

static_assert(mkl_is_supported_value_type<value_type>::value,
"Scalar type used in MKLSparseMatrix<value_type> is NOT "
"supported by MKL");

public:
inline MKLSparseMatrix(sparse_matrix_t mtx_) : mtx(mtx_) {}

// Constructs MKL sparse matrix from KK sparse views (m rows x n cols)
inline MKLSparseMatrix(const MKL_INT num_rows, const MKL_INT num_cols,
MKL_INT *xadj, MKL_INT *adj, value_type *values);
MKL_INT *xadj, MKL_INT *adj, value_type *values) {
throw std::runtime_error(
"Scalar type used in MKLSparseMatrix<value_type> is NOT "
"supported by MKL");
}

// Allows using MKLSparseMatrix directly in MKL calls
inline operator sparse_matrix_t() const { return mtx; }

// Exports MKL sparse matrix contents into KK views
inline void export_data(MKL_INT &num_rows, MKL_INT &num_cols,
MKL_INT *&rows_start, MKL_INT *&columns,
value_type *&values);
value_type *&values) {
throw std::runtime_error(
"Scalar type used in MKLSparseMatrix<value_type> is NOT "
"supported by MKL");
}

inline void destroy() {
KOKKOSKERNELS_MKL_SAFE_CALL(mkl_sparse_destroy(mtx));
Expand Down Expand Up @@ -256,4 +260,4 @@ inline void MKLSparseMatrix<Kokkos::complex<double>>::export_data(

#endif // KOKKOSKERNELS_ENABLE_TPL_MKL

#endif // _KOKKOSKERNELS_SPARSEUTILS_MKL_HPP
#endif // _KOKKOSKERNELS_SPARSEUTILS_MKL_HPP

0 comments on commit 3b7bfa4

Please sign in to comment.