![]() |
imate
C++/CUDA Reference
|
A collection of templates to wrapper cusparse functions. More...
Functions | |
| template<> | |
| void | create_cusparse_csr_matrix< float, int32_t > (cusparseSpMatDescr_t &cusparse_matrix, const int32_t num_rows, const int32_t num_columns, const int32_t nnz, float *RESTRICT device_A_data, int32_t *RESTRICT device_A_indices, int32_t *RESTRICT device_A_index_pointer) |
A template wrapper for cusparseCreateCsr for the __nv_fp8_e5m2 precision data and int32_t index type. | |
| template<> | |
| void | create_cusparse_csr_matrix< float, int64_t > (cusparseSpMatDescr_t &cusparse_matrix, const int64_t num_rows, const int64_t num_columns, const int64_t nnz, float *RESTRICT device_A_data, int64_t *RESTRICT device_A_indices, int64_t *RESTRICT device_A_index_pointer) |
A template wrapper for cusparseCreateCsr for the float precision data and int64_t index type. | |
| template<> | |
| void | create_cusparse_csr_matrix< double, int32_t > (cusparseSpMatDescr_t &cusparse_matrix, const int32_t num_rows, const int32_t num_columns, const int32_t nnz, double *RESTRICT device_A_data, int32_t *RESTRICT device_A_indices, int32_t *RESTRICT device_A_index_pointer) |
A template wrapper for cusparseCreateCsr for the double precision data and int32_t index type. | |
| template<> | |
| void | create_cusparse_csr_matrix< double, int64_t > (cusparseSpMatDescr_t &cusparse_matrix, const int64_t num_rows, const int64_t num_columns, const int64_t nnz, double *RESTRICT device_A_data, int64_t *RESTRICT device_A_indices, int64_t *RESTRICT device_A_index_pointer) |
A template wrapper for cusparseCreateCsr for the double precision data and int64_t index type. | |
| template<> | |
| void | create_cusparse_csc_matrix< float, int32_t > (cusparseSpMatDescr_t &cusparse_matrix, const int32_t num_rows, const int32_t num_columns, const int32_t nnz, float *RESTRICT device_A_data, int32_t *RESTRICT device_A_indices, int32_t *RESTRICT device_A_index_pointer) |
A template wrapper for cusparseCreateCsc for the __nv_fp8_e5m2 precision data and int32_t index type. | |
| template<> | |
| void | create_cusparse_csc_matrix< float, int64_t > (cusparseSpMatDescr_t &cusparse_matrix, const int64_t num_rows, const int64_t num_columns, const int64_t nnz, float *RESTRICT device_A_data, int64_t *RESTRICT device_A_indices, int64_t *RESTRICT device_A_index_pointer) |
A template wrapper for cusparseCreateCsc for the float precision data and int64_t index type. | |
| template<> | |
| void | create_cusparse_csc_matrix< double, int32_t > (cusparseSpMatDescr_t &cusparse_matrix, const int32_t num_rows, const int32_t num_columns, const int32_t nnz, double *RESTRICT device_A_data, int32_t *RESTRICT device_A_indices, int32_t *RESTRICT device_A_index_pointer) |
A template wrapper for cusparseCreateCsc for the double precision data and int32_t index type. | |
| template<> | |
| void | create_cusparse_csc_matrix< double, int64_t > (cusparseSpMatDescr_t &cusparse_matrix, const int64_t num_rows, const int64_t num_columns, const int64_t nnz, double *RESTRICT device_A_data, int64_t *RESTRICT device_A_indices, int64_t *RESTRICT device_A_index_pointer) |
A template wrapper for cusparseCreateCsc for the double precision data and int64_t index type. | |
| template<> | |
| void | create_cusparse_vector< float > (cusparseDnVecDescr_t &cusparse_vector, const LongIndexType vector_size, float *RESTRICT device_vector) |
A template wrapper for cusparseCreateDnVec for the __nv_fp8_e5m2 precision data. | |
| template<> | |
| void | create_cusparse_vector< double > (cusparseDnVecDescr_t &cusparse_vector, const LongIndexType vector_size, double *RESTRICT device_vector) |
A template wrapper for cusparseCreateDnVec for the double precision data. | |
| void | destroy_cusparse_matrix (cusparseSpMatDescr_t &cusparse_matrix) |
| Destroy cusparse matrix. | |
| void | destroy_cusparse_vector (cusparseDnVecDescr_t &cusparse_vector) |
| Destroys cusparse vector. | |
| template<> | |
| void | cusparse_matrix_buffer_size< float > (cusparseHandle_t cusparse_handle, cusparseOperation_t cusparse_operation, const float alpha, cusparseSpMatDescr_t cusparse_matrix, cusparseDnVecDescr_t cusparse_input_vector, const float beta, cusparseDnVecDescr_t cusparse_output_vector, cusparseSpMVAlg_t algorithm, size_t *buffer_size) |
A template wrapper for cusparseSpMV_bufferSize for __nv_fp8_e5m2 precision data. This function determines the buffer size needed for matrix-vector multiplication using cusparseSpMV. The output is buffer_size variable. | |
| template<> | |
| void | cusparse_matrix_buffer_size< double > (cusparseHandle_t cusparse_handle, cusparseOperation_t cusparse_operation, const double alpha, cusparseSpMatDescr_t cusparse_matrix, cusparseDnVecDescr_t cusparse_input_vector, const double beta, cusparseDnVecDescr_t cusparse_output_vector, cusparseSpMVAlg_t algorithm, size_t *buffer_size) |
A template wrapper for cusparseSpMV_bufferSize for double precision data. This function determines the buffer size needed for matrix-vector multiplication using cusparseSpMV. The output is buffer_size variable. | |
| template<> | |
| void | cusparse_matvec< float > (cusparseHandle_t cusparse_handle, cusparseOperation_t cusparse_operation, const float alpha, cusparseSpMatDescr_t cusparse_matrix, cusparseDnVecDescr_t cusparse_input_vector, const float beta, cusparseDnVecDescr_t cusparse_output_vector, cusparseSpMVAlg_t algorithm, void *external_buffer) |
A wrapper for cusparseSpMV to perform sparse matrix-vector multiplication using __nv_fp8_e5m2 precision data. | |
| template<> | |
| void | cusparse_matvec< double > (cusparseHandle_t cusparse_handle, cusparseOperation_t cusparse_operation, const double alpha, cusparseSpMatDescr_t cusparse_matrix, cusparseDnVecDescr_t cusparse_input_vector, const double beta, cusparseDnVecDescr_t cusparse_output_vector, cusparseSpMVAlg_t algorithm, void *external_buffer) |
A wrapper for cusparseSpMV to perform sparse matrix-vector multiplication using double precision data. | |
| template<typename DataType , typename DataIndexType > | |
| void | create_cusparse_csr_matrix (cusparseSpMatDescr_t &cusparse_matrix, const DataIndexType num_rows, const DataIndexType num_columns, const DataIndexType nnz, DataType *RESTRICT device_A_data, DataIndexType *RESTRICT device_A_indices, DataIndexType *RESTRICT device_A_index_pointer) |
| template<typename DataType , typename DataIndexType > | |
| void | create_cusparse_csc_matrix (cusparseSpMatDescr_t &cusparse_matrix, const DataIndexType num_rows, const DataIndexType num_columns, const DataIndexType nnz, DataType *RESTRICT device_A_data, DataIndexType *RESTRICT device_A_indices, DataIndexType *RESTRICT device_A_index_pointer) |
| template<typename DataType > | |
| void | create_cusparse_vector (cusparseDnVecDescr_t &cusparse_vector, const LongIndexType vector_size, DataType *RESTRICT device_vector) |
| template<typename DataType > | |
| void | cusparse_matrix_buffer_size (cusparseHandle_t cusparse_handle, cusparseOperation_t cusparse_operation, const DataType alpha, cusparseSpMatDescr_t cusparse_matrix, cusparseDnVecDescr_t cusparse_input_vector, const DataType beta, cusparseDnVecDescr_t cusparse_output_vector, cusparseSpMVAlg_t algorithm, size_t *buffer_size) |
| template<typename DataType > | |
| void | cusparse_matvec (cusparseHandle_t cusparse_handle, cusparseOperation_t cusparse_operation, const DataType alpha, cusparseSpMatDescr_t cusparse_matrix, cusparseDnVecDescr_t cusparse_input_vector, const DataType beta, cusparseDnVecDescr_t cusparse_output_vector, cusparseSpMVAlg_t algorithm, void *external_buffer) |
A collection of templates to wrapper cusparse functions.
cu file is wrapped inside the namepsace clause. This is not necessary in general, however, it is needed to avoid the old gcc compiler error (this is a gcc bug) which complains "no instance of function template matches
the argument list const float". | void cusparse_api::create_cusparse_csc_matrix | ( | cusparseSpMatDescr_t & | cusparse_matrix, |
| const DataIndexType | num_rows, | ||
| const DataIndexType | num_columns, | ||
| const DataIndexType | nnz, | ||
| DataType *RESTRICT | device_A_data, | ||
| DataIndexType *RESTRICT | device_A_indices, | ||
| DataIndexType *RESTRICT | device_A_index_pointer | ||
| ) |
Referenced by cuCSCMatrix< DataType >::copy_host_to_device().

