pub struct Cusparse { /* private fields */ }Expand description
Loaded cuSPARSE shared library plus a per-symbol OnceLock of function pointers.
Implementations§
Source§impl Cusparse
impl Cusparse
Sourcepub fn cusparse_create(&self) -> Result<PFN_cusparseCreate, LoaderError>
pub fn cusparse_create(&self) -> Result<PFN_cusparseCreate, LoaderError>
cuSPARSE: create a cuSPARSE handle. See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_destroy(&self) -> Result<PFN_cusparseDestroy, LoaderError>
pub fn cusparse_destroy(&self) -> Result<PFN_cusparseDestroy, LoaderError>
cuSPARSE: destroy a cuSPARSE handle. See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_set_stream(&self) -> Result<PFN_cusparseSetStream, LoaderError>
pub fn cusparse_set_stream(&self) -> Result<PFN_cusparseSetStream, LoaderError>
cuSPARSE: bind a CUDA stream to a cuSPARSE handle. See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_get_version(
&self,
) -> Result<PFN_cusparseGetVersion, LoaderError>
pub fn cusparse_get_version( &self, ) -> Result<PFN_cusparseGetVersion, LoaderError>
cuSPARSE: return the cuSPARSE library version. See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_create_csr(&self) -> Result<PFN_cusparseCreateCsr, LoaderError>
pub fn cusparse_create_csr(&self) -> Result<PFN_cusparseCreateCsr, LoaderError>
cuSPARSE: create a CSR sparse-matrix descriptor. See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_create_csc(&self) -> Result<PFN_cusparseCreateCsc, LoaderError>
pub fn cusparse_create_csc(&self) -> Result<PFN_cusparseCreateCsc, LoaderError>
cuSPARSE: create a CSC sparse-matrix descriptor. See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_create_coo(&self) -> Result<PFN_cusparseCreateCoo, LoaderError>
pub fn cusparse_create_coo(&self) -> Result<PFN_cusparseCreateCoo, LoaderError>
cuSPARSE: create a COO sparse-matrix descriptor. See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_create_bsr(&self) -> Result<PFN_cusparseCreateBsr, LoaderError>
pub fn cusparse_create_bsr(&self) -> Result<PFN_cusparseCreateBsr, LoaderError>
cuSPARSE: create a BSR sparse-matrix descriptor. See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_destroy_sp_mat(
&self,
) -> Result<PFN_cusparseDestroySpMat, LoaderError>
pub fn cusparse_destroy_sp_mat( &self, ) -> Result<PFN_cusparseDestroySpMat, LoaderError>
cuSPARSE: destroy a sparse-matrix descriptor. See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_sp_mat_get_size(
&self,
) -> Result<PFN_cusparseSpMatGetSize, LoaderError>
pub fn cusparse_sp_mat_get_size( &self, ) -> Result<PFN_cusparseSpMatGetSize, LoaderError>
cuSPARSE: query rows, cols, and nnz of a sparse-matrix descriptor. See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_sp_mat_set_attribute(
&self,
) -> Result<PFN_cusparseSpMatSetAttribute, LoaderError>
pub fn cusparse_sp_mat_set_attribute( &self, ) -> Result<PFN_cusparseSpMatSetAttribute, LoaderError>
cuSPARSE: set an attribute (fill mode, diag type) on a sparse-matrix descriptor. See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_csr_set_pointers(
&self,
) -> Result<PFN_cusparseCsrSetPointers, LoaderError>
pub fn cusparse_csr_set_pointers( &self, ) -> Result<PFN_cusparseCsrSetPointers, LoaderError>
cuSPARSE: replace the row/column/value pointers on a CSR descriptor. See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_csc_set_pointers(
&self,
) -> Result<PFN_cusparseCscSetPointers, LoaderError>
pub fn cusparse_csc_set_pointers( &self, ) -> Result<PFN_cusparseCscSetPointers, LoaderError>
cuSPARSE: replace the column/row/value pointers on a CSC descriptor. See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_coo_set_pointers(
&self,
) -> Result<PFN_cusparseCooSetPointers, LoaderError>
pub fn cusparse_coo_set_pointers( &self, ) -> Result<PFN_cusparseCooSetPointers, LoaderError>
cuSPARSE: replace the row/column/value pointers on a COO descriptor. See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_create_dn_vec(
&self,
) -> Result<PFN_cusparseCreateDnVec, LoaderError>
pub fn cusparse_create_dn_vec( &self, ) -> Result<PFN_cusparseCreateDnVec, LoaderError>
cuSPARSE: create a dense-vector descriptor. See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_destroy_dn_vec(
&self,
) -> Result<PFN_cusparseDestroyDnVec, LoaderError>
pub fn cusparse_destroy_dn_vec( &self, ) -> Result<PFN_cusparseDestroyDnVec, LoaderError>
cuSPARSE: destroy a dense-vector descriptor. See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_create_dn_mat(
&self,
) -> Result<PFN_cusparseCreateDnMat, LoaderError>
pub fn cusparse_create_dn_mat( &self, ) -> Result<PFN_cusparseCreateDnMat, LoaderError>
cuSPARSE: create a dense-matrix descriptor. See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_destroy_dn_mat(
&self,
) -> Result<PFN_cusparseDestroyDnMat, LoaderError>
pub fn cusparse_destroy_dn_mat( &self, ) -> Result<PFN_cusparseDestroyDnMat, LoaderError>
cuSPARSE: destroy a dense-matrix descriptor. See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_spmv_buffer_size(
&self,
) -> Result<PFN_cusparseSpMV_bufferSize, LoaderError>
pub fn cusparse_spmv_buffer_size( &self, ) -> Result<PFN_cusparseSpMV_bufferSize, LoaderError>
cuSPARSE: workspace-size query for sparse matrix-vector multiplication. See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_spmv(&self) -> Result<PFN_cusparseSpMV, LoaderError>
pub fn cusparse_spmv(&self) -> Result<PFN_cusparseSpMV, LoaderError>
cuSPARSE: sparse matrix-vector multiplication. See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_spmm_buffer_size(
&self,
) -> Result<PFN_cusparseSpMM_bufferSize, LoaderError>
pub fn cusparse_spmm_buffer_size( &self, ) -> Result<PFN_cusparseSpMM_bufferSize, LoaderError>
cuSPARSE: workspace-size query for sparse matrix × dense matrix multiplication. See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_spmm_preprocess(
&self,
) -> Result<PFN_cusparseSpMM_preprocess, LoaderError>
pub fn cusparse_spmm_preprocess( &self, ) -> Result<PFN_cusparseSpMM_preprocess, LoaderError>
cuSPARSE: preprocess stage of sparse matrix × dense matrix multiplication. See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_spmm(&self) -> Result<PFN_cusparseSpMM, LoaderError>
pub fn cusparse_spmm(&self) -> Result<PFN_cusparseSpMM, LoaderError>
cuSPARSE: sparse matrix × dense matrix multiplication. See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_spgemm_create_descr(
&self,
) -> Result<PFN_cusparseSpGEMM_createDescr, LoaderError>
pub fn cusparse_spgemm_create_descr( &self, ) -> Result<PFN_cusparseSpGEMM_createDescr, LoaderError>
cuSPARSE: create an opaque descriptor for sparse matrix × sparse matrix multiplication. See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_spgemm_destroy_descr(
&self,
) -> Result<PFN_cusparseSpGEMM_destroyDescr, LoaderError>
pub fn cusparse_spgemm_destroy_descr( &self, ) -> Result<PFN_cusparseSpGEMM_destroyDescr, LoaderError>
cuSPARSE: destroy an opaque descriptor for sparse matrix × sparse matrix multiplication. See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_spgemm_work_estimation(
&self,
) -> Result<PFN_cusparseSpGEMM_workEstimation, LoaderError>
pub fn cusparse_spgemm_work_estimation( &self, ) -> Result<PFN_cusparseSpGEMM_workEstimation, LoaderError>
cuSPARSE: work-estimation stage of sparse matrix × sparse matrix multiplication. See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_spgemm_compute(
&self,
) -> Result<PFN_cusparseSpGEMM_compute, LoaderError>
pub fn cusparse_spgemm_compute( &self, ) -> Result<PFN_cusparseSpGEMM_compute, LoaderError>
cuSPARSE: compute stage of sparse matrix × sparse matrix multiplication. See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_spgemm_copy(
&self,
) -> Result<PFN_cusparseSpGEMM_copy, LoaderError>
pub fn cusparse_spgemm_copy( &self, ) -> Result<PFN_cusparseSpGEMM_copy, LoaderError>
cuSPARSE: copy stage of sparse matrix × sparse matrix multiplication. See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_spsv_create_descr(
&self,
) -> Result<PFN_cusparseSpSV_createDescr, LoaderError>
pub fn cusparse_spsv_create_descr( &self, ) -> Result<PFN_cusparseSpSV_createDescr, LoaderError>
cuSPARSE: create an opaque descriptor for sparse triangular linear solve (single right-hand side). See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_spsv_destroy_descr(
&self,
) -> Result<PFN_cusparseSpSV_destroyDescr, LoaderError>
pub fn cusparse_spsv_destroy_descr( &self, ) -> Result<PFN_cusparseSpSV_destroyDescr, LoaderError>
cuSPARSE: destroy an opaque descriptor for sparse triangular linear solve (single right-hand side). See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_spsv_buffer_size(
&self,
) -> Result<PFN_cusparseSpSV_bufferSize, LoaderError>
pub fn cusparse_spsv_buffer_size( &self, ) -> Result<PFN_cusparseSpSV_bufferSize, LoaderError>
cuSPARSE: workspace-size query for sparse triangular linear solve (single right-hand side). See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_spsv_analysis(
&self,
) -> Result<PFN_cusparseSpSV_analysis, LoaderError>
pub fn cusparse_spsv_analysis( &self, ) -> Result<PFN_cusparseSpSV_analysis, LoaderError>
cuSPARSE: analysis stage of sparse triangular linear solve (single right-hand side). See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_spsv_solve(&self) -> Result<PFN_cusparseSpSV_solve, LoaderError>
pub fn cusparse_spsv_solve(&self) -> Result<PFN_cusparseSpSV_solve, LoaderError>
cuSPARSE: solve stage of sparse triangular linear solve (single right-hand side). See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_spsm_create_descr(
&self,
) -> Result<PFN_cusparseSpSM_createDescr, LoaderError>
pub fn cusparse_spsm_create_descr( &self, ) -> Result<PFN_cusparseSpSM_createDescr, LoaderError>
cuSPARSE: create an opaque descriptor for sparse triangular linear solve (multiple right-hand sides). See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_spsm_destroy_descr(
&self,
) -> Result<PFN_cusparseSpSM_destroyDescr, LoaderError>
pub fn cusparse_spsm_destroy_descr( &self, ) -> Result<PFN_cusparseSpSM_destroyDescr, LoaderError>
cuSPARSE: destroy an opaque descriptor for sparse triangular linear solve (multiple right-hand sides). See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_spsm_buffer_size(
&self,
) -> Result<PFN_cusparseSpSM_bufferSize, LoaderError>
pub fn cusparse_spsm_buffer_size( &self, ) -> Result<PFN_cusparseSpSM_bufferSize, LoaderError>
cuSPARSE: workspace-size query for sparse triangular linear solve (multiple right-hand sides). See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_spsm_analysis(
&self,
) -> Result<PFN_cusparseSpSM_analysis, LoaderError>
pub fn cusparse_spsm_analysis( &self, ) -> Result<PFN_cusparseSpSM_analysis, LoaderError>
cuSPARSE: analysis stage of sparse triangular linear solve (multiple right-hand sides). See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_spsm_solve(&self) -> Result<PFN_cusparseSpSM_solve, LoaderError>
pub fn cusparse_spsm_solve(&self) -> Result<PFN_cusparseSpSM_solve, LoaderError>
cuSPARSE: solve stage of sparse triangular linear solve (multiple right-hand sides). See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_sddmm_buffer_size(
&self,
) -> Result<PFN_cusparseSDDMM_bufferSize, LoaderError>
pub fn cusparse_sddmm_buffer_size( &self, ) -> Result<PFN_cusparseSDDMM_bufferSize, LoaderError>
cuSPARSE: workspace-size query for sampled dense-dense matrix multiplication. See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_sddmm_preprocess(
&self,
) -> Result<PFN_cusparseSDDMM_preprocess, LoaderError>
pub fn cusparse_sddmm_preprocess( &self, ) -> Result<PFN_cusparseSDDMM_preprocess, LoaderError>
cuSPARSE: preprocess stage of sampled dense-dense matrix multiplication. See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_sddmm(&self) -> Result<PFN_cusparseSDDMM, LoaderError>
pub fn cusparse_sddmm(&self) -> Result<PFN_cusparseSDDMM, LoaderError>
cuSPARSE: sampled dense-dense matrix multiplication. See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_csr2csc_ex2_buffer_size(
&self,
) -> Result<PFN_cusparseCsr2cscEx2_bufferSize, LoaderError>
pub fn cusparse_csr2csc_ex2_buffer_size( &self, ) -> Result<PFN_cusparseCsr2cscEx2_bufferSize, LoaderError>
cuSPARSE: workspace-size query for cusparseCsr2cscEx2. See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_csr2csc_ex2(
&self,
) -> Result<PFN_cusparseCsr2cscEx2, LoaderError>
pub fn cusparse_csr2csc_ex2( &self, ) -> Result<PFN_cusparseCsr2cscEx2, LoaderError>
cuSPARSE: convert a CSR matrix to CSC (extended API). See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_sparse_to_dense_buffer_size(
&self,
) -> Result<PFN_cusparseSparseToDense_bufferSize, LoaderError>
pub fn cusparse_sparse_to_dense_buffer_size( &self, ) -> Result<PFN_cusparseSparseToDense_bufferSize, LoaderError>
cuSPARSE: workspace-size query for sparse-to-dense conversion. See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_sparse_to_dense(
&self,
) -> Result<PFN_cusparseSparseToDense, LoaderError>
pub fn cusparse_sparse_to_dense( &self, ) -> Result<PFN_cusparseSparseToDense, LoaderError>
cuSPARSE: materialize a sparse matrix into a dense one. See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_dense_to_sparse_buffer_size(
&self,
) -> Result<PFN_cusparseDenseToSparse_bufferSize, LoaderError>
pub fn cusparse_dense_to_sparse_buffer_size( &self, ) -> Result<PFN_cusparseDenseToSparse_bufferSize, LoaderError>
cuSPARSE: workspace-size query for dense-to-sparse conversion. See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_dense_to_sparse_analysis(
&self,
) -> Result<PFN_cusparseDenseToSparse_analysis, LoaderError>
pub fn cusparse_dense_to_sparse_analysis( &self, ) -> Result<PFN_cusparseDenseToSparse_analysis, LoaderError>
cuSPARSE: analysis stage for dense-to-sparse conversion. See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_dense_to_sparse_convert(
&self,
) -> Result<PFN_cusparseDenseToSparse_convert, LoaderError>
pub fn cusparse_dense_to_sparse_convert( &self, ) -> Result<PFN_cusparseDenseToSparse_convert, LoaderError>
cuSPARSE: execute stage for dense-to-sparse conversion. See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_axpby(&self) -> Result<PFN_cusparseAxpby, LoaderError>
pub fn cusparse_axpby(&self) -> Result<PFN_cusparseAxpby, LoaderError>
cuSPARSE: scaled vector addition (alphax + betay → y). See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_gather(&self) -> Result<PFN_cusparseGather, LoaderError>
pub fn cusparse_gather(&self) -> Result<PFN_cusparseGather, LoaderError>
cuSPARSE: gather dense entries into a sparse vector. See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_scatter(&self) -> Result<PFN_cusparseScatter, LoaderError>
pub fn cusparse_scatter(&self) -> Result<PFN_cusparseScatter, LoaderError>
cuSPARSE: scatter sparse vector entries into a dense vector. See https://docs.nvidia.com/cuda/cusparse/index.html.
Sourcepub fn cusparse_rot(&self) -> Result<PFN_cusparseRot, LoaderError>
pub fn cusparse_rot(&self) -> Result<PFN_cusparseRot, LoaderError>
cuSPARSE: Givens-rotation on sparse and dense vector pair. See https://docs.nvidia.com/cuda/cusparse/index.html.