CLA3P v0.3.1
Compact Linear Algebra Parallel Portable Package
Loading...
Searching...
No Matches
Matrix-Vector Operations

Efficient products between matrices and vectors. More...

Functions

template<typename T_Scalar>
void cla3p::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)
 Updates a vector with a matrix-vector product.
template<typename T_Scalar>
void cla3p::ops::trimult (op_t opA, const dns::XxMatrix< T_Scalar > &A, dns::XxVector< T_Scalar > &x)
 Replaces a vector with a triangular matrix-vector product.
template<typename T_Scalar>
void cla3p::ops::trisol (op_t opA, const dns::XxMatrix< T_Scalar > &A, dns::XxVector< T_Scalar > &b)
 Replaces a vector with the solution of a triangular system.
template<typename T_Int, typename T_Scalar>
void cla3p::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)
 Updates a vector with a matrix-vector product.
template<typename T_Int, typename T_Scalar>
void cla3p::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)
 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 cla3p::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 )

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.

◆ trimult()

template<typename T_Scalar>
void cla3p::ops::trimult ( op_t opA,
const dns::XxMatrix< T_Scalar > & A,
dns::XxVector< T_Scalar > & x )

Replaces a vector with a triangular matrix-vector product.

Performs the operation \( x = op_A(A) \cdot x \).

Template Parameters
T_ScalarThe scalar type (e.g., float, double, complex).
Parameters
[in]opAThe operation to be performed for matrix A.
[in]AThe input triangular matrix.
[in,out]xThe vector to be replaced.

◆ trisol()

template<typename T_Scalar>
void cla3p::ops::trisol ( op_t opA,
const dns::XxMatrix< T_Scalar > & A,
dns::XxVector< T_Scalar > & b )

Replaces a vector with the solution of a triangular system.

Solves the system \( op_A(A) \cdot x = b \).

Template Parameters
T_ScalarThe scalar type (e.g., float, double, complex).
Parameters
[in]opAThe operation to be performed for matrix A.
[in]AThe input triangular matrix.
[in,out]bOn entry, the rhs, on exit the system solution x.

◆ mult() [2/3]

template<typename T_Int, typename T_Scalar>
void cla3p::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 )

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.

◆ mult() [3/3]

template<typename T_Int, typename T_Scalar>
void cla3p::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 )

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.