| void cusparse_api::create_cusparse_csc_matrix< double, int32_t > | ( | cusparseSpMatDescr_t & | cusparse_matrix, |
| const int32_t | num_rows, | ||
| const int32_t | num_columns, | ||
| const int32_t | nnz, | ||
| double *RESTRICT | device_A_data, | ||
| int32_t *RESTRICT | device_A_indices, | ||
| int32_t *RESTRICT | device_A_index_pointer | ||
| ) |
A template wrapper for cusparseCreateCsc for the double precision data and int32_t index type.
| [out] | cusparse_matrix | Reference to CuSparse matrix object to be created. |
| [in] | num_rows | Number of rows of matrix |
| [in] | num_columns | Number of columns of matrix |
| [in] | nnz | Number of non-zero elements of sparse matrix |
| [in] | device_A_data | Array of the data of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_indices | Array of rows indices of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_index_pointer | Array of row index pointers of sparse matrix. The length of this array is number of columns plus one. This array resides on GPU device. |
Definition at line 1195 of file cusparse_api.cu.
References cusparseCreateCsc().

| void cusparse_api::create_cusparse_csc_matrix< double, int64_t > | ( | cusparseSpMatDescr_t & | cusparse_matrix, |
| const int64_t | num_rows, | ||
| const int64_t | num_columns, | ||
| const int64_t | nnz, | ||
| double *RESTRICT | device_A_data, | ||
| int64_t *RESTRICT | device_A_indices, | ||
| int64_t *RESTRICT | device_A_index_pointer | ||
| ) |
A template wrapper for cusparseCreateCsc for the double precision data and int64_t index type.
| [out] | cusparse_matrix | Reference to CuSparse matrix object to be created. |
| [in] | num_rows | Number of rows of matrix |
| [in] | num_columns | Number of columns of matrix |
| [in] | nnz | Number of non-zero elements of sparse matrix |
| [in] | device_A_data | Array of the data of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_indices | Array of rows indices of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_index_pointer | Array of row index pointers of sparse matrix. The length of this array is number of columns plus one. This array resides on GPU device. |
Definition at line 1248 of file cusparse_api.cu.
References cusparseCreateCsc().

