Skip to main content

cusparseCreateSpVec

Function cusparseCreateSpVec 

Source
pub unsafe extern "C" fn cusparseCreateSpVec(
    spVecDescr: *mut cusparseSpVecDescr_t,
    size: i64,
    nnz: i64,
    indices: *mut c_void,
    values: *mut c_void,
    idxType: cusparseIndexType_t,
    idxBase: cusparseIndexBase_t,
    valueType: cudaDataType,
) -> cusparseStatus_t
Expand description

This function initializes the sparse matrix descriptor spVecDescr.

cusparseCreateSpVec has the following constraints:

  • indices and values must be aligned to the size of the datatypes specified by idxType and valueType, respectively. See cudaDataType_t for the description of the datatypes.

ยงParameters

  • spVecDescr: Sparse vector descriptor.
  • size: Size of the sparse vector.
  • nnz: Number of non-zero entries of the sparse vector.
  • indices: Indices of the sparse vector. Array with nnz elements.
  • values: Values of the sparse vector. Array with nnz elements.
  • idxType: Enumerator specifying the data type of indices.
  • idxBase: Enumerator specifying the index base of indices.
  • valueType: Enumerator specifying the datatype of values.