SenK
SenK is a C++ library for high-performance linear solvers.
senk::blas1 Namespace Reference

This namespace contains Level1 BLAS-style functions. More...

Functions

template<typename T >
void Copy (T *x, T *y, int N)
 Copy x to y. More...
 
template<typename T >
void Scal (T a, T *x, int N)
 Multiply x by a. More...
 
template<typename T >
void Axpy (T a, T *x, T *y, int N)
 Compute y = a * x + y. More...
 
template<typename T >
void Axpby (T a, T *x, T b, T *y, int N)
 Compute y = a * x + b * y. More...
 
template<typename T >
void Axpyz (T a, T *x, T *y, T *z, int N)
 Compute z = a * x + y. More...
 
template<typename T >
Dot (T *x, T *y, int N)
 Compute the dot product of x and y. More...
 
template<typename T >
Nrm2 (T *x, int N)
 Compute the 2-norm of x. More...
 
template<typename T >
void HadProd (T *x, T *y, int N)
 Compute the Hadamard product of x and y. More...
 
template<typename T >
void HadDiv (T *x, T *y, int N)
 Compute the element-wise division of x and y. More...
 
template<typename T >
Ggen (T a, T b, T *c, T *s)
 Generate a Gives rotation matrix. More...
 
template<typename T >
void Grot (T c, T s, T *a, T *b)
 Compute the Gives rotation. More...
 

Detailed Description

This namespace contains Level1 BLAS-style functions.

Function Documentation

◆ Axpby()

template<typename T >
void senk::blas1::Axpby ( a,
T *  x,
b,
T *  y,
int  N 
)
inline

Compute y = a * x + b * y.

Template Parameters
TThe type of vectors.
Parameters
aA scalar value.
xA 1D-array of size N.
bA scalar value.
yA 1D-array of size N.
NThe size of vectors.

Definition at line 66 of file senk_blas1.hpp.

◆ Axpy()

template<typename T >
void senk::blas1::Axpy ( a,
T *  x,
T *  y,
int  N 
)
inline

Compute y = a * x + y.

Template Parameters
TThe type of vectors.
Parameters
aA scalar value.
xA 1D-array of size N.
yA 1D-array of size N.
NThe size of vectors.

Definition at line 52 of file senk_blas1.hpp.

◆ Axpyz()

template<typename T >
void senk::blas1::Axpyz ( a,
T *  x,
T *  y,
T *  z,
int  N 
)
inline

Compute z = a * x + y.

Template Parameters
TThe type of vectors.
Parameters
aA scalar value.
xA 1D-array of size N.
yA 1D-array of size N.
zA 1D-array of size N.
NThe size of vectors.

Definition at line 80 of file senk_blas1.hpp.

◆ Copy()

template<typename T >
void senk::blas1::Copy ( T *  x,
T *  y,
int  N 
)
inline

Copy x to y.

Template Parameters
TThe type of vectors.
Parameters
xA 1D-array of size N.
yA 1D-array of size N.
NThe size of vectors.

Definition at line 27 of file senk_blas1.hpp.

◆ Dot()

template<typename T >
T senk::blas1::Dot ( T *  x,
T *  y,
int  N 
)
inline

Compute the dot product of x and y.

Template Parameters
TThe type of vectors.
Parameters
xA 1D-array of size N.
yA 1D-array of size N.
NThe size of vectors.
Returns
The resulting dot product.

Definition at line 93 of file senk_blas1.hpp.

◆ Ggen()

template<typename T >
T senk::blas1::Ggen ( a,
b,
T *  c,
T *  s 
)
inline

Generate a Gives rotation matrix.

Template Parameters
TThe type of the vectors.
Parameters
aA scalar value.
bA scalar value.
cThe resulting value of cos.
sThe resulting value of sin.

Definition at line 146 of file senk_blas1.hpp.

◆ Grot()

template<typename T >
void senk::blas1::Grot ( c,
s,
T *  a,
T *  b 
)
inline

Compute the Gives rotation.

Template Parameters
TThe type of the vectors.
Parameters
cThe value of cos.
sTHe value of sin.
aA rotated scalar value.
bA rotated scalar value.

Definition at line 163 of file senk_blas1.hpp.

◆ HadDiv()

template<typename T >
void senk::blas1::HadDiv ( T *  x,
T *  y,
int  N 
)
inline

Compute the element-wise division of x and y.

Template Parameters
TThe type of the vectors.
Parameters
xA 1D-array of size N.
yA 1D-array of size N.
NThe size of the vectors.

Definition at line 133 of file senk_blas1.hpp.

◆ HadProd()

template<typename T >
void senk::blas1::HadProd ( T *  x,
T *  y,
int  N 
)
inline

Compute the Hadamard product of x and y.

Template Parameters
TThe type of the vectors.
Parameters
xA 1D-array of size N.
yA 1D-array of size N.
NThe size of the vectors.

Definition at line 121 of file senk_blas1.hpp.

◆ Nrm2()

template<typename T >
T senk::blas1::Nrm2 ( T *  x,
int  N 
)
inline

Compute the 2-norm of x.

Template Parameters
TThe type of the vector.
Parameters
xA 1D-array of size N.
NThe size of the vector.
Returns
2-norm of x.

Definition at line 107 of file senk_blas1.hpp.

◆ Scal()

template<typename T >
void senk::blas1::Scal ( a,
T *  x,
int  N 
)
inline

Multiply x by a.

Template Parameters
TThe type of a vector.
Parameters
aA scalar value.
xA 1D-array of size N.
NThe size of a vector.

Definition at line 39 of file senk_blas1.hpp.