| void cusparse_api::create_cusparse_csc_matrix< float, int32_t > | ( | cusparseSpMatDescr_t & | cusparse_matrix, |
| const int32_t | num_rows, | ||
| const int32_t | num_columns, | ||
| const int32_t | nnz, | ||
| float *RESTRICT | device_A_data, | ||
| int32_t *RESTRICT | device_A_indices, | ||
| int32_t *RESTRICT | device_A_index_pointer | ||
| ) |
A template wrapper for cusparseCreateCsc for the __nv_fp8_e5m2 precision data and int32_t index type.
| [out] | cusparse_matrix | Reference to CuSparse matrix object to be created. |
| [in] | num_rows | Number of rows of matrix |
| [in] | num_columns | Number of columns of matrix |
| [in] | nnz | Number of non-zero elements of sparse matrix |
| [in] | device_A_data | Array of the data of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_indices | Array of rows indices of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_index_pointer | Array of row index pointers of sparse matrix. The length of this array is number of columns plus one. This array resides on GPU device. |
A template wrapper for cusparseCreateCsc for the __nv_fp8_e5m2 precision data and int64_t index type.
| [out] | cusparse_matrix | Reference to CuSparse matrix object to be created. |
| [in] | num_rows | Number of rows of matrix |
| [in] | num_columns | Number of columns of matrix |
| [in] | nnz | Number of non-zero elements of sparse matrix |
| [in] | device_A_data | Array of the data of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_indices | Array of rows indices of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_index_pointer | Array of row index pointers of sparse matrix. The length of this array is number of columns plus one. This array resides on GPU device. |
A template wrapper for cusparseCreateCsc for the __nv_fp8_e4m3 precision data and int32_t index type.
| [out] | cusparse_matrix | Reference to CuSparse matrix object to be created. |
| [in] | num_rows | Number of rows of matrix |
| [in] | num_columns | Number of columns of matrix |
| [in] | nnz | Number of non-zero elements of sparse matrix |
| [in] | device_A_data | Array of the data of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_indices | Array of rows indices of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_index_pointer | Array of row index pointers of sparse matrix. The length of this array is number of columns plus one. This array resides on GPU device. |
A template wrapper for cusparseCreateCsc for the __nv_fp8_e4m3 precision data and int64_t index type.
| [out] | cusparse_matrix | Reference to CuSparse matrix object to be created. |
| [in] | num_rows | Number of rows of matrix |
| [in] | num_columns | Number of columns of matrix |
| [in] | nnz | Number of non-zero elements of sparse matrix |
| [in] | device_A_data | Array of the data of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_indices | Array of rows indices of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_index_pointer | Array of row index pointers of sparse matrix. The length of this array is number of columns plus one. This array resides on GPU device. |
A template wrapper for cusparseCreateCsc for the __half precision data and int32_t index type.
| [out] | cusparse_matrix | Reference to CuSparse matrix object to be created. |
| [in] | num_rows | Number of rows of matrix |
| [in] | num_columns | Number of columns of matrix |
| [in] | nnz | Number of non-zero elements of sparse matrix |
| [in] | device_A_data | Array of the data of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_indices | Array of rows indices of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_index_pointer | Array of row index pointers of sparse matrix. The length of this array is number of columns plus one. This array resides on GPU device. |
A template wrapper for cusparseCreateCsc for the __half precision data and int64_t index type.
| [out] | cusparse_matrix | Reference to CuSparse matrix object to be created. |
| [in] | num_rows | Number of rows of matrix |
| [in] | num_columns | Number of columns of matrix |
| [in] | nnz | Number of non-zero elements of sparse matrix |
| [in] | device_A_data | Array of the data of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_indices | Array of rows indices of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_index_pointer | Array of row index pointers of sparse matrix. The length of this array is number of columns plus one. This array resides on GPU device. |
A template wrapper for cusparseCreateCsc for the __nv_bfloat16 precision data and int32_t index type.
| [out] | cusparse_matrix | Reference to CuSparse matrix object to be created. |
| [in] | num_rows | Number of rows of matrix |
| [in] | num_columns | Number of columns of matrix |
| [in] | nnz | Number of non-zero elements of sparse matrix |
| [in] | device_A_data | Array of the data of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_indices | Array of rows indices of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_index_pointer | Array of row index pointers of sparse matrix. The length of this array is number of columns plus one. This array resides on GPU device. |
A template wrapper for cusparseCreateCsc for the __nv_bfloat16 precision data and int64_t index type.
| [out] | cusparse_matrix | Reference to CuSparse matrix object to be created. |
| [in] | num_rows | Number of rows of matrix |
| [in] | num_columns | Number of columns of matrix |
| [in] | nnz | Number of non-zero elements of sparse matrix |
| [in] | device_A_data | Array of the data of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_indices | Array of rows indices of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_index_pointer | Array of row index pointers of sparse matrix. The length of this array is number of columns plus one. This array resides on GPU device. |
A template wrapper for cusparseCreateCsc for the float precision data and int32_t index type.
| [out] | cusparse_matrix | Reference to CuSparse matrix object to be created. |
| [in] | num_rows | Number of rows of matrix |
| [in] | num_columns | Number of columns of matrix |
| [in] | nnz | Number of non-zero elements of sparse matrix |
| [in] | device_A_data | Array of the data of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_indices | Array of rows indices of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_index_pointer | Array of row index pointers of sparse matrix. The length of this array is number of columns plus one. This array resides on GPU device. |
Definition at line 1089 of file cusparse_api.cu.
References cusparseCreateCsc().

| void cusparse_api::create_cusparse_csc_matrix< float, int64_t > | ( | cusparseSpMatDescr_t & | cusparse_matrix, |
| const int64_t | num_rows, | ||
| const int64_t | num_columns, | ||
| const int64_t | nnz, | ||
| float *RESTRICT | device_A_data, | ||
| int64_t *RESTRICT | device_A_indices, | ||
| int64_t *RESTRICT | device_A_index_pointer | ||
| ) |
A template wrapper for cusparseCreateCsc for the float precision data and int64_t index type.
| [out] | cusparse_matrix | Reference to CuSparse matrix object to be created. |
| [in] | num_rows | Number of rows of matrix |
| [in] | num_columns | Number of columns of matrix |
| [in] | nnz | Number of non-zero elements of sparse matrix |
| [in] | device_A_data | Array of the data of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_indices | Array of rows indices of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_index_pointer | Array of row index pointers of sparse matrix. The length of this array is number of columns plus one. This array resides on GPU device. |
Definition at line 1142 of file cusparse_api.cu.
References cusparseCreateCsc().

| void cusparse_api::create_cusparse_csr_matrix | ( | cusparseSpMatDescr_t & | cusparse_matrix, |
| const DataIndexType | num_rows, | ||
| const DataIndexType | num_columns, | ||
| const DataIndexType | nnz, | ||
| DataType *RESTRICT | device_A_data, | ||
| DataIndexType *RESTRICT | device_A_indices, | ||
| DataIndexType *RESTRICT | device_A_index_pointer | ||
| ) |
Referenced by cuCSCMatrix< DataType >::copy_host_to_device(), and cuCSRMatrix< DataType >::copy_host_to_device().

| void cusparse_api::create_cusparse_csr_matrix< double, int32_t > | ( | cusparseSpMatDescr_t & | cusparse_matrix, |
| const int32_t | num_rows, | ||
| const int32_t | num_columns, | ||
| const int32_t | nnz, | ||
| double *RESTRICT | device_A_data, | ||
| int32_t *RESTRICT | device_A_indices, | ||
| int32_t *RESTRICT | device_A_index_pointer | ||
| ) |
A template wrapper for cusparseCreateCsr for the double precision data and int32_t index type.
| [out] | cusparse_matrix | Reference to CuSparse matrix object to be created. |
| [in] | num_rows | Number of rows of matrix |
| [in] | num_columns | Number of columns of matrix |
| [in] | nnz | Number of non-zero elements of sparse matrix |
| [in] | device_A_data | Array of the data of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_indices | Array of columns indices of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_index_pointer | Array of row index pointers of sparse matrix. The length of this array is number of rows plus one. This array resides on GPU device. |
Definition at line 579 of file cusparse_api.cu.
References cusparseCreateCsr().

