pub unsafe extern "C" fn cusparseRot(
handle: cusparseHandle_t,
c_coeff: *const c_void,
s_coeff: *const c_void,
vecX: cusparseSpVecDescr_t,
vecY: cusparseDnVecDescr_t,
) -> cusparseStatus_t๐Deprecated
Expand description
The function computes the Givens rotation matrix
to a sparse vecX and a dense vector vecY
In other words,
for i=0 to nnz-1
Y\[X_indices[i\]] = c * Y\[X_indices[i\]] - s * X_values\[i\]
X_values\[i\] = c * X_values\[i\] + s * Y\[X_indices[i\]]cusparseRot 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)
cusparseRot supports the following data types:
Uniform-precision computation:
X/Y/compute |
|---|
cudaDataType_t::CUDA_R_32F |
cudaDataType_t::CUDA_R_64F |
cudaDataType_t::CUDA_C_32F |
cudaDataType_t::CUDA_C_64F |
Mixed-precision computation:
X/Y | compute | |
|---|---|---|
cudaDataType_t::CUDA_R_16F | cudaDataType_t::CUDA_R_32F | |
cudaDataType_t::CUDA_R_16BF | ||
cudaDataType_t::CUDA_C_16F | cudaDataType_t::CUDA_C_32F | [DEPRECATED] |
cudaDataType_t::CUDA_C_16BF | [DEPRECATED] |
cusparseRot has the following constraints:
- The arrays representing the sparse vector
vecXmust be aligned to 16 bytes
cusparseRot 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 sparse vector
vecXindices are distinct
cusparseRot supports the following optimizations:
- CUDA graph capture
- Hardware Memory Compression
Please visit cuSPARSE Library Samples - cusparseRot for a code example.
ยงParameters
handle: Handle to the cuSPARSE library context.c_coeff: cosine element of the rotation matrix.s_coeff: sine element of the rotation matrix.vecX: Sparse vectorX.vecY: Dense vectorY.