Skip to main content

cusparseCreateCsc

Function cusparseCreateCsc 

Source
pub unsafe extern "C" fn cusparseCreateCsc(
    spMatDescr: *mut cusparseSpMatDescr_t,
    rows: i64,
    cols: i64,
    nnz: i64,
    cscColOffsets: *mut c_void,
    cscRowInd: *mut c_void,
    cscValues: *mut c_void,
    cscColOffsetsType: cusparseIndexType_t,
    cscRowIndType: cusparseIndexType_t,
    idxBase: cusparseIndexBase_t,
    valueType: cudaDataType,
) -> cusparseStatus_t
Expand description

This function initializes the sparse matrix descriptor spMatDescr in the CSC format.

cusparseCreateCsc has the following constraints:

  • cscColOffsets, cscRowInd, and cscValues must be aligned to the size of the datatypes specified by cscColOffsetsType, cscRowIndType, and valueType, respectively. See cudaDataType_t for 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.
  • cscColOffsets: Column offsets of the sparse matrix. Array with cols + 1 elements.
  • cscRowInd: Row indices of the sparse matrix. Array with nnz elements.
  • cscValues: Values of the sparse matrix. Array with nnz elements.
  • cscColOffsetsType: Data type of cscColOffsets.
  • cscRowIndType: Data type of cscRowInd.
  • idxBase: Index base of cscColOffsets and cscRowInd.
  • valueType: Datatype of cscValues.