| void cusparse_api::create_cusparse_csr_matrix< double, int64_t > | ( | cusparseSpMatDescr_t & | cusparse_matrix, |
| const int64_t | num_rows, | ||
| const int64_t | num_columns, | ||
| const int64_t | nnz, | ||
| double *RESTRICT | device_A_data, | ||
| int64_t *RESTRICT | device_A_indices, | ||
| int64_t *RESTRICT | device_A_index_pointer | ||
| ) |
A template wrapper for cusparseCreateCsr for the double precision data and int64_t index type.
| [out] | cusparse_matrix | Reference to CuSparse matrix object to be created. |
| [in] | num_rows | Number of rows of matrix |
| [in] | num_columns | Number of columns of matrix |
| [in] | nnz | Number of non-zero elements of sparse matrix |
| [in] | device_A_data | Array of the data of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_indices | Array of columns indices of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_index_pointer | Array of row index pointers of sparse matrix. The length of this array is number of rows plus one. This array resides on GPU device. |
Definition at line 632 of file cusparse_api.cu.
References cusparseCreateCsr().

| void cusparse_api::create_cusparse_csr_matrix< float, int32_t > | ( | cusparseSpMatDescr_t & | cusparse_matrix, |
| const int32_t | num_rows, | ||
| const int32_t | num_columns, | ||
| const int32_t | nnz, | ||
| float *RESTRICT | device_A_data, | ||
| int32_t *RESTRICT | device_A_indices, | ||
| int32_t *RESTRICT | device_A_index_pointer | ||
| ) |
A template wrapper for cusparseCreateCsr for the __nv_fp8_e5m2 precision data and int32_t index type.
| [out] | cusparse_matrix | Reference to CuSparse matrix object to be created. |
| [in] | num_rows | Number of rows of matrix |
| [in] | num_columns | Number of columns of matrix |
| [in] | nnz | Number of non-zero elements of sparse matrix |
| [in] | device_A_data | Array of the data of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_indices | Array of columns indices of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_index_pointer | Array of row index pointers of sparse matrix. The length of this array is number of rows plus one. This array resides on GPU device. |
A template wrapper for cusparseCreateCsr for the __nv_fp8_e5m2 precision data and int64_t index type.
| [out] | cusparse_matrix | Reference to CuSparse matrix object to be created. |
| [in] | num_rows | Number of rows of matrix |
| [in] | num_columns | Number of columns of matrix |
| [in] | nnz | Number of non-zero elements of sparse matrix |
| [in] | device_A_data | Array of the data of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_indices | Array of columns indices of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_index_pointer | Array of row index pointers of sparse matrix. The length of this array is number of rows plus one. This array resides on GPU device. |
A template wrapper for cusparseCreateCsr for the __nv_fp8_e4m3 precision data and int32_t index type.
| [out] | cusparse_matrix | Reference to CuSparse matrix object to be created. |
| [in] | num_rows | Number of rows of matrix |
| [in] | num_columns | Number of columns of matrix |
| [in] | nnz | Number of non-zero elements of sparse matrix |
| [in] | device_A_data | Array of the data of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_indices | Array of columns indices of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_index_pointer | Array of row index pointers of sparse matrix. The length of this array is number of rows plus one. This array resides on GPU device. |
A template wrapper for cusparseCreateCsr for the __nv_fp8_e4m3 precision data and int64_t index type.
| [out] | cusparse_matrix | Reference to CuSparse matrix object to be created. |
| [in] | num_rows | Number of rows of matrix |
| [in] | num_columns | Number of columns of matrix |
| [in] | nnz | Number of non-zero elements of sparse matrix |
| [in] | device_A_data | Array of the data of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_indices | Array of columns indices of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_index_pointer | Array of row index pointers of sparse matrix. The length of this array is number of rows plus one. This array resides on GPU device. |
A template wrapper for cusparseCreateCsr for the __half precision data and int32_t index type.
| [out] | cusparse_matrix | Reference to CuSparse matrix object to be created. |
| [in] | num_rows | Number of rows of matrix |
| [in] | num_columns | Number of columns of matrix |
| [in] | nnz | Number of non-zero elements of sparse matrix |
| [in] | device_A_data | Array of the data of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_indices | Array of columns indices of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_index_pointer | Array of row index pointers of sparse matrix. The length of this array is number of rows plus one. This array resides on GPU device. |
A template wrapper for cusparseCreateCsr for the __half precision data and int64_t index type.
| [out] | cusparse_matrix | Reference to CuSparse matrix object to be created. |
| [in] | num_rows | Number of rows of matrix |
| [in] | num_columns | Number of columns of matrix |
| [in] | nnz | Number of non-zero elements of sparse matrix |
| [in] | device_A_data | Array of the data of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_indices | Array of columns indices of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_index_pointer | Array of row index pointers of sparse matrix. The length of this array is number of rows plus one. This array resides on GPU device. |
A template wrapper for cusparseCreateCsr for the __nv_bfloat16 precision data and int32_t index type.
| [out] | cusparse_matrix | Reference to CuSparse matrix object to be created. |
| [in] | num_rows | Number of rows of matrix |
| [in] | num_columns | Number of columns of matrix |
| [in] | nnz | Number of non-zero elements of sparse matrix |
| [in] | device_A_data | Array of the data of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_indices | Array of columns indices of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_index_pointer | Array of row index pointers of sparse matrix. The length of this array is number of rows plus one. This array resides on GPU device. |
A template wrapper for cusparseCreateCsr for the __nv_bfloat16 precision data and int64_t index type.
| [out] | cusparse_matrix | Reference to CuSparse matrix object to be created. |
| [in] | num_rows | Number of rows of matrix |
| [in] | num_columns | Number of columns of matrix |
| [in] | nnz | Number of non-zero elements of sparse matrix |
| [in] | device_A_data | Array of the data of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_indices | Array of columns indices of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_index_pointer | Array of row index pointers of sparse matrix. The length of this array is number of rows plus one. This array resides on GPU device. |
A template wrapper for cusparseCreateCsr for the float precision data and int32_t index type.
| [out] | cusparse_matrix | Reference to CuSparse matrix object to be created. |
| [in] | num_rows | Number of rows of matrix |
| [in] | num_columns | Number of columns of matrix |
| [in] | nnz | Number of non-zero elements of sparse matrix |
| [in] | device_A_data | Array of the data of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_indices | Array of columns indices of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_index_pointer | Array of row index pointers of sparse matrix. The length of this array is number of rows plus one. This array resides on GPU device. |
Definition at line 473 of file cusparse_api.cu.
References cusparseCreateCsr().

