Level 2

The prototypes for the following routines can be found at include/elemental/blas-like/decl.hpp, while the implementations are in include/elemental/blas-like/level2/.

Gemv

General matrix-vector multiply: \(y := \alpha \mbox{op}(A) x + \beta y\), where \(\mbox{op}(A)\) can be \(A\), \(A^T\), or \(A^H\). Whether or not \(x\) and \(y\) are stored as row vectors, they will be interpreted as column vectors.

void Gemv(Orientation orientation, T alpha, const Matrix<T> &A, const Matrix<T> &x, T beta, Matrix<T> &y)
void Gemv(Orientation orientation, T alpha, const DistMatrix<T> &A, const DistMatrix<T> &x, T beta, DistMatrix<T> &y)

Ger

General rank-one update: \(A := \alpha x y^H + A\). \(x\) and \(y\) are free to be stored as either row or column vectors, but they will be interpreted as column vectors.

void Ger(T alpha, const Matrix<T> &x, const Matrix<T> &y, Matrix<T> &A)
void Ger(T alpha, const DistMatrix<T> &x, const DistMatrix<T> &y, DistMatrix<T> &A)

Gerc

This is the same as Ger(), but the name is provided because it exists in the BLAS.

void Gerc(T alpha, const Matrix<T> &x, const Matrix<T> &y, Matrix<T> &A)
void Gerc(T alpha, const DistMatrix<T> &x, const DistMatrix<T> &y, DistMatrix<T> &A)

Geru

General rank-one update (unconjugated): \(A := \alpha x y^T + A\). \(x\) and \(y\) are free to be stored as either row or column vectors, but they will be interpreted as column vectors.

void Geru(T alpha, const Matrix<T> &x, const Matrix<T> &y, Matrix<T> &A)
void Geru(T alpha, const DistMatrix<T> &x, const DistMatrix<T> &y, DistMatrix<T> &A)

Hemv

Hermitian matrix-vector multiply: \(y := \alpha A x + \beta y\), where \(A\) is Hermitian.

void Hemv(UpperOrLower uplo, T alpha, const Matrix<T> &A, const Matrix<T> &x, T beta, Matrix<T> &y)
void Hemv(UpperOrLower uplo, T alpha, const DistMatrix<T> &A, const DistMatrix<T> &x, T beta, DistMatrix<T> &y)

Please see SetLocalSymvBlocksize<T>() and LocalSymvBlocksize<T>() in the Tuning parameters section for information on tuning the distributed Hemv().

Her

Hermitian rank-one update: implicitly performs \(A := \alpha x x^H + A\), where only the triangle of \(A\) specified by uplo is updated.

void Her(UpperOrLower uplo, T alpha, const Matrix<T> &x, Matrix<T> &A)
void Her(UpperOrLower uplo, T alpha, const DistMatrix<T> &x, DistMatrix<T> &A)

Her2

Hermitian rank-two update: implicitly performs \(A := \alpha ( x y^H + y x^H ) + A\), where only the triangle of \(A\) specified by uplo is updated.

void Her2(UpperOrLower uplo, T alpha, const Matrix<T> &x, const Matrix<T> &y, Matrix<T> &A)
void Her2(UpperOrLower uplo, T alpha, const DistMatrix<T> &x, const DistMatrix<T> &y, DistMatrix<T> &A)

QuasiTrsv

Quasi-triangular solve with a vector: computes \(x := \mbox{op}(A)^{-1} x\), where \(\mbox{op}(A)\) is either \(A\), \(A^T\), or \(A^H\), and \(A\) is treated an either a lower or upper quasi-triangular matrix, depending upon uplo.

Note that the term quasi-triangular is in the context of real Schur decompositions, which produce triangular matrices with mixes of \(1 \times 1\) and \(2 \times 2\) diagonal blocks.

Note

There is no corresponding BLAS routine, but it is a natural extension of Trsv.

void QuasiTrsv(UpperOrLower uplo, Orientation orientation, const Matrix<F> &A, Matrix<F> &x, bool checkIfSingular = false)
void QuasiTrsv(UpperOrLower uplo, Orientation orientation, const DistMatrix<F> &A, DistMatrix<F> &x, bool checkIfSingular = false)

Symv

Symmetric matrix-vector multiply: \(y := \alpha A x + \beta y\), where \(A\) is symmetric.

void Symv(UpperOrLower uplo, T alpha, const Matrix<T> &A, const Matrix<T> &x, T beta, Matrix<T> &y, bool conjugate = false)
void Symv(UpperOrLower uplo, T alpha, const DistMatrix<T> &A, const DistMatrix<T> &x, T beta, DistMatrix<T> &y, bool conjugate = false)

Please see SetLocalSymvBlocksize<T>() and LocalSymvBlocksize<T>() in the Tuning parameters section for information on tuning the distributed Symv().

Syr

Symmetric rank-one update: implicitly performs \(A := \alpha x x^T + A\), where only the triangle of \(A\) specified by uplo is updated.

void Syr(UpperOrLower uplo, T alpha, const Matrix<T> &x, Matrix<T> &A, bool conjugate = false)
void Syr(UpperOrLower uplo, T alpha, const DistMatrix<T> &x, DistMatrix<T> &A, bool conjugate = false)

Syr2

Symmetric rank-two update: implicitly performs \(A := \alpha ( x y^T + y x^T ) + A\), where only the triangle of \(A\) specified by uplo is updated.

void Syr2(UpperOrLower uplo, T alpha, const Matrix<T> &x, const Matrix<T> &y, Matrix<T> &A, bool conjugate = false)
void Syr2(UpperOrLower uplo, T alpha, const DistMatrix<T> &x, const DistMatrix<T> &y, DistMatrix<T> &A, bool conjugate = false)

Trmv

Not yet written. Please call Trmm() for now.

Trsv

Triangular solve with a vector: computes \(x := \mbox{op}(A)^{-1} x\), where \(\mbox{op}(A)\) is either \(A\), \(A^T\), or \(A^H\), and \(A\) is treated an either a lower or upper triangular matrix, depending upon uplo. \(A\) can also be treated as implicitly having a unit-diagonal if diag is set to UNIT.

void Trsv(UpperOrLower uplo, Orientation orientation, UnitOrNonUnit diag, const Matrix<F> &A, Matrix<F> &x)
void Trsv(UpperOrLower uplo, Orientation orientation, UnitOrNonUnit diag, const DistMatrix<F> &A, DistMatrix<F> &x)