pub unsafe extern "C" fn cusparseCreateCsr(
spMatDescr: *mut cusparseSpMatDescr_t,
rows: i64,
cols: i64,
nnz: i64,
csrRowOffsets: *mut c_void,
csrColInd: *mut c_void,
csrValues: *mut c_void,
csrRowOffsetsType: cusparseIndexType_t,
csrColIndType: cusparseIndexType_t,
idxBase: cusparseIndexBase_t,
valueType: cudaDataType,
) -> cusparseStatus_tExpand description
This function initializes the sparse matrix descriptor spMatDescr in the CSR format.
cusparseCreateCsr has the following constraints:
csrRowOffsets,csrColInd, andcsrValuesmust be aligned to the size of the datatypes specified bycsrRowOffsetsType,csrColIndType, andvalueType, respectively. SeecudaDataType_tfor the description of the datatypes.
ยงParameters
spMatDescr: Sparse matrix descriptor.rows: Number of rows of the sparse matrix.cols: Number of columns of the sparse matrix.nnz: Number of non-zero entries of the sparse matrix.csrRowOffsets: Row offsets of the sparse matrix. Array withrows + 1elements.csrColInd: Column indices of the sparse matrix. Array withnnzelements.csrValues: Values of the sparse matrix. Array withnnzelements.csrRowOffsetsType: Data type ofcsrRowOffsets.csrColIndType: Data type ofcsrColInd.idxBase: Index base ofcsrRowOffsetsandcsrColInd.valueType: Datatype ofcsrValues.