| void cusparse_api::create_cusparse_csr_matrix< float, int64_t > | ( | cusparseSpMatDescr_t & | cusparse_matrix, |
| const int64_t | num_rows, | ||
| const int64_t | num_columns, | ||
| const int64_t | nnz, | ||
| float *RESTRICT | device_A_data, | ||
| int64_t *RESTRICT | device_A_indices, | ||
| int64_t *RESTRICT | device_A_index_pointer | ||
| ) |
A template wrapper for cusparseCreateCsr for the float precision data and int64_t index type.
| [out] | cusparse_matrix | Reference to CuSparse matrix object to be created. |
| [in] | num_rows | Number of rows of matrix |
| [in] | num_columns | Number of columns of matrix |
| [in] | nnz | Number of non-zero elements of sparse matrix |
| [in] | device_A_data | Array of the data of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_indices | Array of columns indices of sparse matrix. The length of this array is nnz. This array resides on GPU device. |
| [in] | device_A_index_pointer | Array of row index pointers of sparse matrix. The length of this array is number of rows plus one. This array resides on GPU device. |
Definition at line 526 of file cusparse_api.cu.
References cusparseCreateCsr().

| void cusparse_api::create_cusparse_vector | ( | cusparseDnVecDescr_t & | cusparse_vector, |
| const LongIndexType | vector_size, | ||
| DataType *RESTRICT | device_vector | ||
| ) |
Referenced by cuCSCMatrix< DataType >::dot(), cuCSRMatrix< DataType >::dot(), cuCSCMatrix< DataType >::dot_plus(), cuCSRMatrix< DataType >::dot_plus(), cuCSCMatrix< DataType >::transpose_dot(), cuCSRMatrix< DataType >::transpose_dot(), cuCSCMatrix< DataType >::transpose_dot_plus(), and cuCSRMatrix< DataType >::transpose_dot_plus().

| void cusparse_api::create_cusparse_vector< double > | ( | cusparseDnVecDescr_t & | cusparse_vector, |
| const LongIndexType | vector_size, | ||
| double *RESTRICT | device_vector | ||
| ) |
A template wrapper for cusparseCreateDnVec for the double precision data.
Note that according to the cusparse documentation for the function cusparseCreateDnVec, it is safe to use const_cast to cast the input vector.
| [out] | cusparse_vector | Reference to CuSparse vector object to be created. |
| [in] | vector_size | Size of vector array |
| [in] | device_vector | Array data of vector on GPU device. |
Definition at line 1473 of file cusparse_api.cu.
References cusparseCreateDnVec().

| void cusparse_api::create_cusparse_vector< float > | ( | cusparseDnVecDescr_t & | cusparse_vector, |
| const LongIndexType | vector_size, | ||
| float *RESTRICT | device_vector | ||
| ) |
A template wrapper for cusparseCreateDnVec for the __nv_fp8_e5m2 precision data.
Note that according to the cusparse documentation for the function cusparseCreateDnVec, it is safe to use const_cast to cast the input vector.
| [out] | cusparse_vector | Reference to CuSparse vector object to be created. |
| [in] | vector_size | Size of vector array |
| [in] | device_vector | Array data of vector on GPU device. |
A template wrapper for cusparseCreateDnVec for the __nv_fp8_e4m3 precision data.
Note that according to the cusparse documentation for the function cusparseCreateDnVec, it is safe to use const_cast to cast the input vector.
| [out] | cusparse_vector | Reference to CuSparse vector object to be created. |
| [in] | vector_size | Size of vector array |
| [in] | device_vector | Array data of vector on GPU device. |
A template wrapper for cusparseCreateDnVec for the __half precision data.
Note that according to the cusparse documentation for the function cusparseCreateDnVec, it is safe to use const_cast to cast the input vector.
| [out] | cusparse_vector | Reference to CuSparse vector object to be created. |
| [in] | vector_size | Size of vector array |
| [in] | device_vector | Array data of vector on GPU device. |
A template wrapper for cusparseCreateDnVec for the __nv_bfloat16 precision data.
Note that according to the cusparse documentation for the function cusparseCreateDnVec, it is safe to use const_cast to cast the input vector.
| [out] | cusparse_vector | Reference to CuSparse vector object to be created. |
| [in] | vector_size | Size of vector array |
| [in] | device_vector | Array data of vector on GPU device. |
A template wrapper for cusparseCreateDnVec for the float precision data.
Note that according to the cusparse documentation for the function cusparseCreateDnVec, it is safe to use const_cast to cast the input vector.
| [out] | cusparse_vector | Reference to CuSparse vector object to be created. |
| [in] | vector_size | Size of vector array |
| [in] | device_vector | Array data of vector on GPU device. |
Definition at line 1436 of file cusparse_api.cu.
References cusparseCreateDnVec().

| void cusparse_api::cusparse_matrix_buffer_size | ( | cusparseHandle_t | cusparse_handle, |
| cusparseOperation_t | cusparse_operation, | ||
| const DataType | alpha, | ||
| cusparseSpMatDescr_t | cusparse_matrix, | ||
| cusparseDnVecDescr_t | cusparse_input_vector, | ||
| const DataType | beta, | ||
| cusparseDnVecDescr_t | cusparse_output_vector, | ||
| cusparseSpMVAlg_t | algorithm, | ||
| size_t * | buffer_size | ||
| ) |
Referenced by cuCSCMatrix< DataType >::allocate_buffer(), and cuCSRMatrix< DataType >::allocate_buffer().

| void cusparse_api::cusparse_matrix_buffer_size< double > | ( | cusparseHandle_t | cusparse_handle, |
| cusparseOperation_t | cusparse_operation, | ||
| const double | alpha, | ||
| cusparseSpMatDescr_t | cusparse_matrix, | ||
| cusparseDnVecDescr_t | cusparse_input_vector, | ||
| const double | beta, | ||
| cusparseDnVecDescr_t | cusparse_output_vector, | ||
| cusparseSpMVAlg_t | algorithm, | ||
| size_t * | buffer_size | ||
| ) |
A template wrapper for cusparseSpMV_bufferSize for double precision data. This function determines the buffer size needed for matrix-vector multiplication using cusparseSpMV. The output is buffer_size variable.
| [in] | cusparse_handle | Handle to the CuSparse library context |
| [in] | cusparse_operation | Type of matrix operation. For non-transpose operation, this should be set to CUSPARSE_OPERATION_NON_TRANSPOSE and for transpose operation, this should be set to CUSPARSE_OPERATION_TRANSPOSE. |
| [in] | alpha | The scalar parameter \( \alpha \) in matrix-vector product. |
| [in] | cusparse_matrix | Cusparse object for matrix \( \mathbf{A} \). |
| [in] | cusparse_input_vector | Cusparse object for vector \( \boldsymbol{x} \). |
| [in] | beta | The scalar parameter \( \beta \) in matrix-vector product. |
| [in] | cusparse_output_vector | Cusparse object for vector \( \boldsymbol{y} \). |
| [in] | algorithm | Algorithm for the computation. Possible values can be CUSPARSE_SPMV_ALG_DEFAULT, CUSPARSE_SPMV_CSR_ALG1, and CUSPARSE_SPMV_CSR_ALG2. |
| [out] | buffer_size | The size of buffer needed for computation. |
Definition at line 1880 of file cusparse_api.cu.
References cusparseSpMV_bufferSize().

