clSPARSE  v0.10.0.0
a software library containing Sparse functions written in OpenCL
Sparse L2 BLAS operations

Sparse BLAS level 2 routines for sparse matrix dense vector. More...

CLSPARSE_EXPORT clsparseStatus clsparseScsrmv (const clsparseScalar *alpha, const clsparseCsrMatrix *matx, const cldenseVector *x, const clsparseScalar *beta, cldenseVector *y, const clsparseControl control)
 Single precision CSR sparse matrix times dense vector. More...
 
CLSPARSE_EXPORT clsparseStatus clsparseDcsrmv (const clsparseScalar *alpha, const clsparseCsrMatrix *matx, const cldenseVector *x, const clsparseScalar *beta, cldenseVector *y, const clsparseControl control)
 Double precision CSR sparse matrix times dense vector. More...
 
CLSPARSE_EXPORT clsparseStatus clsparseScoomv (const clsparseScalar *alpha, const clsparseCooMatrix *matx, const cldenseVector *x, const clsparseScalar *beta, cldenseVector *y, const clsparseControl control)
 Single precision COO sparse matrix times dense vector. More...
 
CLSPARSE_EXPORT clsparseStatus clsparseDcoomv (const clsparseScalar *alpha, const clsparseCooMatrix *matx, const cldenseVector *x, const clsparseScalar *beta, cldenseVector *y, const clsparseControl control)
 Double precision COO sparse matrix times dense vector. More...
 

Detailed Description

Sparse BLAS level 2 routines for sparse matrix dense vector.

Level 2 BLAS operations are defined by order \( N^2 \) operations, usually in the form of a matrix times a vector.

Function Documentation

CLSPARSE_EXPORT clsparseStatus clsparseDcoomv ( const clsparseScalar alpha,
const clsparseCooMatrix matx,
const cldenseVector x,
const clsparseScalar beta,
cldenseVector y,
const clsparseControl  control 
)

Double precision COO sparse matrix times dense vector.

\( y \leftarrow \alpha \ast A \ast x + \beta \ast y \)

Parameters
[in]alphaScalar value to multiply against sparse matrix
[in]matxInput COO sparse matrix
[in]xInput dense vector
[in]betaScalar value to multiply against sparse vector
[out]yOutput dense vector
[in]controlA valid clsparseControl created with clsparseCreateControl
CLSPARSE_EXPORT clsparseStatus clsparseDcsrmv ( const clsparseScalar alpha,
const clsparseCsrMatrix matx,
const cldenseVector x,
const clsparseScalar beta,
cldenseVector y,
const clsparseControl  control 
)

Double precision CSR sparse matrix times dense vector.

\( y \leftarrow \alpha \ast A \ast x + \beta \ast y \) If the CSR sparse matrix structure has rowBlocks information included, then the csr-adaptive algorithm is used. Otherwise, the csr-vector algorithm is used.

Parameters
[in]alphaScalar value to multiply against sparse matrix
[in]matxInput CSR sparse matrix
[in]xInput dense vector
[in]betaScalar value to multiply against sparse vector
[out]yOutput dense vector
[in]controlA valid clsparseControl created with clsparseCreateControl
CLSPARSE_EXPORT clsparseStatus clsparseScoomv ( const clsparseScalar alpha,
const clsparseCooMatrix matx,
const cldenseVector x,
const clsparseScalar beta,
cldenseVector y,
const clsparseControl  control 
)

Single precision COO sparse matrix times dense vector.

\( y \leftarrow \alpha \ast A \ast x + \beta \ast y \)

Parameters
[in]alphaScalar value to multiply against sparse matrix
[in]matxInput COO sparse matrix
[in]xInput dense vector
[in]betaScalar value to multiply against sparse vector
[out]yOutput dense vector
[in]controlA valid clsparseControl created with clsparseCreateControl
CLSPARSE_EXPORT clsparseStatus clsparseScsrmv ( const clsparseScalar alpha,
const clsparseCsrMatrix matx,
const cldenseVector x,
const clsparseScalar beta,
cldenseVector y,
const clsparseControl  control 
)

Single precision CSR sparse matrix times dense vector.

\( y \leftarrow \alpha \ast A \ast x + \beta \ast y \) If the CSR sparse matrix structure has rowBlocks information included, then the csr-adaptive algorithm is used. Otherwise, the csr-vector algorithm is used.

Parameters
[in]alphaScalar value to multiply against sparse matrix
[in]matxInput CSR sparse matrix
[in]xInput dense vector
[in]betaScalar value to multiply against sparse vector
[out]yOutput dense vector
[in]controlA valid clsparseControl created with clsparseCreateControl
Examples:
sample-spmv.cpp.