Level 1¶
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/level1/.
Adjoint¶
Note
This is not a standard BLAS routine, but it is BLAS-like.
\(B := A^H\).
- void Adjoint(const Matrix<T>& A, Matrix<T>& B)¶
- void Adjoint(const DistMatrix<T, U, V>& A, DistMatrix<T, W, Z>& B)¶
Axpy¶
Performs \(Y := \alpha X + Y\) (hence the name axpy).
- void Axpy(T alpha, const Matrix<T>& X, Matrix<T>& Y)¶
- void Axpy(T alpha, const DistMatrix<T, U, V>& X, DistMatrix<T, U, V>& Y)¶
Conjugate¶
Note
This is not a standard BLAS routine, but it is BLAS-like.
\(A := \bar A\). For real datatypes, this is a no-op.
- void Conjugate(Matrix<T>& A)¶
- void Conjugate(DistMatrix<T, U, V>& A)¶
\(B := \bar A\).
- void Conjugate(const Matrix<T>& A, Matrix<T>& B)¶
- void Conjugate(const DistMatrix<T, U, V>& A, DistMatrix<T, W, Z>& B)¶
Copy¶
Sets \(Y := X\).
- void Copy(const Matrix<T>& X, Matrix<T>& Y)¶
- void Copy(const DistMatrix<T, U, V>& A, DistMatrix<T, W, Z>& B)¶
DiagonalScale¶
Note
This is not a standard BLAS routine, but it is BLAS-like.
Performs either \(X := \mbox{op}(D) X\) or \(X := X \mbox{op}(D)\), where \(op(D)\) equals \(D=D^T\), or \(D^H=\bar D\), where \(D = \mbox{diag}(d)\) and \(d\) is a column vector.
- void DiagonalScale(LeftOrRight side, Orientation orientation, const Matrix<T>& d, Matrix<T>& X)¶
- void DiagonalScale(LeftOrRight side, Orientation orientation, const DistMatrix<T, U, V>& d, DistMatrix<T, W, Z>& X)¶
DiagonalSolve¶
Note
This is not a standard BLAS routine, but it is BLAS-like.
Performs either \(X := \mbox{op}(D)^{-1} X\) or \(X := X \mbox{op}(D)^{-1}\), where \(D = \mbox{diag}(d)\) and \(d\) is a column vector.
- void DiagonalSolve(LeftOrRight side, Orientation orientation, const Matrix<F>& d, Matrix<F>& X, bool checkIfSingular=false )¶
- void DiagonalSolve(LeftOrRight side, Orientation orientation, const DistMatrix<F, U, V>& d, DistMatrix<F, W, Z>& X, bool checkIfSingular=false )¶
Dot¶
Returns \((x,y) = x^H y\). \(x\) and \(y\) are both allowed to be stored as column or row vectors, but will be interpreted as column vectors.
- T Dot(const Matrix<T>& x, const Matrix<T>& y)¶
Dotc¶
Same as Dot. This routine name is provided since it is the usual BLAS naming convention.
- T Dotc(const Matrix<T>& x, const Matrix<T>& y)¶
- T Dotc(const DistMatrix<T, U, V>& x, const DistMatrix<T, U, V>& y)¶
Dotu¶
Returns \(x^T y\), which is not an inner product.
- T Dotu(const Matrix<T>& x, const Matrix<T>& y)¶
- T Dotu(const DistMatrix<T, U, V>& x, const DistMatrix<T, U, V>& y)¶
MakeTrapezoidal¶
Note
This is not a standard BLAS routine, but it is BLAS-like.
Sets all entries outside of the specified trapezoidal submatrix to zero. The diagonal of the trapezoidal matrix is defined relative to either the upper-left or bottom-right corner of the matrix, depending on the value of side; whether or not the trapezoid is upper or lower (analogous to an upper or lower-triangular matrix) is determined by the uplo parameter, and the last diagonal is defined with the offset integer.
- void MakeTrapezoidal(LeftOrRight side, UpperOrLower uplo, int offset, Matrix<T>& A)¶
- void MakeTrapezoidal(LeftOrRight side, UpperOrLower uplo, int offset, DistMatrix<T, U, V>& A)¶
Nrm2¶
Returns \(||x||_2 = \sqrt{(x,x)} = \sqrt{x^H x}\). As with most other routines, even if \(x\) is stored as a row vector, it will be interpreted as a column vector.
Scal¶
\(X := \alpha X\).
- void Scal(T alpha, Matrix<T>& X)¶
- void Scal(T alpha, DistMatrix<T, U, V>& X)¶
ScaleTrapezoid¶
Note
This is not a standard BLAS routine, but it is BLAS-like.
Scales the entries within the specified trapezoid of a general matrix. The parameter conventions follow those of MakeTrapezoidal described above.
- void ScaleTrapezoid(T alpha, LeftOrRight side, UpperOrLower uplo, int offset, Matrix<T>& A)¶
- void ScaleTrapezoid(T alpha, LeftOrRight side, UpperOrLower uplo, int offset, DistMatrix<T, U, V>& A)¶
Transpose¶
Note
This is not a standard BLAS routine, but it is BLAS-like.
\(B := A^T\) or \(B := A^H\).
- void Transpose(const Matrix<T>& A, Matrix<T>& B, bool conjugate=false )¶
- void Transpose(const DistMatrix<T, U, V>& A, DistMatrix<T, W, Z>& B)¶
Zero¶
Note
This is not a standard BLAS routine, but it is BLAS-like.
Sets all of the entries of the input matrix to zero.
- void Zero(Matrix<T>& A)¶
- void Zero(DistMatrix<T, U, V>& A)¶
SetDiagonal¶
Note
This is not a standard BLAS routine.
Sets all of the diagonal entries of a matrix to a given value.
- void SetDiagonal(Matrix<T>& A, T alpha)¶
- void SetDiagonal(DistMatrix<T, U, V>& A, T alpha)¶
- void SetDiagonal(LeftOrRight side, int offset, Matrix<T>& A, T alpha)¶
- void SetDiagonal(LeftOrRight side, int offset, DistMatrix<T, U, V>& A, T alpha)¶