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

Dense BLAS level 1 routines for dense vectors. More...

CLSPARSE_EXPORT clsparseStatus cldenseSscale (cldenseVector *r, const clsparseScalar *alpha, const cldenseVector *y, const clsparseControl control)
 Single precision scale dense vector by a scalar. More...
 
CLSPARSE_EXPORT clsparseStatus cldenseDscale (cldenseVector *r, const clsparseScalar *alpha, const cldenseVector *y, const clsparseControl control)
 Double precision scale dense vector by a scalar. More...
 
CLSPARSE_EXPORT clsparseStatus cldenseSaxpy (cldenseVector *r, const clsparseScalar *alpha, const cldenseVector *x, const cldenseVector *y, const clsparseControl control)
 Single precision scale dense vector and add dense vector. More...
 
CLSPARSE_EXPORT clsparseStatus cldenseDaxpy (cldenseVector *r, const clsparseScalar *alpha, const cldenseVector *x, const cldenseVector *y, const clsparseControl control)
 Double precision scale dense vector and add dense vector. More...
 
CLSPARSE_EXPORT clsparseStatus cldenseSaxpby (cldenseVector *r, const clsparseScalar *alpha, const cldenseVector *x, const clsparseScalar *beta, const cldenseVector *y, const clsparseControl control)
 Single precision scale dense vector and add scaled dense vector. More...
 
CLSPARSE_EXPORT clsparseStatus cldenseDaxpby (cldenseVector *r, const clsparseScalar *alpha, const cldenseVector *x, const clsparseScalar *beta, const cldenseVector *y, const clsparseControl control)
 Double precision scale dense vector and add scaled dense vector. More...
 
CLSPARSE_EXPORT clsparseStatus cldenseIreduce (clsparseScalar *s, const cldenseVector *x, const clsparseControl control)
 Reduce integer elements of a dense vector into a scalar value. More...
 
CLSPARSE_EXPORT clsparseStatus cldenseSreduce (clsparseScalar *s, const cldenseVector *x, const clsparseControl control)
 Reduce single precision elements of a dense vector into a scalar value. More...
 
CLSPARSE_EXPORT clsparseStatus cldenseDreduce (clsparseScalar *s, const cldenseVector *x, const clsparseControl control)
 Reduce double precision elements of a dense vector into a scalar value. More...
 
CLSPARSE_EXPORT clsparseStatus cldenseSnrm1 (clsparseScalar *s, const cldenseVector *x, const clsparseControl control)
 Calculate the single precision L1 norm of a dense vector. More...
 
CLSPARSE_EXPORT clsparseStatus cldenseDnrm1 (clsparseScalar *s, const cldenseVector *x, const clsparseControl control)
 Calculate the double precision L1 norm of a dense vector. More...
 
CLSPARSE_EXPORT clsparseStatus cldenseSnrm2 (clsparseScalar *s, const cldenseVector *x, const clsparseControl control)
 Calculate the single precision L2 norm of a dense vector. More...
 
CLSPARSE_EXPORT clsparseStatus cldenseDnrm2 (clsparseScalar *s, const cldenseVector *x, const clsparseControl control)
 Calculate the double precision L2 norm of a dense vector. More...
 
CLSPARSE_EXPORT clsparseStatus cldenseSdot (clsparseScalar *r, const cldenseVector *x, const cldenseVector *y, const clsparseControl control)
 Calculates the single precision dot-product of a dense vector. More...
 
CLSPARSE_EXPORT clsparseStatus cldenseDdot (clsparseScalar *r, const cldenseVector *x, const cldenseVector *y, const clsparseControl control)
 Calculates the double precision dot-product of a dense vector. More...
 
CLSPARSE_EXPORT clsparseStatus cldenseSadd (cldenseVector *r, const cldenseVector *x, const cldenseVector *y, const clsparseControl control)
 Element-wise single precision addition of two dense vectors. More...
 
CLSPARSE_EXPORT clsparseStatus cldenseDadd (cldenseVector *r, const cldenseVector *x, const cldenseVector *y, const clsparseControl control)
 Element-wise double precision addition of two dense vectors. More...
 
CLSPARSE_EXPORT clsparseStatus cldenseSsub (cldenseVector *r, const cldenseVector *x, const cldenseVector *y, const clsparseControl control)
 Element-wise single precision subtraction of two dense vectors. More...
 
CLSPARSE_EXPORT clsparseStatus cldenseDsub (cldenseVector *r, const cldenseVector *x, const cldenseVector *y, const clsparseControl control)
 Element-wise double precision subtraction of two dense vectors. More...
 
CLSPARSE_EXPORT clsparseStatus cldenseSmul (cldenseVector *r, const cldenseVector *x, const cldenseVector *y, const clsparseControl control)
 Element-wise single precision multiplication of two dense vectors. More...
 
CLSPARSE_EXPORT clsparseStatus cldenseDmul (cldenseVector *r, const cldenseVector *x, const cldenseVector *y, const clsparseControl control)
 Element-wise double precision multiplication of two dense vectors. More...
 
