CLA3P v0.3.1
Compact Linear Algebra Parallel Portable Package
Loading...
Searching...
No Matches
Inner/Outer product Operations

Dot products and rank-1 updates. More...

Functions

template<typename T_Scalar>
T_Scalar cla3p::ops::dot (const dns::XxVector< T_Scalar > &x, const dns::XxVector< T_Scalar > &y)
 Calculate vector dot product.
template<typename T_Scalar>
T_Scalar cla3p::ops::dotc (const dns::XxVector< T_Scalar > &x, const dns::XxVector< T_Scalar > &y)
 Calculate vector conjugate dot product.
template<typename T_Scalar>
void cla3p::ops::outer (T_Scalar alpha, const dns::XxVector< T_Scalar > &x, const dns::XxVector< T_Scalar > &y, dns::XxMatrix< T_Scalar > &A)
 Update a matrix with a vector outer product.
template<typename T_Scalar>
void cla3p::ops::outerc (T_Scalar alpha, const dns::XxVector< T_Scalar > &x, const dns::XxVector< T_Scalar > &y, dns::XxMatrix< T_Scalar > &A)
 Update a matrix with a conjugate vector outer product.

Detailed Description

Dot products and rank-1 updates.

Function Documentation

◆ dot()

template<typename T_Scalar>
T_Scalar cla3p::ops::dot ( const dns::XxVector< T_Scalar > & x,
const dns::XxVector< T_Scalar > & y )

Calculate vector dot product.

Performs the operation \( x^T \cdot y \).

Template Parameters
T_ScalarThe scalar type (e.g., float, double, complex).
Parameters
[in]xThe input vector.
[in]yThe input vector.
Returns
The dot product value.
Examples
ex01k_dense_vector_algebra_dot.cpp.

◆ dotc()

template<typename T_Scalar>
T_Scalar cla3p::ops::dotc ( const dns::XxVector< T_Scalar > & x,
const dns::XxVector< T_Scalar > & y )

Calculate vector conjugate dot product.

Performs the operation \( x^H \cdot y \).

Template Parameters
T_ScalarThe scalar type (e.g., float, double, complex).
Parameters
[in]xThe input vector.
[in]yThe input vector.
Returns
The conjugate dot product value.

◆ outer()

template<typename T_Scalar>
void cla3p::ops::outer ( T_Scalar alpha,
const dns::XxVector< T_Scalar > & x,
const dns::XxVector< T_Scalar > & y,
dns::XxMatrix< T_Scalar > & A )

Update a matrix with a vector outer product.

Performs the operation \( A = A + \alpha \cdot x y^T \). A can be General/Symmetric/Hermitian. If A is Symmetric/Hermitian, it is assumed that the outcome of the operation \( x y^T \) is also Symmetric/Hermitian and only the corresponding part (upper/lower) will be calculated.

Template Parameters
T_ScalarThe scalar type (e.g., float, double, complex).
Parameters
[in]alphaThe update coefficient.
[in]xThe input vector.
[in]yThe input vector.
[in,out]AThe matrix to be updated.

◆ outerc()

template<typename T_Scalar>
void cla3p::ops::outerc ( T_Scalar alpha,
const dns::XxVector< T_Scalar > & x,
const dns::XxVector< T_Scalar > & y,
dns::XxMatrix< T_Scalar > & A )

Update a matrix with a conjugate vector outer product.

Performs the operation \( A = A + \alpha \cdot x y^H \). A can be General/Symmetric/Hermitian. If A is Symmetric/Hermitian, it is assumed that the outcome of the operation \( x y^H \) is also Symmetric/Hermitian and only the corresponding part (upper/lower) will be calculated.

Template Parameters
T_ScalarThe scalar type (e.g., float, double, complex).
Parameters
[in]alphaThe update coefficient.
[in]xThe input vector.
[in]yThe input vector.
[in,out]AThe matrix to be updated.