Skip to main content

cusparseSpVV

Function cusparseSpVV 

Source
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,

image10

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:

The data types combinations currently supported for cusparseSpVV are listed below:

Uniform-precision computation:

Mixed-precision computation:

cusparseSpVV has the following constraints:

  • The arrays representing the sparse vector vecX must 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 vecX indices are distinct
  • The routine allows indices of vecX to 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: Operation op(X) that is non-transpose or conjugate transpose.
  • vecX: Sparse vector X.
  • vecY: Dense vector Y.
  • result: The resulting dot product.
  • computeType: Datatype in which the computation is executed.
  • externalBuffer: Pointer to a workspace buffer of at least bufferSize bytes.