CLSPARSE_EXPORT clsparseStatus cldenseSdiv (cldenseVector *r, const cldenseVector *x, const cldenseVector *y, const clsparseControl control)
 Element-wise single precision division of two dense vectors. More...
 
CLSPARSE_EXPORT clsparseStatus cldenseDdiv (cldenseVector *r, const cldenseVector *x, const cldenseVector *y, const clsparseControl control)
 Element-wise double precision division of two dense vectors. More...
 

Detailed Description

Dense BLAS level 1 routines for dense vectors.

These L1 BLAS functions were developed internally to clsparse during its development and made available through an API. The thought is that these routines could be useful to others as performance primitives writing their own sparse operations

Function Documentation

CLSPARSE_EXPORT clsparseStatus cldenseDadd ( cldenseVector r,
const cldenseVector x,
const cldenseVector y,
const clsparseControl  control 
)

Element-wise double precision addition of two dense vectors.

Parameters
[out]rOutput dense vector
[in]xInput dense vector
[in]yInput dense vector
[in]controlA valid clsparseControl created with clsparseCreateControl
CLSPARSE_EXPORT clsparseStatus cldenseDaxpby ( cldenseVector r,
const clsparseScalar alpha,
const cldenseVector x,
const clsparseScalar beta,
const cldenseVector y,
const clsparseControl  control 
)

Double precision scale dense vector and add scaled dense vector.

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

Parameters
[out]rOutput dense vector
[in]alphaScalar value for x
[in]xInput dense vector
[in]betaScalar value for y
[in]yInput dense vector
[in]controlA valid clsparseControl created with clsparseCreateControl
CLSPARSE_EXPORT clsparseStatus cldenseDaxpy ( cldenseVector r,
const clsparseScalar alpha,
const cldenseVector x,
const cldenseVector y,
const clsparseControl  control 
)

Double precision scale dense vector and add dense vector.

\( r \leftarrow \alpha \ast x + y \)

Parameters
[out]rOutput dense vector
[in]alphaScalar value to multiply
[in]xInput dense vector
[in]yInput dense vector
[in]controlA valid clsparseControl created with clsparseCreateControl
CLSPARSE_EXPORT clsparseStatus cldenseDdiv ( cldenseVector r,
const cldenseVector x,
const cldenseVector y,
const clsparseControl  control 
)

Element-wise double precision division of two dense vectors.

Parameters
[out]rOutput dense vector
[in]xInput dense vector
[in]yInput dense vector
[in]controlA valid clsparseControl created with clsparseCreateControl
CLSPARSE_EXPORT clsparseStatus cldenseDdot ( clsparseScalar r,
const cldenseVector x,
const cldenseVector y,
const clsparseControl  control 
)

Calculates the double precision dot-product of a dense vector.

Parameters
[out]rOutput dense vector
[in]xInput dense vector
[in]yInput dense vector
[in]controlA valid clsparseControl created with clsparseCreateControl
CLSPARSE_EXPORT clsparseStatus cldenseDmul ( cldenseVector r,
const cldenseVector x,
const cldenseVector y,
const clsparseControl  control 
)

Element-wise double precision multiplication of two dense vectors.

Parameters
[out]rOutput dense vector
[in]xInput dense vector
[in]yInput dense vector
[in]controlA valid clsparseControl created with clsparseCreateControl
CLSPARSE_EXPORT clsparseStatus cldenseDnrm1 ( clsparseScalar s,
const cldenseVector x,
const clsparseControl  control 
)

Calculate the double precision L1 norm of a dense vector.

Parameters
[out]sOutput scalar
[in]xInput dense vector
[in]controlA valid clsparseControl created with clsparseCreateControl
CLSPARSE_EXPORT clsparseStatus cldenseDnrm2 ( clsparseScalar s,
const cldenseVector x,
const clsparseControl  control 
)

Calculate the double precision L2 norm of a dense vector.

Parameters
[out]sOutput scalar
[in]xInput dense vector
[in]controlA valid clsparseControl created with clsparseCreateControl
CLSPARSE_EXPORT clsparseStatus cldenseDreduce ( clsparseScalar s,
const cldenseVector x,
const clsparseControl  control 
)

Reduce double precision elements of a dense vector into a scalar value.

Implicit plus operator

Parameters
[out]sOutput scalar
[in]xInput dense vector
[in]controlA valid clsparseControl created with clsparseCreateControl
CLSPARSE_EXPORT clsparseStatus cldenseDscale ( cldenseVector r,
const clsparseScalar alpha,
const cldenseVector y,
const clsparseControl  control 
)

Double precision scale dense vector by a scalar.

\( r \leftarrow \alpha \ast y \)

Parameters
[out]rOutput dense vector
[in]alphaScalar value to multiply
[in]yInput dense vector
[in]controlA valid clsparseControl created with clsparseCreateControl
CLSPARSE_EXPORT clsparseStatus cldenseDsub ( cldenseVector r,
const cldenseVector x,
const cldenseVector y,
const clsparseControl  control 
)

Element-wise double precision subtraction of two dense vectors.