| void cusparse_api::cusparse_matrix_buffer_size< float > | ( | cusparseHandle_t | cusparse_handle, |
| cusparseOperation_t | cusparse_operation, | ||
| const float | alpha, | ||
| cusparseSpMatDescr_t | cusparse_matrix, | ||
| cusparseDnVecDescr_t | cusparse_input_vector, | ||
| const float | beta, | ||
| cusparseDnVecDescr_t | cusparse_output_vector, | ||
| cusparseSpMVAlg_t | algorithm, | ||
| size_t * | buffer_size | ||
| ) |
A template wrapper for cusparseSpMV_bufferSize for __nv_fp8_e5m2 precision data. This function determines the buffer size needed for matrix-vector multiplication using cusparseSpMV. The output is buffer_size variable.
Note that this function uses mixed-precision computation where the matrix and vectors are __nv_fp8_e5m2 type while the compute type is CUDA_R_32.
| [in] | cusparse_handle | Handle to the CuSparse library context |
| [in] | cusparse_operation | Type of matrix operation. For non-transpose operation, this should be set to CUSPARSE_OPERATION_NON_TRANSPOSE and for transpose operation, this should be set to CUSPARSE_OPERATION_TRANSPOSE. |
| [in] | alpha | The scalar parameter \( \alpha \) in matrix-vector product. |
| [in] | cusparse_matrix | Cusparse object for matrix \( \mathbf{A} \). |
| [in] | cusparse_input_vector | Cusparse object for vector \( \boldsymbol{x} \). |
| [in] | beta | The scalar parameter \( \beta \) in matrix-vector product. |
| [in] | cusparse_output_vector | Cusparse object for vector \( \boldsymbol{y} \). |
| [in] | algorithm | Algorithm for the computation. Possible values can be CUSPARSE_SPMV_ALG_DEFAULT, CUSPARSE_SPMV_CSR_ALG1, and CUSPARSE_SPMV_CSR_ALG2. |
| [out] | buffer_size | The size of buffer needed for computation. |
A template wrapper for cusparseSpMV_bufferSize for __nv_fp8_e4m3 precision data. This function determines the buffer size needed for matrix-vector multiplication using cusparseSpMV. The output is buffer_size variable.
Note that this function uses mixed-precision computation where the matrix and vectors are __nv_fp8_e4m3 type while the compute type is CUDA_R_32.
| [in] | cusparse_handle | Handle to the CuSparse library context |
| [in] | cusparse_operation | Type of matrix operation. For non-transpose operation, this should be set to CUSPARSE_OPERATION_NON_TRANSPOSE and for transpose operation, this should be set to CUSPARSE_OPERATION_TRANSPOSE. |
| [in] | alpha | The scalar parameter \( \alpha \) in matrix-vector product. |
| [in] | cusparse_matrix | Cusparse object for matrix \( \mathbf{A} \). |
| [in] | cusparse_input_vector | Cusparse object for vector \( \boldsymbol{x} \). |
| [in] | beta | The scalar parameter \( \beta \) in matrix-vector product. |
| [in] | cusparse_output_vector | Cusparse object for vector \( \boldsymbol{y} \). |
| [in] | algorithm | Algorithm for the computation. Possible values can be CUSPARSE_SPMV_ALG_DEFAULT, CUSPARSE_SPMV_CSR_ALG1, and CUSPARSE_SPMV_CSR_ALG2. |
| [out] | buffer_size | The size of buffer needed for computation. |
A template wrapper for cusparseSpMV_bufferSize for __half precision data. This function determines the buffer size needed for matrix-vector multiplication using cusparseSpMV. The output is buffer_size variable.
Note that this function uses mixed-precision computation where the matrix and vectors are __half type while the compute type is CUDA_R_32.
| [in] | cusparse_handle | Handle to the CuSparse library context |
| [in] | cusparse_operation | Type of matrix operation. For non-transpose operation, this should be set to CUSPARSE_OPERATION_NON_TRANSPOSE and for transpose operation, this should be set to CUSPARSE_OPERATION_TRANSPOSE. |
| [in] | alpha | The scalar parameter \( \alpha \) in matrix-vector product. |
| [in] | cusparse_matrix | Cusparse object for matrix \( \mathbf{A} \). |
| [in] | cusparse_input_vector | Cusparse object for vector \( \boldsymbol{x} \). |
| [in] | beta | The scalar parameter \( \beta \) in matrix-vector product. |
| [in] | cusparse_output_vector | Cusparse object for vector \( \boldsymbol{y} \). |
| [in] | algorithm | Algorithm for the computation. Possible values can be CUSPARSE_SPMV_ALG_DEFAULT, CUSPARSE_SPMV_CSR_ALG1, and CUSPARSE_SPMV_CSR_ALG2. |
| [out] | buffer_size | The size of buffer needed for computation. |
A template wrapper for cusparseSpMV_bufferSize for __nv_bfloat16 precision data. This function determines the buffer size needed for matrix-vector multiplication using cusparseSpMV. The output is buffer_size variable.
Note that this function uses mixed-precision computation where the matrix and vectors are __nv_bfloat16 type while the compute type is CUDA_R_32.
| [in] | cusparse_handle | Handle to the CuSparse library context |
| [in] | cusparse_operation | Type of matrix operation. For non-transpose operation, this should be set to CUSPARSE_OPERATION_NON_TRANSPOSE and for transpose operation, this should be set to CUSPARSE_OPERATION_TRANSPOSE. |
| [in] | alpha | The scalar parameter \( \alpha \) in matrix-vector product. |
| [in] | cusparse_matrix | Cusparse object for matrix \( \mathbf{A} \). |
| [in] | cusparse_input_vector | Cusparse object for vector \( \boldsymbol{x} \). |
| [in] | beta | The scalar parameter \( \beta \) in matrix-vector product. |
| [in] | cusparse_output_vector | Cusparse object for vector \( \boldsymbol{y} \). |
| [in] | algorithm | Algorithm for the computation. Possible values can be CUSPARSE_SPMV_ALG_DEFAULT, CUSPARSE_SPMV_CSR_ALG1, and CUSPARSE_SPMV_CSR_ALG2. |
| [out] | buffer_size | The size of buffer needed for computation. |
A template wrapper for cusparseSpMV_bufferSize for float precision data. This function determines the buffer size needed for matrix-vector multiplication using cusparseSpMV. The output is buffer_size variable.
| [in] | cusparse_handle | Handle to the CuSparse library context |
| [in] | cusparse_operation | Type of matrix operation. For non-transpose operation, this should be set to CUSPARSE_OPERATION_NON_TRANSPOSE and for transpose operation, this should be set to CUSPARSE_OPERATION_TRANSPOSE. |
| [in] | alpha | The scalar parameter \( \alpha \) in matrix-vector product. |
| [in] | cusparse_matrix | Cusparse object for matrix \( \mathbf{A} \). |
| [in] | cusparse_input_vector | Cusparse object for vector \( \boldsymbol{x} \). |
| [in] | beta | The scalar parameter \( \beta \) in matrix-vector product. |
| [in] | cusparse_output_vector | Cusparse object for vector \( \boldsymbol{y} \). |
| [in] | algorithm | Algorithm for the computation. Possible values can be CUSPARSE_SPMV_ALG_DEFAULT, CUSPARSE_SPMV_CSR_ALG1, and CUSPARSE_SPMV_CSR_ALG2. |
| [out] | buffer_size | The size of buffer needed for computation. |
Definition at line 1820 of file cusparse_api.cu.
References cusparseSpMV_bufferSize().

