4#include <muda/ext/linear_system/csr_matrix_view.h>
8template <
typename T,
int N>
9class MatrixFormatConverter;
17 template <
typename T,
int N>
28 mutable cusparseSpMatDescr_t m_descr =
nullptr;
29 mutable cusparseMatDescr_t m_legacy_descr =
nullptr;
41 void reshape(
int row,
int col);
42 void reserve(
int non_zeros);
44 auto values() {
return m_values.view(); }
45 auto values()
const {
return m_values.view(); }
47 auto row_offsets() {
return m_row_offsets.view(); }
48 auto row_offsets()
const {
return m_row_offsets.view(); }
50 auto col_indices() {
return m_col_indices.view(); }
51 auto col_indices()
const {
return m_col_indices.view(); }
53 auto rows()
const {
return m_row; }
54 auto cols()
const {
return m_col; }
55 auto non_zeros()
const {
return m_values.size(); }
57 cusparseSpMatDescr_t descr()
const;
58 cusparseMatDescr_t legacy_descr()
const;
86 auto cview()
const {
return view(); }
88 auto T()
const {
return view().T(); }
89 auto T() {
return view().T(); }
96 void destroy_all_descr()
const;
99#include "details/device_csr_matrix.inl"
Definition csr_matrix_view.h:8
A std::vector like wrapper of cuda device memory, allows user to:
Definition device_buffer.h:46
Definition device_csr_matrix.h:16
A light-weight wrapper of cuda device memory. Like std::vector, allow user to resize,...