Parameters
[out]rOutput dense vector
[in]xInput dense vector
[in]yInput dense vector
[in]controlA valid clsparseControl created with clsparseCreateControl
CLSPARSE_EXPORT clsparseStatus cldenseIreduce ( clsparseScalar s,
const cldenseVector x,
const clsparseControl  control 
)

Reduce integer elements of a dense vector into a scalar value.

Implicit plus operator

Parameters
[out]sOutput scalar
[in]xInput dense vector
[in]controlA valid clsparseControl created with clsparseCreateControl
CLSPARSE_EXPORT clsparseStatus cldenseSadd ( cldenseVector r,
const cldenseVector x,
const cldenseVector y,
const clsparseControl  control 
)

Element-wise single precision addition of two dense vectors.

Parameters
[out]rOutput dense vector
[in]xInput dense vector
[in]yInput dense vector
[in]controlA valid clsparseControl created with clsparseCreateControl
CLSPARSE_EXPORT clsparseStatus cldenseSaxpby ( cldenseVector r,
const clsparseScalar alpha,
const cldenseVector x,
const clsparseScalar beta,
const cldenseVector y,
const clsparseControl  control 
)

Single precision scale dense vector and add scaled dense vector.

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

Parameters
[out]rOutput dense vector
[in]alphaScalar value for x
[in]xInput dense vector
[in]betaScalar value for y
[in]yInput dense vector
[in]controlA valid clsparseControl created with clsparseCreateControl
CLSPARSE_EXPORT clsparseStatus cldenseSaxpy ( cldenseVector r,
const clsparseScalar alpha,
const cldenseVector x,
const cldenseVector y,
const clsparseControl  control 
)

Single precision scale dense vector and add dense vector.

\( r \leftarrow \alpha \ast x + y \)

Parameters
[out]rOutput dense vector
[in]alphaScalar value to multiply
[in]xInput dense vector
[in]yInput dense vector
[in]controlA valid clsparseControl created with clsparseCreateControl
Examples:
sample-axpy.cpp.
CLSPARSE_EXPORT clsparseStatus cldenseSdiv ( cldenseVector r,
const cldenseVector x,
const cldenseVector y,
const clsparseControl  control 
)

Element-wise single precision division of two dense vectors.

Parameters
[out]rOutput dense vector
[in]xInput dense vector
[in]yInput dense vector
[in]controlA valid clsparseControl created with clsparseCreateControl
CLSPARSE_EXPORT clsparseStatus cldenseSdot ( clsparseScalar r,
const cldenseVector x,
const cldenseVector y,
const clsparseControl  control 
)

Calculates the single precision dot-product of a dense vector.

Parameters
[out]rOutput dense vector
[in]xInput dense vector
[in]yInput dense vector
[in]controlA valid clsparseControl created with clsparseCreateControl
CLSPARSE_EXPORT clsparseStatus cldenseSmul ( cldenseVector r,
const cldenseVector x,
const cldenseVector y,
const clsparseControl  control 
)

Element-wise single precision multiplication of two dense vectors.

Parameters
[out]rOutput dense vector
[in]xInput dense vector
[in]yInput dense vector
[in]controlA valid clsparseControl created with clsparseCreateControl
CLSPARSE_EXPORT clsparseStatus cldenseSnrm1 ( clsparseScalar s,
const cldenseVector x,
const clsparseControl  control 
)

Calculate the single precision L1 norm of a dense vector.

Parameters
[out]sOutput scalar
[in]xInput dense vector
[in]controlA valid clsparseControl created with clsparseCreateControl
Examples:
sample-norm1-c.c.
CLSPARSE_EXPORT clsparseStatus cldenseSnrm2 ( clsparseScalar s,
const cldenseVector x,
const clsparseControl  control 
)

Calculate the single precision L2 norm of a dense vector.

Parameters
[out]sOutput scalar
[in]xInput dense vector
[in]controlA valid clsparseControl created with clsparseCreateControl
CLSPARSE_EXPORT clsparseStatus cldenseSreduce ( clsparseScalar s,
const cldenseVector x,
const clsparseControl  control 
)

Reduce single precision elements of a dense vector into a scalar value.

Implicit plus operator

Parameters
[out]sOutput scalar
[in]xInput dense vector
[in]controlA valid clsparseControl created with clsparseCreateControl
CLSPARSE_EXPORT clsparseStatus cldenseSscale ( cldenseVector r,
const clsparseScalar alpha,
const cldenseVector y,
const clsparseControl  control 
)

Single precision scale dense vector by a scalar.

\( r \leftarrow \alpha \ast y \)

Parameters
[out]rOutput dense vector
[in]alphaScalar value to multiply
[in]yInput dense vector
[in]controlA valid clsparseControl created with clsparseCreateControl
CLSPARSE_EXPORT clsparseStatus cldenseSsub ( cldenseVector r,
const cldenseVector x,
const cldenseVector y,
const clsparseControl  control 
)

Element-wise single precision subtraction of two dense vectors.

Parameters
[out]rOutput dense vector
[in]xInput dense vector
[in]yInput dense vector
[in]controlA valid clsparseControl created with clsparseCreateControl