| void cusparse_api::cusparse_matvec | ( | cusparseHandle_t | cusparse_handle, |
| cusparseOperation_t | cusparse_operation, | ||
| const DataType | alpha, | ||
| cusparseSpMatDescr_t | cusparse_matrix, | ||
| cusparseDnVecDescr_t | cusparse_input_vector, | ||
| const DataType | beta, | ||
| cusparseDnVecDescr_t | cusparse_output_vector, | ||
| cusparseSpMVAlg_t | algorithm, | ||
| void * | external_buffer | ||
| ) |
Referenced by cuCSCMatrix< DataType >::dot(), cuCSRMatrix< DataType >::dot(), cuCSCMatrix< DataType >::dot_plus(), cuCSRMatrix< DataType >::dot_plus(), cuCSCMatrix< DataType >::transpose_dot(), cuCSRMatrix< DataType >::transpose_dot(), cuCSCMatrix< DataType >::transpose_dot_plus(), and cuCSRMatrix< DataType >::transpose_dot_plus().

| void cusparse_api::cusparse_matvec< double > | ( | cusparseHandle_t | cusparse_handle, |
| cusparseOperation_t | cusparse_operation, | ||
| const double | alpha, | ||
| cusparseSpMatDescr_t | cusparse_matrix, | ||
| cusparseDnVecDescr_t | cusparse_input_vector, | ||
| const double | beta, | ||
| cusparseDnVecDescr_t | cusparse_output_vector, | ||
| cusparseSpMVAlg_t | algorithm, | ||
| void * | external_buffer | ||
| ) |
A wrapper for cusparseSpMV to perform sparse matrix-vector multiplication using double precision data.
| [in] | cusparse_handle | Handle to the CuSparse library context |
| [in] | cusparse_operation | Type of matrix operation. For non-transpose operation, this should be set to CUSPARSE_OPERATION_NON_TRANSPOSE and for transpose operation, this should be set to CUSPARSE_OPERATION_TRANSPOSE. |
| [in] | alpha | The scalar parameter \( \alpha \) in matrix-vector product. |
| [in] | cusparse_matrix | Cusparse object for matrix \( \mathbf{A} \). |
| [in] | cusparse_input_vector | Cusparse object for vector \( \boldsymbol{x} \). |
| [in] | beta | The scalar parameter \( \beta \) in matrix-vector product. |
| [out] | cusparse_output_vector | Cusparse object for vector \( \boldsymbol{y} \). |
| [in] | algorithm | Algorithm for the computation. Possible values can be CUSPARSE_SPMV_ALG_DEFAULT, CUSPARSE_SPMV_CSR_ALG1, and CUSPARSE_SPMV_CSR_ALG2. |
| [in] | external_buffer | Buffer on GPU device needed for computation. |
Definition at line 2251 of file cusparse_api.cu.
References cusparseSpMV().

