Skip to main content

cusparseCreateCoo

Function cusparseCreateCoo 

Source
pub unsafe extern "C" fn cusparseCreateCoo(
    spMatDescr: *mut cusparseSpMatDescr_t,
    rows: i64,
    cols: i64,
    nnz: i64,
    cooRowInd: *mut c_void,
    cooColInd: *mut c_void,
    cooValues: *mut c_void,
    cooIdxType: cusparseIndexType_t,
    idxBase: cusparseIndexBase_t,
    valueType: cudaDataType,
) -> cusparseStatus_t
Expand description

This function initializes the sparse matrix descriptor spMatDescr in the COO format (Structure of Arrays layout).

cusparseCreateCoo has the following constraints:

  • cooRowInd, cooColInd, and cooValues must be aligned to the size of the datatypes specified by cooIdxType, cooIdxType, 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.
  • cooRowInd: Row indices of the sparse matrix. Array with nnz elements.
  • cooColInd: Column indices of the sparse matrix. Array with nnz elements.
  • cooValues: Values of the sparse matrix. Array with nnz elements.
  • cooIdxType: Data type of cooRowInd and cooColInd.
  • idxBase: Index base of cooRowInd and cooColInd.
  • valueType: Datatype of cooValues.