29 template <
typename U,
int N>
33 mutable cusparseSpVecDescr_t m_descr =
nullptr;
47 , m_descr(other.m_descr)
49 other.m_descr =
nullptr;
63 m_descr = other.m_descr;
64 other.m_descr =
nullptr;
68 auto non_zeros()
const { this->m_values.size(); }
73 checkCudaErrors(cusparseCreateSpVec(
76 this->m_values.size(),
77 (
int*)this->m_indices.data(),
78 (T*)this->m_values.data(),
79 cusparse_index_type<
decltype(this->m_indices)::value_type>(),
80 CUSPARSE_INDEX_BASE_ZERO,
81 cuda_data_type<T>()));
90 void destroy_descr()
const
94 checkCudaErrors(cusparseDestroySpVec(m_descr));