| void cusparse_api::cusparse_matvec< float > | ( | cusparseHandle_t | cusparse_handle, |
| cusparseOperation_t | cusparse_operation, | ||
| const float | alpha, | ||
| cusparseSpMatDescr_t | cusparse_matrix, | ||
| cusparseDnVecDescr_t | cusparse_input_vector, | ||
| const float | beta, | ||
| cusparseDnVecDescr_t | cusparse_output_vector, | ||
| cusparseSpMVAlg_t | algorithm, | ||
| void * | external_buffer | ||
| ) |
A wrapper for cusparseSpMV to perform sparse matrix-vector multiplication using __nv_fp8_e5m2 precision data.
Note that this function uses mixed-precision computation where the matrix and vectors are __nv_fp8_e5m2 type while the compute type is CUDA_R_32.
| [in] | cusparse_handle | Handle to the CuSparse library context |
| [in] | cusparse_operation | Type of matrix operation. For non-transpose operation, this should be set to CUSPARSE_OPERATION_NON_TRANSPOSE and for transpose operation, this should be set to CUSPARSE_OPERATION_TRANSPOSE. |
| [in] | alpha | The scalar parameter \( \alpha \) in matrix-vector product. |
| [in] | cusparse_matrix | Cusparse object for matrix \( \mathbf{A} \). |
| [in] | cusparse_input_vector | Cusparse object for vector \( \boldsymbol{x} \). |
| [in] | beta | The scalar parameter \( \beta \) in matrix-vector product. |
| [out] | cusparse_output_vector | Cusparse object for vector \( \boldsymbol{y} \). |
| [in] | algorithm | Algorithm for the computation. Possible values can be CUSPARSE_SPMV_ALG_DEFAULT, CUSPARSE_SPMV_CSR_ALG1, and CUSPARSE_SPMV_CSR_ALG2. |
| [in] | external_buffer | Buffer on GPU device needed for computation. |
A wrapper for cusparseSpMV to perform sparse matrix-vector multiplication using __nv_fp8_e4m3 precision data.
Note that this function uses mixed-precision computation where the matrix and vectors are __nv_fp8_e4m3 type while the compute type is CUDA_R_32.
| [in] | cusparse_handle | Handle to the CuSparse library context |
| [in] | cusparse_operation | Type of matrix operation. For non-transpose operation, this should be set to CUSPARSE_OPERATION_NON_TRANSPOSE and for transpose operation, this should be set to CUSPARSE_OPERATION_TRANSPOSE. |
| [in] | alpha | The scalar parameter \( \alpha \) in matrix-vector product. |
| [in] | cusparse_matrix | Cusparse object for matrix \( \mathbf{A} \). |
| [in] | cusparse_input_vector | Cusparse object for vector \( \boldsymbol{x} \). |
| [in] | beta | The scalar parameter \( \beta \) in matrix-vector product. |
| [out] | cusparse_output_vector | Cusparse object for vector \( \boldsymbol{y} \). |
| [in] | algorithm | Algorithm for the computation. Possible values can be CUSPARSE_SPMV_ALG_DEFAULT, CUSPARSE_SPMV_CSR_ALG1, and CUSPARSE_SPMV_CSR_ALG2. |
| [in] | external_buffer | Buffer on GPU device needed for computation. |
A wrapper for cusparseSpMV to perform sparse matrix-vector multiplication using __half precision data.
Note that this function uses mixed-precision computation where the matrix and vectors are __half type while the compute type is CUDA_R_32.
| [in] | cusparse_handle | Handle to the CuSparse library context |
| [in] | cusparse_operation | Type of matrix operation. For non-transpose operation, this should be set to CUSPARSE_OPERATION_NON_TRANSPOSE and for transpose operation, this should be set to CUSPARSE_OPERATION_TRANSPOSE. |
| [in] | alpha | The scalar parameter \( \alpha \) in matrix-vector product. |
| [in] | cusparse_matrix | Cusparse object for matrix \( \mathbf{A} \). |
| [in] | cusparse_input_vector | Cusparse object for vector \( \boldsymbol{x} \). |
| [in] | beta | The scalar parameter \( \beta \) in matrix-vector product. |
| [out] | cusparse_output_vector | Cusparse object for vector \( \boldsymbol{y} \). |
| [in] | algorithm | Algorithm for the computation. Possible values can be CUSPARSE_SPMV_ALG_DEFAULT, CUSPARSE_SPMV_CSR_ALG1, and CUSPARSE_SPMV_CSR_ALG2. |
| [in] | external_buffer | Buffer on GPU device needed for computation. |
A wrapper for cusparseSpMV to perform sparse matrix-vector multiplication using __nv_bfloat16 precision data.
Note that this function uses mixed-precision computation where the matrix and vectors are __nv_bfloat16 type while the compute type is CUDA_R_32.
| [in] | cusparse_handle | Handle to the CuSparse library context |
| [in] | cusparse_operation | Type of matrix operation. For non-transpose operation, this should be set to CUSPARSE_OPERATION_NON_TRANSPOSE and for transpose operation, this should be set to CUSPARSE_OPERATION_TRANSPOSE. |
| [in] | alpha | The scalar parameter \( \alpha \) in matrix-vector product. |
| [in] | cusparse_matrix | Cusparse object for matrix \( \mathbf{A} \). |
| [in] | cusparse_input_vector | Cusparse object for vector \( \boldsymbol{x} \). |
| [in] | beta | The scalar parameter \( \beta \) in matrix-vector product. |
| [out] | cusparse_output_vector | Cusparse object for vector \( \boldsymbol{y} \). |
| [in] | algorithm | Algorithm for the computation. Possible values can be CUSPARSE_SPMV_ALG_DEFAULT, CUSPARSE_SPMV_CSR_ALG1, and CUSPARSE_SPMV_CSR_ALG2. |
| [in] | external_buffer | Buffer on GPU device needed for computation. |
A wrapper for cusparseSpMV to perform sparse matrix-vector multiplication using float precision data.
| [in] | cusparse_handle | Handle to the CuSparse library context |
| [in] | cusparse_operation | Type of matrix operation. For non-transpose operation, this should be set to CUSPARSE_OPERATION_NON_TRANSPOSE and for transpose operation, this should be set to CUSPARSE_OPERATION_TRANSPOSE. |
| [in] | alpha | The scalar parameter \( \alpha \) in matrix-vector product. |
| [in] | cusparse_matrix | Cusparse object for matrix \( \mathbf{A} \). |
| [in] | cusparse_input_vector | Cusparse object for vector \( \boldsymbol{x} \). |
| [in] | beta | The scalar parameter \( \beta \) in matrix-vector product. |
| [out] | cusparse_output_vector | Cusparse object for vector \( \boldsymbol{y} \). |
| [in] | algorithm | Algorithm for the computation. Possible values can be CUSPARSE_SPMV_ALG_DEFAULT, CUSPARSE_SPMV_CSR_ALG1, and CUSPARSE_SPMV_CSR_ALG2. |
| [in] | external_buffer | Buffer on GPU device needed for computation. |
Definition at line 2189 of file cusparse_api.cu.
References cusparseSpMV().

| void cusparse_api::destroy_cusparse_matrix | ( | cusparseSpMatDescr_t & | cusparse_matrix | ) |
Destroy cusparse matrix.
This function is a wrapper for cusparseDestroySpMat.
| [out] | cusparse_matrix | Reference to CuSparse matrix object to be destroyed. |
Definition at line 1501 of file cusparse_api.cu.
References cusparseDestroySpMat().
Referenced by cuCSCMatrix< DataType >::~cuCSCMatrix(), and cuCSRMatrix< DataType >::~cuCSRMatrix().


| void cusparse_api::destroy_cusparse_vector | ( | cusparseDnVecDescr_t & | cusparse_vector | ) |
Destroys cusparse vector.
This function is a wrapper for cusparseDestroyDnVec.
| [out] | cusparse_vector | Reference to CuSparse vector object to be destroyed. |
Definition at line 1523 of file cusparse_api.cu.
References cusparseDestroyDnVec().
Referenced by cuCSCMatrix< DataType >::dot(), cuCSRMatrix< DataType >::dot(), cuCSCMatrix< DataType >::dot_plus(), cuCSRMatrix< DataType >::dot_plus(), cuCSCMatrix< DataType >::transpose_dot(), cuCSRMatrix< DataType >::transpose_dot(), cuCSCMatrix< DataType >::transpose_dot_plus(), and cuCSRMatrix< DataType >::transpose_dot_plus().

