pub unsafe extern "C" fn cusparseSpVV(
handle: cusparseHandle_t,
opX: cusparseOperation_t,
vecX: cusparseConstSpVecDescr_t,
vecY: cusparseConstDnVecDescr_t,
result: *mut c_void,
computeType: cudaDataType,
externalBuffer: *mut c_void,
) -> cusparseStatus_t๐Deprecated
Expand description
The function computes the inner dot product of a sparse vector vecX and a dense vector vecY
In other words,

The function cusparseSpVV_bufferSize returns the size of the workspace needed by cusparseSpVV
cusparseSpVV supports the following index type for representing the sparse vector vecX:
- 32-bit indices (
cusparseIndexType_t::CUSPARSE_INDEX_32I) - 64-bit indices (
cusparseIndexType_t::CUSPARSE_INDEX_64I)
The data types combinations currently supported for cusparseSpVV are listed below:
Uniform-precision computation:
X/Y/computeType |
|---|
cudaDataType_t::CUDA_R_32F |
cudaDataType_t::CUDA_R_64F |
cudaDataType_t::CUDA_C_32F |
cudaDataType_t::CUDA_C_64F |
Mixed-precision computation:
cusparseSpVV has the following constraints:
- The arrays representing the sparse vector
vecXmust be aligned to 16 bytes
cusparseSpVV has the following properties:
- The routine requires no extra storage
- The routine supports asynchronous execution
- Provides deterministic (bit-wise) results for each run if the the sparse vector
vecXindices are distinct - The routine allows
indicesofvecXto be unsorted
cusparseSpVV supports the following optimizations:
- CUDA graph capture
- Hardware Memory Compression
Please visit cuSPARSE Library Samples - cusparseSpVV for a code example.
ยงParameters
handle: Handle to the cuSPARSE library context.opX: Operationop(X)that is non-transpose or conjugate transpose.vecX: Sparse vectorX.vecY: Dense vectorY.result: The resulting dot product.computeType: Datatype in which the computation is executed.externalBuffer: Pointer to a workspace buffer of at leastbufferSizebytes.