cuLite v0.3.1
A lite CUDA C++ Interface
Loading...
Searching...
No Matches
Matrix-Vector Operations

Efficient products between matrices and vectors. More...

Functions

template<typename T_Scalar>
void culite::ops::mult (T_Scalar alpha, op_t opA, const dns::XxMatrix< T_Scalar > &A, const dns::XxVector< T_Scalar > &x, T_Scalar beta, dns::XxVector< T_Scalar > &y, CuBlasHandler &cuBlasHandler=globalCuBlasHandler())
 Updates a vector with a matrix-vector product.
template<typename T_Int, typename T_Scalar>
void culite::ops::mult (T_Scalar alpha, op_t opA, const csr::XxMatrix< T_Int, T_Scalar > &A, const dns::XxVector< T_Scalar > &x, T_Scalar beta, dns::XxVector< T_Scalar > &y, CuSparseHandler &cuSparseHandler=globalCuSparseHandler())
 Updates a vector with a matrix-vector product.
template<typename T_Int, typename T_Scalar>
void culite::ops::mult (T_Scalar alpha, op_t opA, const csc::XxMatrix< T_Int, T_Scalar > &A, const dns::XxVector< T_Scalar > &x, T_Scalar beta, dns::XxVector< T_Scalar > &y, CuSparseHandler &cuSparseHandler=globalCuSparseHandler())
 Updates a vector with a matrix-vector product.

Detailed Description

Efficient products between matrices and vectors.

Function Documentation

◆ mult() [1/3]

template<typename T_Scalar>
void culite::ops::mult ( T_Scalar alpha,
op_t opA,
const dns::XxMatrix< T_Scalar > & A,
const dns::XxVector< T_Scalar > & x,
T_Scalar beta,
dns::XxVector< T_Scalar > & y,
CuBlasHandler & cuBlasHandler = globalCuBlasHandler() )

Updates a vector with a matrix-vector product.

Performs the operation \( y = \beta \cdot y + \alpha \cdot op_A(A) \cdot x \).

Template Parameters
T_ScalarThe scalar type (e.g., float, double, complex).
Parameters
[in]alphaThe scaling coefficient.
[in]opAThe operation to be performed for matrix A. If A is symmetric or hermitian, opA is ignored.
[in]AThe input matrix.
[in]xThe input vector.
[in]betaThe scaling coefficient for y.
[in,out]yThe vector to be updated.
[in]cuBlasHandlerThe cuBLAS handler for GPU operations (defaults to global handler).

◆ mult() [2/3]

template<typename T_Int, typename T_Scalar>
void culite::ops::mult ( T_Scalar alpha,
op_t opA,
const csr::XxMatrix< T_Int, T_Scalar > & A,
const dns::XxVector< T_Scalar > & x,
T_Scalar beta,
dns::XxVector< T_Scalar > & y,
CuSparseHandler & cuSparseHandler = globalCuSparseHandler() )

Updates a vector with a matrix-vector product.

Performs the operation \( y = \beta \cdot y + \alpha \cdot op_A(A) \cdot x \).

Template Parameters
T_IntThe integer type for indexing.
T_ScalarThe scalar type (e.g., float, double, complex).
Parameters
[in]alphaThe scaling coefficient.
[in]opAThe operation to be performed for matrix A. If A is symmetric or hermitian, opA is ignored.
[in]AThe input matrix.
[in]xThe input vector.
[in]betaThe scaling coefficient for y.
[in,out]yThe vector to be updated.
[in]cuSparseHandlerThe cuSPARSE handler for GPU operations (defaults to global handler).

◆ mult() [3/3]

template<typename T_Int, typename T_Scalar>
void culite::ops::mult ( T_Scalar alpha,
op_t opA,
const csc::XxMatrix< T_Int, T_Scalar > & A,
const dns::XxVector< T_Scalar > & x,
T_Scalar beta,
dns::XxVector< T_Scalar > & y,
CuSparseHandler & cuSparseHandler = globalCuSparseHandler() )

Updates a vector with a matrix-vector product.

Performs the operation \( y = \beta \cdot y + \alpha \cdot op_A(A) \cdot x \).

Template Parameters
T_IntThe integer type for indexing.
T_ScalarThe scalar type (e.g., float, double, complex).
Parameters
[in]alphaThe scaling coefficient.
[in]opAThe operation to be performed for matrix A. If A is symmetric or hermitian, opA is ignored.
[in]AThe input matrix.
[in]xThe input vector.
[in]betaThe scaling coefficient for y.
[in,out]yThe vector to be updated.
[in]cuSparseHandlerThe cuSPARSE handler for GPU operations (defaults to global handler).