Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Trilinos issue #11033 #1591

Merged
merged 1 commit into from
Nov 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions sparse/src/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