11 using auto_const_t =
typename Base::template auto_const_t<U>;
14 static_assert(!std::is_const_v<Ty>,
"Ty must be non-const");
25 auto_const_t<int>* m_row_offsets =
nullptr;
26 auto_const_t<int>* m_col_indices =
nullptr;
27 auto_const_t<Ty>* m_values =
nullptr;
30 mutable cusparseSpMatDescr_t m_descr =
nullptr;
31 mutable cusparseMatDescr_t m_legacy_descr =
nullptr;
40 auto_const_t<int>* row_offsets,
41 auto_const_t<int>* col_indices,
42 auto_const_t<Ty>* values,
44 cusparseSpMatDescr_t descr,
45 cusparseMatDescr_t legacy_descr,
49 , m_row_offsets(row_offsets)
50 , m_col_indices(col_indices)
52 , m_non_zero(non_zero)
54 , m_legacy_descr(legacy_descr)
62 m_row, m_col, m_row_offsets, m_col_indices, m_values, m_non_zero, m_descr, m_legacy_descr, m_trans};
66 operator ConstView()
const {
return as_const(); }
68 auto_const_t<Ty>* values() {
return m_values; }
69 auto_const_t<int>* row_offsets() {
return m_row_offsets; }
70 auto_const_t<int>* col_indices() {
return m_col_indices; }
72 auto values()
const {
return m_values; }
73 auto row_offsets()
const {
return m_row_offsets; }
74 auto col_indices()
const {
return m_col_indices; }
75 auto rows()
const {
return m_row; }
76 auto cols()
const {
return m_col; }
77 auto non_zeros()
const {
return m_non_zero; }
78 auto descr()
const {
return m_descr; }
79 auto legacy_descr()
const {
return m_legacy_descr; }
80 auto is_trans()
const {
return m_trans; }
84 m_row, m_col, m_row_offsets, m_col_indices, m_values, m_non_zero, m_descr, m_legacy_descr, !m_trans};