Matrix Decomposition

LAPACK LQ decomposition functions (gelqf)

void blaze::gelqf (int m, int n, float *A, int lda, float *tau, float *work, int lwork, int *info)
 LAPACK kernel for the LQ decomposition of the given dense single precision column-major matrix. More...
 
void blaze::gelqf (int m, int n, double *A, int lda, double *tau, double *work, int lwork, int *info)
 LAPACK kernel for the LQ decomposition of the given dense double precision column-major matrix. More...
 
void blaze::gelqf (int m, int n, complex< float > *A, int lda, complex< float > *tau, complex< float > *work, int lwork, int *info)
 LAPACK kernel for the LQ decomposition of the given dense single precision complex column-major matrix. More...
 
void blaze::gelqf (int m, int n, complex< double > *A, int lda, complex< double > *tau, complex< double > *work, int lwork, int *info)
 LAPACK kernel for the LQ decomposition of the given dense double precision complex column-major matrix. More...
 
template<typename MT , bool SO>
void blaze::gelqf (DenseMatrix< MT, SO > &A, ElementType_< MT > *tau)
 LAPACK kernel for the LQ decomposition of the given dense matrix. More...
 

LAPACK QL decomposition functions (geqlf)

void blaze::geqlf (int m, int n, float *A, int lda, float *tau, float *work, int lwork, int *info)
 LAPACK kernel for the QL decomposition of the given dense single precision column-major matrix. More...
 
void blaze::geqlf (int m, int n, double *A, int lda, double *tau, double *work, int lwork, int *info)
 LAPACK kernel for the QL decomposition of the given dense double precision column-major matrix. More...
 
void blaze::geqlf (int m, int n, complex< float > *A, int lda, complex< float > *tau, complex< float > *work, int lwork, int *info)
 LAPACK kernel for the QL decomposition of the given dense single precision complex column-major matrix. More...
 
void blaze::geqlf (int m, int n, complex< double > *A, int lda, complex< double > *tau, complex< double > *work, int lwork, int *info)
 LAPACK kernel for the QL decomposition of the given dense double precision complex column-major matrix. More...
 
template<typename MT , bool SO>
void blaze::geqlf (DenseMatrix< MT, SO > &A, ElementType_< MT > *tau)
 LAPACK kernel for the QL decomposition of the given dense matrix. More...
 

LAPACK QR decomposition functions (geqp3)

void blaze::geqp3 (int m, int n, float *A, int lda, int *jpvt, float *tau, float *work, int lwork, int *info)
 LAPACK kernel for the QR decomposition of the given dense single precision column-major matrix. More...
 
void blaze::geqp3 (int m, int n, double *A, int lda, int *jpvt, double *tau, double *work, int lwork, int *info)
 LAPACK kernel for the QR decomposition of the given dense double precision column-major matrix. More...
 

LAPACK QR decomposition functions (geqrf)

void blaze::geqrf (int m, int n, float *A, int lda, float *tau, float *work, int lwork, int *info)
 LAPACK kernel for the QR decomposition of the given dense single precision column-major matrix. More...
 
void blaze::geqrf (int m, int n, double *A, int lda, double *tau, double *work, int lwork, int *info)
 LAPACK kernel for the QR decomposition of the given dense double precision column-major matrix. More...
 
void blaze::geqrf (int m, int n, complex< float > *A, int lda, complex< float > *tau, complex< float > *work, int lwork, int *info)
 LAPACK kernel for the QR decomposition of the given dense single precision complex column-major matrix. More...
 
void blaze::geqrf (int m, int n, complex< double > *A, int lda, complex< double > *tau, complex< double > *work, int lwork, int *info)
 LAPACK kernel for the QR decomposition of the given dense double precision complex column-major matrix. More...
 
template<typename MT , bool SO>
void blaze::geqrf (DenseMatrix< MT, SO > &A, ElementType_< MT > *tau)
 LAPACK kernel for the QR decomposition of the given dense matrix. More...
 

LAPACK RQ decomposition functions (gerqf)

void blaze::gerqf (int m, int n, float *A, int lda, float *tau, float *work, int lwork, int *info)
 LAPACK kernel for the RQ decomposition of the given dense single precision column-major matrix. More...
 
void blaze::gerqf (int m, int n, double *A, int lda, double *tau, double *work, int lwork, int *info)
 LAPACK kernel for the RQ decomposition of the given dense single precision column-major matrix. More...
 
void blaze::gerqf (int m, int n, complex< float > *A, int lda, complex< float > *tau, complex< float > *work, int lwork, int *info)
 LAPACK kernel for the RQ decomposition of the given dense single precision complex column-major matrix. More...
 
void blaze::gerqf (int m, int n, complex< double > *A, int lda, complex< double > *tau, complex< double > *work, int lwork, int *info)
 LAPACK kernel for the RQ decomposition of the given dense double precision complex column-major matrix. More...
 
template<typename MT , bool SO>
void blaze::gerqf (DenseMatrix< MT, SO > &A, ElementType_< MT > *tau)
 LAPACK kernel for the RQ decomposition of the given dense matrix. More...
 

LAPACK LU decomposition functions (getrf)

void blaze::getrf (int m, int n, float *A, int lda, int *ipiv, int *info)
 LAPACK kernel for the LU decomposition of the given dense general single precision column-major matrix. More...
 
void blaze::getrf (int m, int n, double *A, int lda, int *ipiv, int *info)
 LAPACK kernel for the LU decomposition of the given dense general double precision column-major matrix. More...
 
void blaze::getrf (int m, int n, complex< float > *A, int lda, int *ipiv, int *info)
 LAPACK kernel for the LU decomposition of the given dense general single precision complex column-major matrix. More...
 
void blaze::getrf (int m, int n, complex< double > *A, int lda, int *ipiv, int *info)
 LAPACK kernel for the LU decomposition of the given dense general double precision complex column-major matrix. More...
 
template<typename MT , bool SO>
void blaze::getrf (DenseMatrix< MT, SO > &A, int *ipiv)
 LAPACK kernel for the LU decomposition of the given dense general matrix. More...
 

LAPACK LDLH decomposition functions (hetrf)

void blaze::hetrf (char uplo, int n, complex< float > *A, int lda, int *ipiv, complex< float > *work, int lwork, int *info)
 LAPACK kernel for the decomposition of the given dense Hermitian indefinite single precision complex column-major matrix. More...
 
void blaze::hetrf (char uplo, int n, complex< double > *A, int lda, int *ipiv, complex< double > *work, int lwork, int *info)
 LAPACK kernel for the decomposition of the given dense Hermitian indefinite double precision complex column-major matrix. More...
 
template<typename MT , bool SO>
void blaze::hetrf (DenseMatrix< MT, SO > &A, char uplo, int *ipiv)
 LAPACK kernel for the decomposition of the given dense Hermitian indefinite matrix. More...
 

LAPACK functions to reconstruct Q from a LQ decomposition (orglq)

void blaze::orglq (int m, int n, int k, float *A, int lda, const float *tau, float *work, int lwork, int *info)
 LAPACK kernel for the reconstruction of the orthogonal matrix Q from a LQ decomposition. More...
 
void blaze::orglq (int m, int n, int k, double *A, int lda, const double *tau, double *work, int lwork, int *info)
 LAPACK kernel for the reconstruction of the orthogonal matrix Q from a LQ decomposition. More...
 
template<typename MT , bool SO>
void blaze::orglq (DenseMatrix< MT, SO > &A, const ElementType_< MT > *tau)
 LAPACK kernel for the reconstruction of the orthogonal matrix Q from a LQ decomposition. More...
 

LAPACK functions to reconstruct Q from a QL decomposition (orgql)

void blaze::orgql (int m, int n, int k, float *A, int lda, const float *tau, float *work, int lwork, int *info)
 LAPACK kernel for the reconstruction of the orthogonal matrix Q from a QL decomposition. More...
 
void blaze::orgql (int m, int n, int k, double *A, int lda, const double *tau, double *work, int lwork, int *info)
 LAPACK kernel for the reconstruction of the orthogonal matrix Q from a QL decomposition. More...
 
template<typename MT , bool SO>
void blaze::orgql (DenseMatrix< MT, SO > &A, const ElementType_< MT > *tau)
 LAPACK kernel for the reconstruction of the orthogonal matrix Q from a QL decomposition. More...
 

LAPACK functions to reconstruct Q from a QR decomposition (orgqr)

void blaze::orgqr (int m, int n, int k, float *A, int lda, const float *tau, float *work, int lwork, int *info)
 LAPACK kernel for the reconstruction of the orthogonal matrix Q from a QR decomposition. More...
 
void blaze::orgqr (int m, int n, int k, double *A, int lda, const double *tau, double *work, int lwork, int *info)
 LAPACK kernel for the reconstruction of the orthogonal matrix Q from a QR decomposition. More...
 
template<typename MT , bool SO>
void blaze::orgqr (DenseMatrix< MT, SO > &A, const ElementType_< MT > *tau)
 LAPACK kernel for the reconstruction of the orthogonal matrix Q from a QR decomposition. More...
 

LAPACK functions to reconstruct Q from a RQ decomposition (orgrq)

void blaze::orgrq (int m, int n, int k, float *A, int lda, const float *tau, float *work, int lwork, int *info)
 LAPACK kernel for the reconstruction of the orthogonal matrix Q from a RQ decomposition. More...
 
void blaze::orgrq (int m, int n, int k, double *A, int lda, const double *tau, double *work, int lwork, int *info)
 LAPACK kernel for the reconstruction of the orthogonal matrix Q from a RQ decomposition. More...
 
template<typename MT , bool SO>
void blaze::orgrq (DenseMatrix< MT, SO > &A, const ElementType_< MT > *tau)
 LAPACK kernel for the reconstruction of the orthogonal matrix Q from a RQ decomposition. More...
 

LAPACK functions to multiply Q from a LQ decomposition with a matrix (ormlq)

void blaze::ormlq (char side, char trans, int m, int n, int k, const float *A, int lda, const float *tau, float *C, int ldc, float *work, int lwork, int *info)
 LAPACK kernel for the multiplication of the single precision Q from a LQ decomposition with another matrix. More...
 
void blaze::ormlq (char side, char trans, int m, int n, int k, const double *A, int lda, const double *tau, double *C, int ldc, double *work, int lwork, int *info)
 LAPACK kernel for the multiplication of the double precision Q from a LQ decomposition with another matrix. More...
 
template<typename MT1 , bool SO1, typename MT2 , bool SO2>
void blaze::ormlq (DenseMatrix< MT1, SO1 > &C, const DenseMatrix< MT2, SO2 > &A, char side, char trans, const ElementType_< MT2 > *tau)
 LAPACK kernel for the multiplication of the double precision Q from a LQ decomposition with another matrix. More...
 

LAPACK functions to multiply Q from a QL decomposition with a matrix (ormql)

void blaze::ormql (char side, char trans, int m, int n, int k, const float *A, int lda, const float *tau, float *C, int ldc, float *work, int lwork, int *info)
 LAPACK kernel for the multiplication of the single precision Q from a QL decomposition with another matrix. More...
 
void blaze::ormql (char side, char trans, int m, int n, int k, const double *A, int lda, const double *tau, double *C, int ldc, double *work, int lwork, int *info)
 LAPACK kernel for the multiplication of the double precision Q from a QL decomposition with another matrix. More...
 
template<typename MT1 , bool SO1, typename MT2 , bool SO2>
void blaze::ormql (DenseMatrix< MT1, SO1 > &C, const DenseMatrix< MT2, SO2 > &A, char side, char trans, const ElementType_< MT2 > *tau)
 LAPACK kernel for the multiplication of the double precision Q from a QL decomposition with another matrix. More...
 

LAPACK functions to multiply Q from a QR decomposition with a matrix (ormqr)

void blaze::ormqr (char side, char trans, int m, int n, int k, const float *A, int lda, const float *tau, float *C, int ldc, float *work, int lwork, int *info)
 LAPACK kernel for the multiplication of the single precision Q from a QR decomposition with another matrix. More...
 
void blaze::ormqr (char side, char trans, int m, int n, int k, const double *A, int lda, const double *tau, double *C, int ldc, double *work, int lwork, int *info)
 LAPACK kernel for the multiplication of the double precision Q from a QR decomposition with another matrix. More...
 
template<typename MT1 , bool SO1, typename MT2 , bool SO2>
void blaze::ormqr (DenseMatrix< MT1, SO1 > &C, const DenseMatrix< MT2, SO2 > &A, char side, char trans, const ElementType_< MT2 > *tau)
 LAPACK kernel for the multiplication of the double precision Q from a QR decomposition with another matrix. More...
 

LAPACK functions to multiply Q from a RQ decomposition with a matrix (ormrq)

void blaze::ormrq (char side, char trans, int m, int n, int k, const float *A, int lda, const float *tau, float *C, int ldc, float *work, int lwork, int *info)
 LAPACK kernel for the multiplication of the single precision Q from a RQ decomposition with another matrix. More...
 
void blaze::ormrq (char side, char trans, int m, int n, int k, const double *A, int lda, const double *tau, double *C, int ldc, double *work, int lwork, int *info)
 LAPACK kernel for the multiplication of the double precision Q from a RQ decomposition with another matrix. More...
 
template<typename MT1 , bool SO1, typename MT2 , bool SO2>
void blaze::ormrq (DenseMatrix< MT1, SO1 > &C, const DenseMatrix< MT2, SO2 > &A, char side, char trans, const ElementType_< MT2 > *tau)
 LAPACK kernel for the multiplication of the double precision Q from a RQ decomposition with another matrix. More...
 

LAPACK LLH (Cholesky) decomposition functions (potrf)

void blaze::potrf (char uplo, int n, float *A, int lda, int *info)
 LAPACK kernel for the Cholesky decomposition of the given dense positive definite single precision column-major matrix. More...
 
void blaze::potrf (char uplo, int n, double *A, int lda, int *info)
 LAPACK kernel for the Cholesky decomposition of the given dense positive definite double precision column-major matrix. More...
 
void blaze::potrf (char uplo, int n, complex< float > *A, int lda, int *info)
 LAPACK kernel for the Cholesky decomposition of the given dense positive definite single precision complex column-major matrix. More...
 
void blaze::potrf (char uplo, int n, complex< double > *A, int lda, int *info)
 LAPACK kernel for the Cholesky decomposition of the given dense positive definite double precision complex column-major matrix. More...
 
template<typename MT , bool SO>
void blaze::potrf (DenseMatrix< MT, SO > &A, char uplo)
 LAPACK kernel for the Cholesky decomposition of the given dense positive definite matrix. More...
 

LAPACK LDLT decomposition functions (sytrf)

void blaze::sytrf (char uplo, int n, float *A, int lda, int *ipiv, float *work, int lwork, int *info)
 LAPACK kernel for the decomposition of the given dense symmetric indefinite single precision column-major matrix. More...
 
void blaze::sytrf (char uplo, int n, double *A, int lda, int *ipiv, double *work, int lwork, int *info)
 LAPACK kernel for the decomposition of the given dense symmetric indefinite double precision column-major matrix. More...
 
void blaze::sytrf (char uplo, int n, complex< float > *A, int lda, int *ipiv, complex< float > *work, int lwork, int *info)
 LAPACK kernel for the decomposition of the given dense symmetric indefinite single precision complex column-major matrix. More...
 
void blaze::sytrf (char uplo, int n, complex< double > *A, int lda, int *ipiv, complex< double > *work, int lwork, int *info)
 LAPACK kernel for the decomposition of the given dense symmetric indefinite double precision complex column-major matrix. More...
 
template<typename MT , bool SO>
void blaze::sytrf (DenseMatrix< MT, SO > &A, char uplo, int *ipiv)
 LAPACK kernel for the decomposition of the given dense symmetric indefinite matrix. More...
 

LAPACK functions to reconstruct Q from a LQ decomposition (unglq)

void blaze::unglq (int m, int n, int k, complex< float > *A, int lda, const complex< float > *tau, complex< float > *work, int lwork, int *info)
 LAPACK kernel for the reconstruction of the orthogonal matrix Q from a LQ decomposition. More...
 
void blaze::unglq (int m, int n, int k, complex< double > *A, int lda, const complex< double > *tau, complex< double > *work, int lwork, int *info)
 LAPACK kernel for the reconstruction of the orthogonal matrix Q from a LQ decomposition. More...
 
template<typename MT , bool SO>
void blaze::unglq (DenseMatrix< MT, SO > &A, const ElementType_< MT > *tau)
 LAPACK kernel for the reconstruction of the orthogonal matrix Q from a LQ decomposition. More...
 

LAPACK functions to reconstruct Q from a QL decomposition (ungql)

void blaze::ungql (int m, int n, int k, complex< float > *A, int lda, const complex< float > *tau, complex< float > *work, int lwork, int *info)
 LAPACK kernel for the reconstruction of the orthogonal matrix Q from a QL decomposition. More...
 
void blaze::ungql (int m, int n, int k, complex< double > *A, int lda, const complex< double > *tau, complex< double > *work, int lwork, int *info)
 LAPACK kernel for the reconstruction of the orthogonal matrix Q from a QL decomposition. More...
 
template<typename MT , bool SO>
void blaze::ungql (DenseMatrix< MT, SO > &A, const ElementType_< MT > *tau)
 LAPACK kernel for the reconstruction of the orthogonal matrix Q from a QL decomposition. More...
 

LAPACK functions to reconstruct Q from a QR decomposition (ungqr)

void blaze::ungqr (int m, int n, int k, complex< float > *A, int lda, const complex< float > *tau, complex< float > *work, int lwork, int *info)
 LAPACK kernel for the reconstruction of the orthogonal matrix Q from a QR decomposition. More...
 
void blaze::ungqr (int m, int n, int k, complex< double > *A, int lda, const complex< double > *tau, complex< double > *work, int lwork, int *info)
 LAPACK kernel for the reconstruction of the orthogonal matrix Q from a QR decomposition. More...
 
template<typename MT , bool SO>
void blaze::ungqr (DenseMatrix< MT, SO > &A, const ElementType_< MT > *tau)
 LAPACK kernel for the reconstruction of the orthogonal matrix Q from a QR decomposition. More...
 

LAPACK functions to reconstruct Q from a RQ decomposition (ungrq)

void blaze::ungrq (int m, int n, int k, complex< float > *A, int lda, const complex< float > *tau, complex< float > *work, int lwork, int *info)
 LAPACK kernel for the reconstruction of the orthogonal matrix Q from a RQ decomposition. More...
 
void blaze::ungrq (int m, int n, int k, complex< double > *A, int lda, const complex< double > *tau, complex< double > *work, int lwork, int *info)
 LAPACK kernel for the reconstruction of the orthogonal matrix Q from a RQ decomposition. More...
 
template<typename MT , bool SO>
void blaze::ungrq (DenseMatrix< MT, SO > &A, const ElementType_< MT > *tau)
 LAPACK kernel for the reconstruction of the orthogonal matrix Q from a RQ decomposition. More...
 

LAPACK functions to multiply Q from a LQ decomposition with a matrix (unmlq)

void blaze::unmlq (char side, char trans, int m, int n, int k, const complex< float > *A, int lda, const complex< float > *tau, complex< float > *C, int ldc, complex< float > *work, int lwork, int *info)
 LAPACK kernel for the multiplication of the single precision complex Q from a LQ decomposition with another matrix. More...
 
void blaze::unmlq (char side, char trans, int m, int n, int k, const complex< double > *A, int lda, const complex< double > *tau, complex< double > *C, int ldc, complex< double > *work, int lwork, int *info)
 LAPACK kernel for the multiplication of the double precision complex Q from a LQ decomposition with another matrix. More...
 
template<typename MT1 , bool SO, typename MT2 >
void blaze::unmlq (DenseMatrix< MT1, SO > &C, const DenseMatrix< MT2, SO > &A, char side, char trans, const ElementType_< MT2 > *tau)
 LAPACK kernel for the multiplication of the double precision Q from a LQ decomposition with another matrix. More...
 

LAPACK functions to multiply Q from a QL decomposition with a matrix (unmql)

void blaze::unmql (char side, char trans, int m, int n, int k, const complex< float > *A, int lda, const complex< float > *tau, complex< float > *C, int ldc, complex< float > *work, int lwork, int *info)
 LAPACK kernel for the multiplication of the single precision Q from a QL decomposition with another matrix. More...
 
void blaze::unmql (char side, char trans, int m, int n, int k, const complex< double > *A, int lda, const complex< double > *tau, complex< double > *C, int ldc, complex< double > *work, int lwork, int *info)
 LAPACK kernel for the multiplication of the double precision Q from a QL decomposition with another matrix. More...
 
template<typename MT1 , bool SO, typename MT2 >
void blaze::unmql (DenseMatrix< MT1, SO > &C, const DenseMatrix< MT2, SO > &A, char side, char trans, const ElementType_< MT2 > *tau)
 LAPACK kernel for the multiplication of the double precision Q from a QL decomposition with another matrix. More...
 

LAPACK functions to multiply Q from a QR decomposition with a matrix (unmqr)

void blaze::unmqr (char side, char trans, int m, int n, int k, const complex< float > *A, int lda, const complex< float > *tau, complex< float > *C, int ldc, complex< float > *work, int lwork, int *info)
 LAPACK kernel for the multiplication of the single precision Q from a QR decomposition with another matrix. More...
 
void blaze::unmqr (char side, char trans, int m, int n, int k, const complex< double > *A, int lda, const complex< double > *tau, complex< double > *C, int ldc, complex< double > *work, int lwork, int *info)
 LAPACK kernel for the multiplication of the double precision Q from a QR decomposition with another matrix. More...
 
template<typename MT1 , bool SO, typename MT2 >
void blaze::unmqr (DenseMatrix< MT1, SO > &C, DenseMatrix< MT2, SO > &A, char side, char trans, ElementType_< MT2 > *tau)
 LAPACK kernel for the multiplication of the double precision Q from a QR decomposition with another matrix. More...
 

LAPACK functions to multiply Q from a RQ decomposition with a matrix (unmrq)

void blaze::unmrq (char side, char trans, int m, int n, int k, const complex< float > *A, int lda, const complex< float > *tau, complex< float > *C, int ldc, complex< float > *work, int lwork, int *info)
 LAPACK kernel for the multiplication of the single precision Q from a RQ decomposition with another matrix. More...
 
void blaze::unmrq (char side, char trans, int m, int n, int k, const complex< double > *A, int lda, const complex< double > *tau, complex< double > *C, int ldc, complex< double > *work, int lwork, int *info)
 LAPACK kernel for the multiplication of the double precision Q from a RQ decomposition with another matrix. More...
 
template<typename MT1 , bool SO, typename MT2 >
void blaze::unmrq (DenseMatrix< MT1, SO > &C, const DenseMatrix< MT2, SO > &A, char side, char trans, const ElementType_< MT2 > *tau)
 LAPACK kernel for the multiplication of the double precision Q from a RQ decomposition with another matrix. More...
 

Detailed Description

Function Documentation

◆ gelqf() [1/5]

template<typename MT , bool SO>
void blaze::gelqf ( DenseMatrix< MT, SO > &  A,
ElementType_< MT > *  tau 
)
inline

LAPACK kernel for the LQ decomposition of the given dense matrix.

Parameters
AThe matrix to be decomposed.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
Returns
void

This function performs the dense matrix LQ decomposition of a general m-by-n matrix based on the LAPACK gelqf() functions. Note that this function can only be used for general, non-adapted matrices with float, double, complex<float>, or complex<double> element type. The attempt to call the function with any adapted matrix or matrices of any other element type results in a compile time error!
In case of a column-major matrix, the resulting decomposition has the form

\[ A = L \cdot Q, \]

where the Q is represented as a product of elementary reflectors

\[ Q = H(k) . . . H(2) H(1) \texttt{, with k = min(m,n).} \]

Each H(i) has the form

\[ H(i) = I - tau \cdot v \cdot v^T, \]

where tau is a real scalar, and v is a real vector with v(0:i-1) = 0 and v(i) = 1. v(i+1:n) is stored on exit in A(i,i+1:n), and tau in tau(i). Thus on exit the elements on and below the diagonal of the matrix contain the m-by-min(m,n) lower trapezoidal matrix L (L is lower triangular if m <= n); the elements above the diagonal, with the array tau, represent the orthogonal matrix Q as a product of min(m,n) elementary reflectors.

For more information on the gelqf() functions (i.e. sgelqf(), dgelqf(), cgelqf(), and zgelqf()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ gelqf() [2/5]

void blaze::gelqf ( int  m,
int  n,
float *  A,
int  lda,
float *  tau,
float *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the LQ decomposition of the given dense single precision column-major matrix.

Parameters
mThe number of rows of the given matrix $[0..\infty)$.
nThe number of columns of the given matrix $[0..\infty)$.
APointer to the first element of the single precision column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; size >= max( 1, n ).
infoReturn code of the function call.
Returns
void

This function performs the dense matrix LQ decomposition of a general m-by-n single precision column-major matrix based on the LAPACK sgelqf() function. The resulting decomposition has the form

\[ A = L \cdot Q, \]

where the Q is represented as a product of elementary reflectors

\[ Q = H(k) . . . H(2) H(1) \texttt{, with k = min(m,n).} \]

Each H(i) has the form

\[ H(i) = I - tau \cdot v \cdot v^T, \]

where tau is a real scalar, and v is a real vector with v(0:i-1) = 0 and v(i) = 1. v(i+1:n) is stored on exit in A(i,i+1:n), and tau in tau(i). Thus on exit the elements on and below the diagonal of the matrix contain the m-by-min(m,n) lower trapezoidal matrix L (L is lower triangular if m <= n); the elements above the diagonal, with the array tau, represent the orthogonal matrix Q as a product of min(m,n) elementary reflectors.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the sgelqf() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ gelqf() [3/5]

void blaze::gelqf ( int  m,
int  n,
double *  A,
int  lda,
double *  tau,
double *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the LQ decomposition of the given dense double precision column-major matrix.

Parameters
mThe number of rows of the given matrix $[0..\infty)$.
nThe number of columns of the given matrix $[0..\infty)$.
APointer to the first element of the double precision column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; size >= max( 1, n ).
infoReturn code of the function call.
Returns
void

This function performs the dense matrix LQ decomposition of a general m-by-n double precision column-major matrix based on the LAPACK sgelqf() function. The resulting decomposition has the form

\[ A = L \cdot Q, \]

where the Q is represented as a product of elementary reflectors

\[ Q = H(k) . . . H(2) H(1) \texttt{, with k = min(m,n).} \]

Each H(i) has the form

\[ H(i) = I - tau \cdot v \cdot v^T, \]

where tau is a real scalar, and v is a real vector with v(0:i-1) = 0 and v(i) = 1. v(i+1:n) is stored on exit in A(i,i+1:n), and tau in tau(i). Thus on exit the elements on and below the diagonal of the matrix contain the m-by-min(m,n) lower trapezoidal matrix L (L is lower triangular if m <= n); the elements above the diagonal, with the array tau, represent the orthogonal matrix Q as a product of min(m,n) elementary reflectors.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the sgelqf() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ gelqf() [4/5]

void blaze::gelqf ( int  m,
int  n,
complex< float > *  A,
int  lda,
complex< float > *  tau,
complex< float > *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the LQ decomposition of the given dense single precision complex column-major matrix.

Parameters
mThe number of rows of the given matrix $[0..\infty)$.
nThe number of columns of the given matrix $[0..\infty)$.
APointer to the first element of the single precision complex column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; size >= max( 1, n ).
infoReturn code of the function call.
Returns
void

This function performs the dense matrix LQ decomposition of a general m-by-n single precision complex column-major matrix based on the LAPACK sgelqf() function. The resulting decomposition has the form

\[ A = L \cdot Q, \]

where the Q is represented as a product of elementary reflectors

\[ Q = H(k) . . . H(2) H(1) \texttt{, with k = min(m,n).} \]

Each H(i) has the form

\[ H(i) = I - tau \cdot v \cdot v^T, \]

where tau is a real scalar, and v is a real vector with v(0:i-1) = 0 and v(i) = 1. v(i+1:n) is stored on exit in A(i,i+1:n), and tau in tau(i). Thus on exit the elements on and below the diagonal of the matrix contain the m-by-min(m,n) lower trapezoidal matrix L (L is lower triangular if m <= n); the elements above the diagonal, with the array tau, represent the orthogonal matrix Q as a product of min(m,n) elementary reflectors.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the sgelqf() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ gelqf() [5/5]

void blaze::gelqf ( int  m,
int  n,
complex< double > *  A,
int  lda,
complex< double > *  tau,
complex< double > *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the LQ decomposition of the given dense double precision complex column-major matrix.

Parameters
mThe number of rows of the given matrix $[0..\infty)$.
nThe number of columns of the given matrix $[0..\infty)$.
APointer to the first element of the double precision complex column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; size >= max( 1, n ).
infoReturn code of the function call.
Returns
void

This function performs the dense matrix LQ decomposition of a general m-by-n double precision complex column-major matrix based on the LAPACK sgelqf() function. The resulting decomposition has the form

\[ A = L \cdot Q, \]

where the Q is represented as a product of elementary reflectors

\[ Q = H(k) . . . H(2) H(1) \texttt{, with k = min(m,n).} \]

Each H(i) has the form

\[ H(i) = I - tau \cdot v \cdot v^T, \]

where tau is a real scalar, and v is a real vector with v(0:i-1) = 0 and v(i) = 1. v(i+1:n) is stored on exit in A(i,i+1:n), and tau in tau(i). Thus on exit the elements on and below the diagonal of the matrix contain the m-by-min(m,n) lower trapezoidal matrix L (L is lower triangular if m <= n); the elements above the diagonal, with the array tau, represent the orthogonal matrix Q as a product of min(m,n) elementary reflectors.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the sgelqf() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ geqlf() [1/5]

template<typename MT , bool SO>
void blaze::geqlf ( DenseMatrix< MT, SO > &  A,
ElementType_< MT > *  tau 
)
inline

LAPACK kernel for the QL decomposition of the given dense matrix.

Parameters
AThe matrix to be decomposed.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
Returns
void

This function performs the dense matrix QL decomposition of a general m-by-n matrix based on the LAPACK geqlf() functions. Note that this function can only be used for general, non-adapted matrices with float, double, complex<float>, or complex<double> element type. The attempt to call the function with any adapted matrix or matrices of any other element type results in a compile time error!
In case of a column-major matrix, the resulting decomposition has the form

\[ A = Q \cdot L, \]

where the Q is represented as a product of elementary reflectors

\[ Q = H(k) ... H(2) H(1) \texttt{, with k = min(m,n).} \]

Each H(i) has the form

\[ H(i) = I - tau \cdot v \cdot v^T, \]

where tau is a real scalar, and v is a real vector with v(m-k+i+1:m) = 0 and v(m-k+i) = 1. v(1:m-k+i-1) is stored on exit in A(1:m-k+i-1,n-k+i), and tau in tau(i). Thus in case m >= n, the lower triangle of the subarray A(m-n+1:m,1:n) contains the n-by-n lower triangular matrix L and in case m <= n, the elements on and below the (n-m)-th subdiagonal contain the m-by-n lower trapezoidal matrix L; the remaining elements in combination with the array tau represent the orthogonal matrix Q as a product of min(m,n) elementary reflectors.

For more information on the geqlf() functions (i.e. sgeqlf(), dgeqlf(), cgeqlf(), and zgeqlf()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ geqlf() [2/5]

void blaze::geqlf ( int  m,
int  n,
float *  A,
int  lda,
float *  tau,
float *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the QL decomposition of the given dense single precision column-major matrix.

Parameters
mThe number of rows of the given matrix $[0..\infty)$.
nThe number of columns of the given matrix $[0..\infty)$.
APointer to the first element of the single precision column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; size >= max( 1, n ).
infoReturn code of the function call.
Returns
void

This function performs the dense matrix QL decomposition of a general m-by-n single precision column-major matrix based on the LAPACK sgeqlf() function. The resulting decomposition has the form

\[ A = Q \cdot L, \]

where the Q is represented as a product of elementary reflectors

\[ Q = H(k) ... H(2) H(1) \texttt{, with k = min(m,n).} \]

Each H(i) has the form

\[ H(i) = I - tau \cdot v \cdot v^T, \]

where tau is a real scalar, and v is a real vector with v(m-k+i+1:m) = 0 and v(m-k+i) = 1. v(1:m-k+i-1) is stored on exit in A(1:m-k+i-1,n-k+i), and tau in tau(i). Thus in case m >= n, the lower triangle of the subarray A(m-n+1:m,1:n) contains the n-by-n lower triangular matrix L and in case m <= n, the elements on and below the (n-m)-th subdiagonal contain the m-by-n lower trapezoidal matrix L; the remaining elements in combination with the array tau represent the orthogonal matrix Q as a product of min(m,n) elementary reflectors.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the sgeqlf() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ geqlf() [3/5]

void blaze::geqlf ( int  m,
int  n,
double *  A,
int  lda,
double *  tau,
double *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the QL decomposition of the given dense double precision column-major matrix.

Parameters
mThe number of rows of the given matrix $[0..\infty)$.
nThe number of columns of the given matrix $[0..\infty)$.
APointer to the first element of the double precision column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; size >= max( 1, n ).
infoReturn code of the function call.
Returns
void

This function performs the dense matrix QL decomposition of a general m-by-n double precision column-major matrix based on the LAPACK sgeqlf() function. The resulting decomposition has the form

\[ A = Q \cdot L, \]

where the Q is represented as a product of elementary reflectors

\[ Q = H(k) ... H(2) H(1) \texttt{, with k = min(m,n).} \]

Each H(i) has the form

\[ H(i) = I - tau \cdot v \cdot v^T, \]

where tau is a real scalar, and v is a real vector with v(m-k+i+1:m) = 0 and v(m-k+i) = 1. v(1:m-k+i-1) is stored on exit in A(1:m-k+i-1,n-k+i), and tau in tau(i). Thus in case m >= n, the lower triangle of the subarray A(m-n+1:m,1:n) contains the n-by-n lower triangular matrix L and in case m <= n, the elements on and below the (n-m)-th subdiagonal contain the m-by-n lower trapezoidal matrix L; the remaining elements in combination with the array tau represent the orthogonal matrix Q as a product of min(m,n) elementary reflectors.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the sgeqlf() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ geqlf() [4/5]

void blaze::geqlf ( int  m,
int  n,
complex< float > *  A,
int  lda,
complex< float > *  tau,
complex< float > *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the QL decomposition of the given dense single precision complex column-major matrix.

Parameters
mThe number of rows of the given matrix $[0..\infty)$.
nThe number of columns of the given matrix $[0..\infty)$.
APointer to the first element of the single precision complex column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; size >= max( 1, n ).
infoReturn code of the function call.
Returns
void

This function performs the dense matrix QL decomposition of a general m-by-n single precision complex column-major matrix based on the LAPACK sgeqlf() function. The resulting decomposition has the form

\[ A = Q \cdot L, \]

where the Q is represented as a product of elementary reflectors

\[ Q = H(k) ... H(2) H(1) \texttt{, with k = min(m,n).} \]

Each H(i) has the form

\[ H(i) = I - tau \cdot v \cdot v^T, \]

where tau is a real scalar, and v is a real vector with v(m-k+i+1:m) = 0 and v(m-k+i) = 1. v(1:m-k+i-1) is stored on exit in A(1:m-k+i-1,n-k+i), and tau in tau(i). Thus in case m >= n, the lower triangle of the subarray A(m-n+1:m,1:n) contains the n-by-n lower triangular matrix L and in case m <= n, the elements on and below the (n-m)-th subdiagonal contain the m-by-n lower trapezoidal matrix L; the remaining elements in combination with the array tau represent the orthogonal matrix Q as a product of min(m,n) elementary reflectors.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the sgeqlf() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ geqlf() [5/5]

void blaze::geqlf ( int  m,
int  n,
complex< double > *  A,
int  lda,
complex< double > *  tau,
complex< double > *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the QL decomposition of the given dense double precision complex column-major matrix.

Parameters
mThe number of rows of the given matrix $[0..\infty)$.
nThe number of columns of the given matrix $[0..\infty)$.
APointer to the first element of the double precision complex column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; size >= max( 1, n ).
infoReturn code of the function call.
Returns
void

This function performs the dense matrix QL decomposition of a general m-by-n double precision complex column-major matrix based on the LAPACK sgeqlf() function. The resulting decomposition has the form

\[ A = Q \cdot L, \]

where the Q is represented as a product of elementary reflectors

\[ Q = H(k) ... H(2) H(1) \texttt{, with k = min(m,n).} \]

Each H(i) has the form

\[ H(i) = I - tau \cdot v \cdot v^T, \]

where tau is a real scalar, and v is a real vector with v(m-k+i+1:m) = 0 and v(m-k+i) = 1. v(1:m-k+i-1) is stored on exit in A(1:m-k+i-1,n-k+i), and tau in tau(i). Thus in case m >= n, the lower triangle of the subarray A(m-n+1:m,1:n) contains the n-by-n lower triangular matrix L and in case m <= n, the elements on and below the (n-m)-th subdiagonal contain the m-by-n lower trapezoidal matrix L; the remaining elements in combination with the array tau represent the orthogonal matrix Q as a product of min(m,n) elementary reflectors.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the sgeqlf() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ geqp3() [1/2]

void blaze::geqp3 ( int  m,
int  n,
float *  A,
int  lda,
int *  jpvt,
float *  tau,
float *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the QR decomposition of the given dense single precision column-major matrix.

Parameters
mThe number of rows of the given matrix $[0..\infty)$.
nThe number of columns of the given matrix $[0..\infty)$.
APointer to the first element of the single precision column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
jpvtAuxiliary array for the pivot indices; size = n.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; size >= $ 3*n+1 $.
infoReturn code of the function call.
Returns
void

This function performs the dense matrix QR decomposition of a general m-by-n single precision column-major matrix based on the LAPACK sgeqp3() function. The resulting decomposition has the form

\[ A = Q \cdot R, \]

where the Q is represented as a product of elementary reflectors

\[ Q = H(1) H(2) . . . H(k) \texttt{, with k = min(m,n).} \]

Each H(i) has the form

\[ H(i) = I - tau \cdot v \cdot v^T, \]

where tau is a real scalar, and v is a real vector with v(0:i-1) = 0 and v(i) = 1. v(i+1:m) is stored on exit in A(i+1:m,i), and tau in tau(i). Thus on exit the elements on and above the diagonal of the matrix contain the min(m,n)-by-n upper trapezoidal matrix R (R is upper triangular if m >= n); the elements below the diagonal, with the array tau, represent the orthogonal matrix Q as a product of min(m,n) elementary reflectors.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the sgeqp3() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ geqp3() [2/2]

void blaze::geqp3 ( int  m,
int  n,
double *  A,
int  lda,
int *  jpvt,
double *  tau,
double *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the QR decomposition of the given dense double precision column-major matrix.

Parameters
mThe number of rows of the given matrix $[0..\infty)$.
nThe number of columns of the given matrix $[0..\infty)$.
APointer to the first element of the double precision column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
jpvtAuxiliary array for the pivot indices; size = n.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; size >= $ 3*n+1 $.
infoReturn code of the function call.
Returns
void

This function performs the dense matrix QR decomposition of a general m-by-n double precision column-major matrix based on the LAPACK dgeqp3() function. The resulting decomposition has the form

\[ A = Q \cdot R, \]

where the Q is represented as a product of elementary reflectors

\[ Q = H(1) H(2) . . . H(k) \texttt{, with k = min(m,n).} \]

Each H(i) has the form

\[ H(i) = I - tau \cdot v \cdot v^T, \]

where tau is a real scalar, and v is a real vector with v(0:i-1) = 0 and v(i) = 1. v(i+1:m) is stored on exit in A(i+1:m,i), and tau in tau(i). Thus on exit the elements on and above the diagonal of the matrix contain the min(m,n)-by-n upper trapezoidal matrix R (R is upper triangular if m >= n); the elements below the diagonal, with the array tau, represent the orthogonal matrix Q as a product of min(m,n) elementary reflectors.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the dgeqp3() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ geqrf() [1/5]

template<typename MT , bool SO>
void blaze::geqrf ( DenseMatrix< MT, SO > &  A,
ElementType_< MT > *  tau 
)
inline

LAPACK kernel for the QR decomposition of the given dense matrix.

Parameters
AThe matrix to be decomposed.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
Returns
void

This function performs the dense matrix QR decomposition of a general m-by-n matrix based on the LAPACK geqrf() functions. Note that this function can only be used for general, non-adapted matrices with float, double, complex<float>, or complex<double> element type. The attempt to call the function with any adapted matrix or matrices of any other element type results in a compile time error!
In case of a column-major matrix, the resulting decomposition has the form

\[ A = Q \cdot R, \]

where the Q is represented as a product of elementary reflectors

\[ Q = H(1) H(2) . . . H(k) \texttt{, with k = min(m,n).} \]

Each H(i) has the form

\[ H(i) = I - tau \cdot v \cdot v^T, \]

where tau is a real scalar, and v is a real vector with v(0:i-1) = 0 and v(i) = 1. v(i+1:m) is stored on exit in A(i+1:m,i), and tau in tau(i). Thus on exit the elements on and above the diagonal of the matrix contain the min(m,n)-by-n upper trapezoidal matrix R (R is upper triangular if m >= n); the elements below the diagonal, with the array tau, represent the orthogonal matrix Q as a product of min(m,n) elementary reflectors.

For more information on the geqrf() functions (i.e. sgeqrf(), dgeqrf(), cgeqrf(), and zgeqrf()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ geqrf() [2/5]

void blaze::geqrf ( int  m,
int  n,
float *  A,
int  lda,
float *  tau,
float *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the QR decomposition of the given dense single precision column-major matrix.

Parameters
mThe number of rows of the given matrix $[0..\infty)$.
nThe number of columns of the given matrix $[0..\infty)$.
APointer to the first element of the single precision column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; size >= max( 1, n ).
infoReturn code of the function call.
Returns
void

This function performs the dense matrix QR decomposition of a general m-by-n single precision column-major matrix based on the LAPACK sgeqrf() function. The resulting decomposition has the form

\[ A = Q \cdot R, \]

where the Q is represented as a product of elementary reflectors

\[ Q = H(1) H(2) . . . H(k) \texttt{, with k = min(m,n).} \]

Each H(i) has the form

\[ H(i) = I - tau \cdot v \cdot v^T, \]

where tau is a real scalar, and v is a real vector with v(0:i-1) = 0 and v(i) = 1. v(i+1:m) is stored on exit in A(i+1:m,i), and tau in tau(i). Thus on exit the elements on and above the diagonal of the matrix contain the min(m,n)-by-n upper trapezoidal matrix R (R is upper triangular if m >= n); the elements below the diagonal, with the array tau, represent the orthogonal matrix Q as a product of min(m,n) elementary reflectors.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the sgeqrf() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ geqrf() [3/5]

void blaze::geqrf ( int  m,
int  n,
double *  A,
int  lda,
double *  tau,
double *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the QR decomposition of the given dense double precision column-major matrix.

Parameters
mThe number of rows of the given matrix $[0..\infty)$.
nThe number of columns of the given matrix $[0..\infty)$.
APointer to the first element of the double precision column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; size >= max( 1, n ).
infoReturn code of the function call.
Returns
void

This function performs the dense matrix QR decomposition of a general m-by-n double precision column-major matrix based on the LAPACK dgeqrf() function. The resulting decomposition has the form

\[ A = Q \cdot R, \]

where the Q is represented as a product of elementary reflectors

\[ Q = H(1) H(2) . . . H(k) \texttt{, with k = min(m,n).} \]

Each H(i) has the form

\[ H(i) = I - tau \cdot v \cdot v^T, \]

where tau is a real scalar, and v is a real vector with v(0:i-1) = 0 and v(i) = 1. v(i+1:m) is stored on exit in A(i+1:m,i), and tau in tau(i). Thus on exit the elements on and above the diagonal of the matrix contain the min(m,n)-by-n upper trapezoidal matrix R (R is upper triangular if m >= n); the elements below the diagonal, with the array tau, represent the orthogonal matrix Q as a product of min(m,n) elementary reflectors.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the dgeqrf() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ geqrf() [4/5]

void blaze::geqrf ( int  m,
int  n,
complex< float > *  A,
int  lda,
complex< float > *  tau,
complex< float > *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the QR decomposition of the given dense single precision complex column-major matrix.

Parameters
mThe number of rows of the given matrix $[0..\infty)$.
nThe number of columns of the given matrix $[0..\infty)$.
APointer to the first element of the single precision complex column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; size >= max( 1, n ).
infoReturn code of the function call.
Returns
void

This function performs the dense matrix QR decomposition of a general m-by-n single precision complex column-major matrix based on the LAPACK cgeqrf() function. The resulting decomposition has the form

\[ A = Q \cdot R, \]

where the Q is represented as a product of elementary reflectors

\[ Q = H(1) H(2) . . . H(k) \texttt{, with k = min(m,n).} \]

Each H(i) has the form

\[ H(i) = I - tau \cdot v \cdot v^T, \]

where tau is a real scalar, and v is a real vector with v(0:i-1) = 0 and v(i) = 1. v(i+1:m) is stored on exit in A(i+1:m,i), and tau in tau(i). Thus on exit the elements on and above the diagonal of the matrix contain the min(m,n)-by-n upper trapezoidal matrix R (R is upper triangular if m >= n); the elements below the diagonal, with the array tau, represent the orthogonal matrix Q as a product of min(m,n) elementary reflectors.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the cgeqrf() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ geqrf() [5/5]

void blaze::geqrf ( int  m,
int  n,
complex< double > *  A,
int  lda,
complex< double > *  tau,
complex< double > *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the QR decomposition of the given dense double precision complex column-major matrix.

Parameters
mThe number of rows of the given matrix $[0..\infty)$.
nThe number of columns of the given matrix $[0..\infty)$.
APointer to the first element of the double precision complex column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; size >= max( 1, n ).
infoReturn code of the function call.
Returns
void

This function performs the dense matrix QR decomposition of a general m-by-n double precision complex column-major matrix based on the LAPACK zgeqrf() function. The resulting decomposition has the form

\[ A = Q \cdot R, \]

where the Q is represented as a product of elementary reflectors

\[ Q = H(1) H(2) . . . H(k) \texttt{, with k = min(m,n).} \]

Each H(i) has the form

\[ H(i) = I - tau \cdot v \cdot v^T, \]

where tau is a real scalar, and v is a real vector with v(0:i-1) = 0 and v(i) = 1. v(i+1:m) is stored on exit in A(i+1:m,i), and tau in tau(i). Thus on exit the elements on and above the diagonal of the matrix contain the min(m,n)-by-n upper trapezoidal matrix R (R is upper triangular if m >= n); the elements below the diagonal, with the array tau, represent the orthogonal matrix Q as a product of min(m,n) elementary reflectors.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the zgeqrf() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ gerqf() [1/5]

template<typename MT , bool SO>
void blaze::gerqf ( DenseMatrix< MT, SO > &  A,
ElementType_< MT > *  tau 
)
inline

LAPACK kernel for the RQ decomposition of the given dense matrix.

Parameters
AThe matrix to be decomposed.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
Returns
void

This function performs the dense matrix RQ decomposition of a general m-by-n matrix based on the LAPACK gerqf() functions. Note that this function can only be used for general, non-adapted matrices with float, double, complex<float>, or complex<double> element type. The attempt to call the function with any adapted matrix or matrices of any other element type results in a compile time error!
In case of a column-major matrix, the resulting decomposition has the form

\[ A = R \cdot Q, \]

where the Q is represented as a product of elementary reflectors

\[ Q = H(1) H(2) . . . H(k) \texttt{, with k = min(m,n).} \]

Each H(i) has the form

\[ H(i) = I - tau \cdot v \cdot v^T, \]

where tau is a real scalar, and v is a real vector with v(n-k+i+1:n) = 0 and v(n-k+i) = 1. v(1:n-k+i-1) is stored on exit in A(m-k+i,1:n-k+i-1), and tau in tau(i). Thus in case m <= n, the upper triangle of the subarray A(1:m,n-m+1:n) contains the m-by-m upper triangular matrix R and in case m >= n, the elements on and above the (m-n)-th subdiagonal contain the m-by-n upper trapezoidal matrix R; the remaining elements in combination with the array tau represent the orthogonal matrix Q as a product of min(m,n) elementary reflectors.

For more information on the gerqf() functions (i.e. sgerqf(), dgerqf(), cgerqf(), and zgerqf()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ gerqf() [2/5]

void blaze::gerqf ( int  m,
int  n,
float *  A,
int  lda,
float *  tau,
float *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the RQ decomposition of the given dense single precision column-major matrix.

Parameters
mThe number of rows of the given matrix $[0..\infty)$.
nThe number of columns of the given matrix $[0..\infty)$.
APointer to the first element of the single precision column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; size >= max( 1, n ).
infoReturn code of the function call.
Returns
void

This function performs the dense matrix RQ decomposition of a general m-by-n single precision column-major matrix based on the LAPACK sgerqf() function. The resulting decomposition has the form

\[ A = R \cdot Q, \]

where the Q is represented as a product of elementary reflectors

\[ Q = H(1) H(2) . . . H(k) \texttt{, with k = min(m,n).} \]

Each H(i) has the form

\[ H(i) = I - tau \cdot v \cdot v^T, \]

where tau is a real scalar, and v is a real vector with v(n-k+i+1:n) = 0 and v(n-k+i) = 1. v(1:n-k+i-1) is stored on exit in A(m-k+i,1:n-k+i-1), and tau in tau(i). Thus in case m <= n, the upper triangle of the subarray A(1:m,n-m+1:n) contains the m-by-m upper triangular matrix R and in case m >= n, the elements on and above the (m-n)-th subdiagonal contain the m-by-n upper trapezoidal matrix R; the remaining elements in combination with the array tau represent the orthogonal matrix Q as a product of min(m,n) elementary reflectors.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the sgerqf() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ gerqf() [3/5]

void blaze::gerqf ( int  m,
int  n,
double *  A,
int  lda,
double *  tau,
double *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the RQ decomposition of the given dense single precision column-major matrix.

Parameters
mThe number of rows of the given matrix $[0..\infty)$.
nThe number of columns of the given matrix $[0..\infty)$.
APointer to the first element of the double precision column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; size >= max( 1, n ).
infoReturn code of the function call.
Returns
void

This function performs the dense matrix RQ decomposition of a general m-by-n double precision column-major matrix based on the LAPACK dgerqf() function. The resulting decomposition has the form

\[ A = R \cdot Q, \]

where the Q is represented as a product of elementary reflectors

\[ Q = H(1) H(2) . . . H(k) \texttt{, with k = min(m,n).} \]

Each H(i) has the form

\[ H(i) = I - tau \cdot v \cdot v^T, \]

where tau is a real scalar, and v is a real vector with v(n-k+i+1:n) = 0 and v(n-k+i) = 1. v(1:n-k+i-1) is stored on exit in A(m-k+i,1:n-k+i-1), and tau in tau(i). Thus in case m <= n, the upper triangle of the subarray A(1:m,n-m+1:n) contains the m-by-m upper triangular matrix R and in case m >= n, the elements on and above the (m-n)-th subdiagonal contain the m-by-n upper trapezoidal matrix R; the remaining elements in combination with the array tau represent the orthogonal matrix Q as a product of min(m,n) elementary reflectors.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the dgerqf() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ gerqf() [4/5]

void blaze::gerqf ( int  m,
int  n,
complex< float > *  A,
int  lda,
complex< float > *  tau,
complex< float > *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the RQ decomposition of the given dense single precision complex column-major matrix.

Parameters
mThe number of rows of the given matrix $[0..\infty)$.
nThe number of columns of the given matrix $[0..\infty)$.
APointer to the first element of the single precision complex column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; size >= max( 1, n ).
infoReturn code of the function call.
Returns
void

This function performs the dense matrix RQ decomposition of a general m-by-n single precision complex column-major matrix based on the LAPACK cgerqf() function. The resulting decomposition has the form

\[ A = R \cdot Q, \]

where the Q is represented as a product of elementary reflectors

\[ Q = H(1) H(2) . . . H(k) \texttt{, with k = min(m,n).} \]

Each H(i) has the form

\[ H(i) = I - tau \cdot v \cdot v^T, \]

where tau is a real scalar, and v is a real vector with v(n-k+i+1:n) = 0 and v(n-k+i) = 1. v(1:n-k+i-1) is stored on exit in A(m-k+i,1:n-k+i-1), and tau in tau(i). Thus in case m <= n, the upper triangle of the subarray A(1:m,n-m+1:n) contains the m-by-m upper triangular matrix R and in case m >= n, the elements on and above the (m-n)-th subdiagonal contain the m-by-n upper trapezoidal matrix R; the remaining elements in combination with the array tau represent the orthogonal matrix Q as a product of min(m,n) elementary reflectors.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the cgerqf() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ gerqf() [5/5]

void blaze::gerqf ( int  m,
int  n,
complex< double > *  A,
int  lda,
complex< double > *  tau,
complex< double > *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the RQ decomposition of the given dense double precision complex column-major matrix.

Parameters
mThe number of rows of the given matrix $[0..\infty)$.
nThe number of columns of the given matrix $[0..\infty)$.
APointer to the first element of the double precision complex column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; size >= max( 1, n ).
infoReturn code of the function call.
Returns
void

This function performs the dense matrix RQ decomposition of a general m-by-n double precision complex column-major matrix based on the LAPACK zgerqf() function. The resulting decomposition has the form

\[ A = R \cdot Q, \]

where the Q is represented as a product of elementary reflectors

\[ Q = H(1) H(2) . . . H(k) \texttt{, with k = min(m,n).} \]

Each H(i) has the form

\[ H(i) = I - tau \cdot v \cdot v^T, \]

where tau is a real scalar, and v is a real vector with v(n-k+i+1:n) = 0 and v(n-k+i) = 1. v(1:n-k+i-1) is stored on exit in A(m-k+i,1:n-k+i-1), and tau in tau(i). Thus in case m <= n, the upper triangle of the subarray A(1:m,n-m+1:n) contains the m-by-m upper triangular matrix R and in case m >= n, the elements on and above the (m-n)-th subdiagonal contain the m-by-n upper trapezoidal matrix R; the remaining elements in combination with the array tau represent the orthogonal matrix Q as a product of min(m,n) elementary reflectors.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the zgerqf() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ getrf() [1/5]

template<typename MT , bool SO>
void blaze::getrf ( DenseMatrix< MT, SO > &  A,
int *  ipiv 
)
inline

LAPACK kernel for the LU decomposition of the given dense general matrix.

Parameters
AThe matrix to be decomposed.
ipivAuxiliary array for the pivot indices; size >= min( m, n ).
Returns
void

This function performs the dense matrix LU decomposition of a general m-by-n matrix based on the LAPACK getrf() functions, which use partial pivoting with row/column interchanges. Note that the function only works for general, non-adapted matrices with float, double, complex<float>, or complex<double> element type. The attempt to call the function with adaptors or matrices of any other element type results in a compile time error!
In case of a column-major matrix, the resulting decomposition has the form

\[ A = P \cdot L \cdot U, \]

where L is a lower unitriangular matrix (lower trapezoidal if m > n), U is an upper triangular matrix (upper trapezoidal if m < n), and P is an m-by-m permutation matrix, which represents the pivoting indices for the applied row interchanges.

In case of a row-major matrix, the resulting decomposition has the form

\[ A = L \cdot U \cdot P, \]

where P is an n-by-n permutation matrix, which represents the pivoting indices for the applied column interchanges, L is a lower triangular matrix (lower trapezoidal if m > n), and U is an upper unitriangular matrix (upper trapezoidal if m < n).

The resulting decomposition is stored within the matrix A: L is stored in the lower part of A and U is stored in the upper part. The unit diagonal elements of L or U are not stored.

For more information on the getrf() functions (i.e. sgetrf(), dgetrf(), cgetrf(), and zgetrf()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.
The LU decomposition will never fail, even for singular matrices. However, in case of a singular matrix the resulting decomposition cannot be used for a matrix inversion or solving a linear system of equations.

◆ getrf() [2/5]

void blaze::getrf ( int  m,
int  n,
float *  A,
int  lda,
int *  ipiv,
int *  info 
)
inline

LAPACK kernel for the LU decomposition of the given dense general single precision column-major matrix.

Parameters
mThe number of rows of the given matrix $[0..\infty)$.
nThe number of columns of the given matrix $[0..\infty)$.
APointer to the first element of the single precision column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
ipivAuxiliary array for the pivot indices; size >= min( m, n ).
infoReturn code of the function call.
Returns
void

This function performs the dense matrix LU decomposition of a general m-by-n single precision column-major matrix based on the LAPACK sgetrf() function, which uses partial pivoting with row interchanges. The resulting decomposition has the form

\[ A = P \cdot L \cdot U, \]

where P is a permutation matrix, L is a lower unitriangular matrix (lower trapezoidal if m > n), and U is an upper triangular matrix (upper trapezoidal if m < n). The resulting decomposition is stored within the matrix A: L is stored in the lower part of A and U is stored in the upper part. The unit diagonal elements of L are not stored.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: If info = -i, the i-th argument had an illegal value.
  • > 0: If info = i, the decomposition has been completed, but the factor U(i,i) is singular.

For more information on the sgetrf() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ getrf() [3/5]

void blaze::getrf ( int  m,
int  n,
double *  A,
int  lda,
int *  ipiv,
int *  info 
)
inline

LAPACK kernel for the LU decomposition of the given dense general double precision column-major matrix.

Parameters
mThe number of rows of the given matrix $[0..\infty)$.
nThe number of columns of the given matrix $[0..\infty)$.
APointer to the first element of the double precision column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
ipivAuxiliary array for the pivot indices; size >= min( m, n ).
infoReturn code of the function call.
Returns
void

This function performs the dense matrix LU decomposition of a general m-by-n double precision column-major matrix based on the LAPACK dgetrf() function, which uses partial pivoting with row interchanges. The resulting decomposition has the form

\[ A = P \cdot L \cdot U, \]

where P is a permutation matrix, L is a lower unitriangular matrix (lower trapezoidal if m > n), and U is an upper triangular matrix (upper trapezoidal if m < n). The resulting decomposition is stored within the matrix A: L is stored in the lower part of A and U is stored in the upper part. The unit diagonal elements of L are not stored.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: If info = -i, the i-th argument had an illegal value.
  • > 0: If info = i, the decomposition has been completed, but the factor U(i,i) is singular.

For more information on the dgetrf() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ getrf() [4/5]

void blaze::getrf ( int  m,
int  n,
complex< float > *  A,
int  lda,
int *  ipiv,
int *  info 
)
inline

LAPACK kernel for the LU decomposition of the given dense general single precision complex column-major matrix.

Parameters
mThe number of rows of the given matrix $[0..\infty)$.
nThe number of columns of the given matrix $[0..\infty)$.
APointer to the first element of the single precision complex column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
ipivAuxiliary array for the pivot indices; size >= min( m, n ).
infoReturn code of the function call.
Returns
void

This function performs the dense matrix LU decomposition of a general m-by-n single precision complex column-major matrix based on the LAPACK cgetrf() function, which uses partial pivoting with row interchanges. The resulting decomposition has the form

\[ A = P \cdot L \cdot U, \]

where P is a permutation matrix, L is a lower unitriangular matrix (lower trapezoidal if m > n), and U is an upper triangular matrix (upper trapezoidal if m < n). The resulting decomposition is stored within the matrix A: L is stored in the lower part of A and U is stored in the upper part. The unit diagonal elements of L are not stored.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: If info = -i, the i-th argument had an illegal value.
  • > 0: If info = i, the decomposition has been completed, but the factor U(i,i) is singular.

For more information on the cgetrf() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ getrf() [5/5]

void blaze::getrf ( int  m,
int  n,
complex< double > *  A,
int  lda,
int *  ipiv,
int *  info 
)
inline

LAPACK kernel for the LU decomposition of the given dense general double precision complex column-major matrix.

Parameters
mThe number of rows of the given matrix $[0..\infty)$.
nThe number of columns of the given matrix $[0..\infty)$.
APointer to the first element of the double precision complex column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
ipivAuxiliary array for the pivot indices; size >= min( m, n ).
infoReturn code of the function call.
Returns
void

This function performs the dense matrix LU decomposition of a general m-by-n double precision complex column-major matrix based on the LAPACK zgetrf() function, which uses partial pivoting with row interchanges. The resulting decomposition has the form

\[ A = P \cdot L \cdot U, \]

where P is a permutation matrix, L is a lower unitriangular matrix (lower trapezoidal if m > n), and U is an upper triangular matrix (upper trapezoidal if m < n). The resulting decomposition is stored within the matrix A: L is stored in the lower part of A and U is stored in the upper part. The unit diagonal elements of L are not stored.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: If info = -i, the i-th argument had an illegal value.
  • > 0: If info = i, the decomposition has been completed, but the factor U(i,i) is singular.

For more information on the zgetrf() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ hetrf() [1/3]

template<typename MT , bool SO>
void blaze::hetrf ( DenseMatrix< MT, SO > &  A,
char  uplo,
int *  ipiv 
)
inline

LAPACK kernel for the decomposition of the given dense Hermitian indefinite matrix.

Parameters
AThe matrix to be decomposed.
uplo'L' to use the lower part of the matrix, 'U' to use the upper part.
ipivAuxiliary array of size n for the pivot indices.
Returns
void
Exceptions
std::invalid_argumentInvalid non-square matrix provided.
std::invalid_argumentInvalid uplo argument provided.

This function performs the dense matrix decomposition of a Hermitian indefinite matrix based on the LAPACK hetrf() functions, which use the Bunch-Kaufman diagonal pivoting method. Note that the function only works for general, non-adapted matrices with complex<float> or complex<double> element type. The attempt to call the function with any adapted matrix or matrices of any other element type results in a compile time error!
The decomposition has the form

\[ A = U D U^{H} \texttt{ (if uplo = 'U'), or } A = L D L^{H} \texttt{ (if uplo = 'L'), } \]

where U (or L) is a product of permutation and unit upper (lower) triangular matrices, and D is Hermitian and block diagonal with 1-by-1 and 2-by-2 diagonal blocks. The resulting decomposition is stored within A: In case uplo is set to 'L' the result is stored in the lower part of the matrix and the upper part remains untouched, in case uplo is set to 'U' the result is stored in the upper part and the lower part remains untouched.

The function fails if ...

  • ... the given matrix is not a square matrix;
  • ... the given uplo argument is neither 'L' nor 'U'.

In all failure cases a std::invalid_argument exception is thrown.

For more information on the hetrf() functions (i.e. chetrf() and zhetrf()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ hetrf() [2/3]

void blaze::hetrf ( char  uplo,
int  n,
complex< float > *  A,
int  lda,
int *  ipiv,
complex< float > *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the decomposition of the given dense Hermitian indefinite single precision complex column-major matrix.

Parameters
uplo'L' to use the lower part of the matrix, 'U' to use the upper part.
nThe number of rows/columns of the Hermitian matrix $[0..\infty)$.
APointer to the first element of the single precision complex column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
ipivAuxiliary array of size n for the pivot indices.
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; size >= max( 1, n ).
infoReturn code of the function call.
Returns
void

This function performs the dense matrix decomposition of a Hermitian indefinite single precision column-major matrix based on the LAPACK chetrf() function, which uses the Bunch-Kaufman diagonal pivoting method. The decomposition has the form

\[ A = U D U^{H} \texttt{ (if uplo = 'U'), or } A = L D L^{H} \texttt{ (if uplo = 'L'), } \]

where U (or L) is a product of permutation and unit upper (lower) triangular matrices, and D is Hermitian and block diagonal with 1-by-1 and 2-by-2 diagonal blocks. The resulting decomposition is stored within A: In case uplo is set to 'L' the result is stored in the lower part of the matrix and the upper part remains untouched, in case uplo is set to 'U' the result is stored in the upper part and the lower part remains untouched.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: If info = -i, the i-th argument had an illegal value.
  • > 0: If info = i, the decomposition has been completed, but D(i,i) is exactly zero.

If the function exits successfully (i.e. info = 0) then the first element of the work array returns the optimal lwork. For optimal performance lwork >= n*NB, where NB is the optimal blocksize returned by the LAPACK function ilaenv(). If lwork = -1 then a workspace query is assumed. The function only calculates the optimal size of the work array and returns this value as the first entry of the work array.

For more information on the chetrf() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ hetrf() [3/3]

void blaze::hetrf ( char  uplo,
int  n,
complex< double > *  A,
int  lda,
int *  ipiv,
complex< double > *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the decomposition of the given dense Hermitian indefinite double precision complex column-major matrix.

Parameters
uplo'L' to use the lower part of the matrix, 'U' to use the upper part.
nThe number of rows/columns of the Hermitian matrix $[0..\infty)$.
APointer to the first element of the double precision complex column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
ipivAuxiliary array of size n for the pivot indices.
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; size >= max( 1, n ).
infoReturn code of the function call.
Returns
void

This function performs the dense matrix decomposition of a Hermitian indefinite double precision column-major matrix based on the LAPACK zhetrf() function, which uses the Bunch-Kaufman diagonal pivoting method. The decomposition has the form

\[ A = U D U^{H} \texttt{ (if uplo = 'U'), or } A = L D L^{H} \texttt{ (if uplo = 'L'), } \]

where U (or L) is a product of permutation and unit upper (lower) triangular matrices, and D is Hermitian and block diagonal with 1-by-1 and 2-by-2 diagonal blocks. The resulting decomposition is stored within A: In case uplo is set to 'L' the result is stored in the lower part of the matrix and the upper part remains untouched, in case uplo is set to 'U' the result is stored in the upper part and the lower part remains untouched.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: If info = -i, the i-th argument had an illegal value.
  • > 0: If info = i, the decomposition has been completed, but D(i,i) is exactly zero.

If the function exits successfully (i.e. info = 0) then the first element of the work array returns the optimal lwork. For optimal performance lwork >= n*NB, where NB is the optimal blocksize returned by the LAPACK function ilaenv(). If lwork = -1 then a workspace query is assumed. The function only calculates the optimal size of the work array and returns this value as the first entry of the work array.

For more information on the zhetrf() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ orglq() [1/3]

template<typename MT , bool SO>
void blaze::orglq ( DenseMatrix< MT, SO > &  A,
const ElementType_< MT > *  tau 
)
inline

LAPACK kernel for the reconstruction of the orthogonal matrix Q from a LQ decomposition.

Parameters
AThe decomposed matrix.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
Returns
void

This function reconstructs the orthogonal matrix Q of a LQ decomposition based on the LAPACK orglq() functions from matrices that have already been LQ factorized by the gelqf() functions. Note that this function can only be used for general, non-adapted matrices with float or double element type. The attempt to call the function with any adapted matrix or matrices of any other element type results in a compile time error!
The min(m,n)-by-n Q matrix is stored within the given matrix A:

DynamicMatrix<double,columnMajor> A;
DynamicVector<double> tau;
// ... Resizing and initialization
gelqf( A, tau.data() ); // Performing the LQ decomposition
orglq( A, tau.data() ); // Reconstructing the Q matrix
const int m( A.rows() );
const int n( A.columns() );
DynamicMatrix<double,columnMajor> Q( submatrix( A, 0UL, 0UL, min(m,n), n ) );

For more information on the orglq() functions (i.e. sorglq() and dorglq()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ orglq() [2/3]

void blaze::orglq ( int  m,
int  n,
int  k,
float *  A,
int  lda,
const float *  tau,
float *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the reconstruction of the orthogonal matrix Q from a LQ decomposition.

Parameters
mThe number of rows of the given matrix $[0..n)$.
nThe number of columns of the given matrix $[0..\infty)$.
kThe number of elementary reflectors, whose product defines the matrix $[0..m)$.
APointer to the first element of the single precision column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; size >= max( 1, n ).
infoReturn code of the function call.
Returns
void

This function generates all or part of the orthogonal matrix Q from a LQ decomposition based on the LAPACK sorglq() function for single precision column-major matrices that have already been factorized by the sgelqf() function. The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the sorglq() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ orglq() [3/3]

void blaze::orglq ( int  m,
int  n,
int  k,
double *  A,
int  lda,
const double *  tau,
double *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the reconstruction of the orthogonal matrix Q from a LQ decomposition.

Parameters
mThe number of rows of the given matrix $[0..n)$.
nThe number of columns of the given matrix $[0..\infty)$.
kThe number of elementary reflectors, whose product defines the matrix $[0..m)$.
APointer to the first element of the double precision column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; size >= max( 1, n ).
infoReturn code of the function call.
Returns
void

This function generates all or part of the orthogonal matrix Q from a LQ decomposition based on the LAPACK dorglq() function for double precision column-major matrices that have already been factorized by the dgelqf() function. The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the dorglq() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ orgql() [1/3]

template<typename MT , bool SO>
void blaze::orgql ( DenseMatrix< MT, SO > &  A,
const ElementType_< MT > *  tau 
)
inline

LAPACK kernel for the reconstruction of the orthogonal matrix Q from a QL decomposition.

Parameters
AThe decomposed matrix.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
Returns
void

This function reconstructs the orthogonal matrix Q of a QL decomposition based on the LAPACK orgql() functions from matrices that have already been QL factorized by the geqlf() functions. Note that this function can only be used for general, non-adapted matrices with float or double element type. The attempt to call the function with any adapted matrix or matrices of any other element type results in a compile time error!
The m-by-min(m,n) Q matrix is stored within the given matrix A:

DynamicMatrix<double,columnMajor> A;
DynamicVector<double> tau;
// ... Resizing and initialization
geqlf( A, tau.data() ); // Performing the QL decomposition
orgql( A, tau.data() ); // Reconstructing the Q matrix
const int m( A.rows() );
const int n( A.columns() );
const size_t column( m < n ? n - m : 0UL )
DynamicMatrix<double,columnMajor> Q( submatrix( A, 0UL, column, m, min(m,n) ) );

For more information on the orgql() functions (i.e. sorgql() and dorgql()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ orgql() [2/3]

void blaze::orgql ( int  m,
int  n,
int  k,
float *  A,
int  lda,
const float *  tau,
float *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the reconstruction of the orthogonal matrix Q from a QL decomposition.

Parameters
mThe number of rows of the given matrix $[0..\infty)$.
nThe number of columns of the given matrix $[0..m)$.
kThe number of elementary reflectors, whose product defines the matrix $[0..n)$.
APointer to the first element of the single precision column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; size >= max( 1, n ).
infoReturn code of the function call.
Returns
void

This function generates all or part of the orthogonal matrix Q from a QL decomposition based on the LAPACK sorgql() function for single precision column-major matrices that have already been factorized by the sgeqlf() function. The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the sorgql() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ orgql() [3/3]

void blaze::orgql ( int  m,
int  n,
int  k,
double *  A,
int  lda,
const double *  tau,
double *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the reconstruction of the orthogonal matrix Q from a QL decomposition.

Parameters
mThe number of rows of the given matrix $[0..\infty)$.
nThe number of columns of the given matrix $[0..m)$.
kThe number of elementary reflectors, whose product defines the matrix $[0..n)$.
APointer to the first element of the double precision column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; size >= max( 1, n ).
infoReturn code of the function call.
Returns
void

This function generates all or part of the orthogonal matrix Q from a QL decomposition based on the LAPACK dorgql() function for double precision column-major matrices that have already been factorized by the dgeqlf() function. The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the dorgql() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ orgqr() [1/3]

template<typename MT , bool SO>
void blaze::orgqr ( DenseMatrix< MT, SO > &  A,
const ElementType_< MT > *  tau 
)
inline

LAPACK kernel for the reconstruction of the orthogonal matrix Q from a QR decomposition.

Parameters
AThe decomposed matrix.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
Returns
void

This function reconstructs the orthogonal matrix Q of a QR decomposition based on the LAPACK orgqr() functions from matrices that have already been QR factorized by the geqrf() functions. Note that this function can only be used for general, non-adapted matrices with float or double element type. The attempt to call the function with any adapted matrix or matrices of any other element type results in a compile time error!
The m-by-min(m,n) Q matrix is stored within the given matrix A:

DynamicMatrix<double,columnMajor> A;
DynamicVector<double> tau;
// ... Resizing and initialization
geqrf( A, tau.data() ); // Performing the QR decomposition
orgqr( A, tau.data() ); // Reconstructing the Q matrix
const int m( A.rows() );
const int n( A.columns() );
DynamicMatrix<double,columnMajor> Q( submatrix( A, 0UL, 0UL, m, min(m,n) ) );

For more information on the orgqr() functions (i.e. sorgqr() and dorgqr()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ orgqr() [2/3]

void blaze::orgqr ( int  m,
int  n,
int  k,
float *  A,
int  lda,
const float *  tau,
float *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the reconstruction of the orthogonal matrix Q from a QR decomposition.

Parameters
mThe number of rows of the given matrix $[0..\infty)$.
nThe number of columns of the given matrix $[0..m)$.
kThe number of elementary reflectors, whose product defines the matrix $[0..n)$.
APointer to the first element of the single precision column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; size >= max( 1, n ).
infoReturn code of the function call.
Returns
void

This function generates all or part of the orthogonal matrix Q from a QR decomposition based on the LAPACK sorgqr() function for single precision column-major matrices that have already been factorized by the sgeqrf() function. The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the sorgqr() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ orgqr() [3/3]

void blaze::orgqr ( int  m,
int  n,
int  k,
double *  A,
int  lda,
const double *  tau,
double *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the reconstruction of the orthogonal matrix Q from a QR decomposition.

Parameters
mThe number of rows of the given matrix $[0..\infty)$.
nThe number of columns of the given matrix $[0..m)$.
kThe number of elementary reflectors, whose product defines the matrix $[0..n)$.
APointer to the first element of the double precision column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; size >= max( 1, n ).
infoReturn code of the function call.
Returns
void

This function generates all or part of the orthogonal matrix Q from a QR decomposition based on the LAPACK dorgqr() function for double precision column-major matrices that have already been factorized by the dgeqrf() function. The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the dorgqr() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ orgrq() [1/3]

template<typename MT , bool SO>
void blaze::orgrq ( DenseMatrix< MT, SO > &  A,
const ElementType_< MT > *  tau 
)
inline

LAPACK kernel for the reconstruction of the orthogonal matrix Q from a RQ decomposition.

Parameters
AThe decomposed matrix.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
Returns
void

This function reconstructs the orthogonal matrix Q of a RQ decomposition based on the LAPACK orgrq() functions from matrices that have already been RQ factorized by the gerqf() functions. Note that this function can only be used for general, non-adapted matrices with float or double element type. The attempt to call the function with any adapted matrix or matrices of any other element type results in a compile time error!
The min(m,n)-by-n Q matrix is stored within the given matrix A:

DynamicMatrix<double,columnMajor> A;
DynamicVector<double> tau;
// ... Resizing and initialization
gerqf( A, tau.data() ); // Performing the RQ decomposition
orgrq( A, tau.data() ); // Reconstructing the Q matrix
const int m( A.rows() );
const int n( A.columns() );
const size_t row( m > n ? m - n : 0UL )
DynamicMatrix<double,columnMajor> Q( submatrix( A, row, 0UL, min(m,n), n ) );

For more information on the orgrq() functions (i.e. sorgrq() and dorgrq()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ orgrq() [2/3]

void blaze::orgrq ( int  m,
int  n,
int  k,
float *  A,
int  lda,
const float *  tau,
float *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the reconstruction of the orthogonal matrix Q from a RQ decomposition.

Parameters
mThe number of rows of the given matrix $[0..n)$.
nThe number of columns of the given matrix $[0..\infty)$.
kThe number of elementary reflectors, whose product defines the matrix $[0..m)$.
APointer to the first element of the single precision column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; size >= max( 1, n ).
infoReturn code of the function call.
Returns
void

This function generates all or part of the orthogonal matrix Q from a RQ decomposition based on the LAPACK sorgrq() function for single precision column-major matrices that have already been factorized by the sgerqf() function. The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the sorgrq() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ orgrq() [3/3]

void blaze::orgrq ( int  m,
int  n,
int  k,
double *  A,
int  lda,
const double *  tau,
double *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the reconstruction of the orthogonal matrix Q from a RQ decomposition.

Parameters
mThe number of rows of the given matrix $[0..n)$.
nThe number of columns of the given matrix $[0..\infty)$.
kThe number of elementary reflectors, whose product defines the matrix $[0..m)$.
APointer to the first element of the double precision column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; size >= max( 1, n ).
infoReturn code of the function call.
Returns
void

This function generates all or part of the orthogonal matrix Q from a RQ decomposition based on the LAPACK dorgrq() function for double precision column-major matrices that have already been factorized by the dgerqf() function. The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the dorgrq() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ ormlq() [1/3]

template<typename MT1 , bool SO1, typename MT2 , bool SO2>
void blaze::ormlq ( DenseMatrix< MT1, SO1 > &  C,
const DenseMatrix< MT2, SO2 > &  A,
char  side,
char  trans,
const ElementType_< MT2 > *  tau 
)
inline

LAPACK kernel for the multiplication of the double precision Q from a LQ decomposition with another matrix.

Parameters
CThe matrix multiplier.
AThe decomposed matrix.
side'L' to apply $ Q $ or $ Q^T $ from the left, 'R' to apply from the right.
trans'N' for $ Q $, 'T' for $ Q^T $.
tauArray for the scalar factors of the elementary reflectors.
Returns
void
Exceptions
std::invalid_argumentInvalid size of Q matrix.
std::invalid_argumentInvalid side argument provided.
std::invalid_argumentInvalid trans argument provided.

This function multiplies a square Q matrix resulting from the LQ decomposition of the gelqf() functions with the given general m-by-n matrix C. Depending on the settings of side and trans it overwrites C with

| side = 'L' | side = 'R'
-------------|--------------|--------------
trans = 'N': | Q * C | C * Q
trans = 'T': | trans(Q) * C | C * trans(Q)

Note that the size of matrix C is preserved, which means that the function does not work for non-square Q matrices. Therefore in case the number of rows of A is larger than the number of columns, a std::invalid_argument exception is thrown. Also Note that this function can only be used for general, non-adapted matrices with float or double element type. The attempt to call the function with any adapted matrix or matrices of any other element type results in a compile time error!

The following code example demonstrates the use of the ormlq() function:

DynamicMatrix<double,columnMajor> A;
DynamicMatrix<double,columnMajor> C;
DynamicVector<double> tau;
// ... Resizing and initialization
gelqf( A, tau.data() ); // Performing the LQ decomposition
ormlq( C, A, 'R', 'N', tau.data() ); // Computing C = C * Q

The function fails if ...

  • ... the number of rows of the given A matrix is larger than the number of columns;
  • ... the given side argument is neither 'L' nor 'R';
  • ... the given trans argument is neither 'N' nor 'T'.

In all failure cases an exception is thrown.

For more information on the ormlq() functions (i.e. sormlq() and dormlq()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ ormlq() [2/3]

void blaze::ormlq ( char  side,
char  trans,
int  m,
int  n,
int  k,
const float *  A,
int  lda,
const float *  tau,
float *  C,
int  ldc,
float *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the multiplication of the single precision Q from a LQ decomposition with another matrix.

Parameters
side'L' to apply $ Q $ or $ Q^T $ from the left, 'R' to apply from the right.
trans'N' for $ Q $, 'T' for $ Q^T $.
mThe number of rows of the matrix C $[0..\infty)$.
nThe number of columns of the matrix C $[0..\infty)$.
kThe number of elementary reflectors, whose product defines the matrix Q.
APointer to the first element of the LQ decomposed single precision column-major matrix.
ldaThe total number of elements between two columns of the matrix A $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
CPointer to the first element of the single precision column-major matrix multiplicator.
ldcThe total number of elements between two columns of the matrix C $[0..\infty)$.
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work.
infoReturn code of the function call.
Returns
void

This function multiplies the Q matrix resulting from the LQ decomposition of the sgelqf() function with the given general single precision m-by-n matrix C. Depending on the settings of side and trans it overwrites C with

| side = 'L' | side = 'R'
-------------|--------------|--------------
trans = 'N': | Q * C | C * Q
trans = 'T': | trans(Q) * C | C * trans(Q)

In case side is specified as 'L', the Q matrix is expected to be of size m-by-m, in case side is set to 'R', Q is expected to be of size n-by-n.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the sormlq() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ ormlq() [3/3]

void blaze::ormlq ( char  side,
char  trans,
int  m,
int  n,
int  k,
const double *  A,
int  lda,
const double *  tau,
double *  C,
int  ldc,
double *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the multiplication of the double precision Q from a LQ decomposition with another matrix.

Parameters
side'L' to apply $ Q $ or $ Q^T $ from the left, 'R' to apply from the right.
trans'N' for $ Q $, 'T' for $ Q^T $.
mThe number of rows of the matrix C $[0..\infty)$.
nThe number of columns of the matrix C $[0..\infty)$.
kThe number of elementary reflectors, whose product defines the matrix Q.
APointer to the first element of the LQ decomposed double precision column-major matrix.
ldaThe total number of elements between two columns of the matrix A $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
CPointer to the first element of the double precision column-major matrix multiplicator.
ldcThe total number of elements between two columns of the matrix C $[0..\infty)$.
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work.
infoReturn code of the function call.
Returns
void

This function multiplies the Q matrix resulting from the LQ decomposition of the sgelqf() function with the given general double precision m-by-n matrix C. Depending on the settings of side and trans it overwrites C with

| side = 'L' | side = 'R'
-------------|--------------|--------------
trans = 'N': | Q * C | C * Q
trans = 'T': | trans(Q) * C | C * trans(Q)

In case side is specified as 'L', the Q matrix is expected to be of size m-by-m, in case side is set to 'R', Q is expected to be of size n-by-n.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the dormlq() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ ormql() [1/3]

template<typename MT1 , bool SO1, typename MT2 , bool SO2>
void blaze::ormql ( DenseMatrix< MT1, SO1 > &  C,
const DenseMatrix< MT2, SO2 > &  A,
char  side,
char  trans,
const ElementType_< MT2 > *  tau 
)
inline

LAPACK kernel for the multiplication of the double precision Q from a QL decomposition with another matrix.

Parameters
CThe matrix multiplier.
AThe decomposed matrix.
side'L' to apply $ Q $ or $ Q^T $ from the left, 'R' to apply from the right.
trans'N' for $ Q $, 'T' for $ Q^T $.
tauArray for the scalar factors of the elementary reflectors.
Returns
void
Exceptions
std::invalid_argumentInvalid size of Q matrix.
std::invalid_argumentInvalid side argument provided.
std::invalid_argumentInvalid trans argument provided.

This function multiplies a square Q matrix resulting from the QL decomposition of the geqlf() functions with the given general m-by-n matrix C. Depending on the settings of side and trans it overwrites C with

| side = 'L' | side = 'R'
-------------|--------------|--------------
trans = 'N': | Q * C | C * Q
trans = 'T': | trans(Q) * C | C * trans(Q)

Note that the size of matrix C is preserved, which means that the function does not work for non-square Q matrices. Therefore in case the number of rows of A is smaller than the number of columns, a std::invalid_argument exception is thrown. Also note that this function can only be used for general, non-adapted matrices with float or double element type. The attempt to call the function with any adapted matrix or matrices of any other element type results in a compile time error!

The following code example demonstrates the use of the ormql() function:

DynamicMatrix<double,columnMajor> A;
DynamicMatrix<double,columnMajor> C;
DynamicVector<double> tau;
// ... Resizing and initialization
geqlf( A, tau.data() ); // Performing the QL decomposition
ormql( C, A, 'R', 'N', tau.data() ); // Computing C = C * Q

/ The function fails if ...

  • ... the number of rows of the given A matrix is larger than the number of columns;
  • ... the given side argument is neither 'L' nor 'R';
  • ... the given trans argument is neither 'N' nor 'T'.

In all failure cases an exception is thrown.

For more information on the ormql() functions (i.e. sormql() and dormql()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ ormql() [2/3]

void blaze::ormql ( char  side,
char  trans,
int  m,
int  n,
int  k,
const float *  A,
int  lda,
const float *  tau,
float *  C,
int  ldc,
float *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the multiplication of the single precision Q from a QL decomposition with another matrix.

Parameters
side'L' to apply $ Q $ or $ Q^T $ from the left, 'R' to apply from the right.
trans'N' for $ Q $, 'T' for $ Q^T $.
mThe number of rows of the matrix C $[0..\infty)$.
nThe number of columns of the matrix C $[0..\infty)$.
kThe number of elementary reflectors, whose product defines the matrix Q.
APointer to the first element of the QL decomposed single precision column-major matrix.
ldaThe total number of elements between two columns of the matrix A $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
CPointer to the first element of the single precision column-major matrix multiplicator.
ldcThe total number of elements between two columns of the matrix C $[0..\infty)$.
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work.
infoReturn code of the function call.
Returns
void

This function multiplies the Q matrix resulting from the QL decomposition of the sgeqlf() function with the given general single precision m-by-n matrix C. Depending on the settings of side and trans it overwrites C with

| side = 'L' | side = 'R'
-------------|--------------|--------------
trans = 'N': | Q * C | C * Q
trans = 'T': | trans(Q) * C | C * trans(Q)

In case side is specified as 'L', the Q matrix is expected to be of size m-by-m, in case side is set to 'R', Q is expected to be of size n-by-n.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the sormql() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ ormql() [3/3]

void blaze::ormql ( char  side,
char  trans,
int  m,
int  n,
int  k,
const double *  A,
int  lda,
const double *  tau,
double *  C,
int  ldc,
double *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the multiplication of the double precision Q from a QL decomposition with another matrix.

Parameters
side'L' to apply $ Q $ or $ Q^T $ from the left, 'R' to apply from the right.
trans'N' for $ Q $, 'T' for $ Q^T $.
mThe number of rows of the matrix C $[0..\infty)$.
nThe number of columns of the matrix C $[0..\infty)$.
kThe number of elementary reflectors, whose product defines the matrix Q.
APointer to the first element of the QL decomposed double precision column-major matrix.
ldaThe total number of elements between two columns of the matrix A $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
CPointer to the first element of the double precision column-major matrix multiplicator.
ldcThe total number of elements between two columns of the matrix C $[0..\infty)$.
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work.
infoReturn code of the function call.
Returns
void

This function multiplies the Q matrix resulting from the QL decomposition of the sgeqlf() function with the given general double precision m-by-n matrix C. Depending on the settings of side and trans it overwrites C with

| side = 'L' | side = 'R'
-------------|--------------|--------------
trans = 'N': | Q * C | C * Q
trans = 'T': | trans(Q) * C | C * trans(Q)

In case side is specified as 'L', the Q matrix is expected to be of size m-by-m, in case side is set to 'R', Q is expected to be of size n-by-n.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the dormql() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ ormqr() [1/3]

template<typename MT1 , bool SO1, typename MT2 , bool SO2>
void blaze::ormqr ( DenseMatrix< MT1, SO1 > &  C,
const DenseMatrix< MT2, SO2 > &  A,
char  side,
char  trans,
const ElementType_< MT2 > *  tau 
)
inline

LAPACK kernel for the multiplication of the double precision Q from a QR decomposition with another matrix.

Parameters
CThe matrix multiplier.
AThe decomposed matrix.
side'L' to apply $ Q $ or $ Q^T $ from the left, 'R' to apply from the right.
trans'N' for $ Q $, 'T' for $ Q^T $.
tauArray for the scalar factors of the elementary reflectors.
Returns
void
Exceptions
std::invalid_argumentInvalid size of Q matrix.
std::invalid_argumentInvalid side argument provided.
std::invalid_argumentInvalid trans argument provided.

This function multiplies a square Q matrix resulting from the QR decomposition of the geqrf() functions with the given general m-by-n matrix C. Depending on the settings of side and trans it overwrites C with

| side = 'L' | side = 'R'
-------------|--------------|--------------
trans = 'N': | Q * C | C * Q
trans = 'T': | trans(Q) * C | C * trans(Q)

Note that the size of matrix C is preserved, which means that the function does not work for non-square Q matrices. Therefore in case the number of rows of A is larger than the number of columns, a std::invalid_argument exception is thrown. Also Note that this function can only be used for general, non-adapted matrices with float or double element type. The attempt to call the function with any adapted matrix or matrices of any other element type results in a compile time error!

The following code example demonstrates the use of the ormqr() function:

DynamicMatrix<double,columnMajor> A;
DynamicMatrix<double,columnMajor> C;
DynamicVector<double> tau;
// ... Resizing and initialization
geqrf( A, tau.data() ); // Performing the QR decomposition
ormqr( C, A, 'R', 'N', tau.data() ); // Computing C = C * Q

The function fails if ...

  • ... the number of rows of the given A matrix is larger than the number of columns;
  • ... the given side argument is neither 'L' nor 'R';
  • ... the given trans argument is neither 'N' nor 'T'.

In all failure cases an exception is thrown.

For more information on the ormqr() functions (i.e. sormqr() and dormqr()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ ormqr() [2/3]

void blaze::ormqr ( char  side,
char  trans,
int  m,
int  n,
int  k,
const float *  A,
int  lda,
const float *  tau,
float *  C,
int  ldc,
float *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the multiplication of the single precision Q from a QR decomposition with another matrix.

Parameters
side'L' to apply $ Q $ or $ Q^T $ from the left, 'R' to apply from the right.
trans'N' for $ Q $, 'T' for $ Q^T $.
mThe number of rows of the matrix C $[0..\infty)$.
nThe number of columns of the matrix C $[0..\infty)$.
kThe number of elementary reflectors, whose product defines the matrix Q.
APointer to the first element of the QR decomposed single precision column-major matrix.
ldaThe total number of elements between two columns of the matrix A $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
CPointer to the first element of the single precision column-major matrix multiplicator.
ldcThe total number of elements between two columns of the matrix C $[0..\infty)$.
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work.
infoReturn code of the function call.
Returns
void

This function multiplies the Q matrix resulting from the QR decomposition of the sgeqrf() function with the given general single precision m-by-n matrix C. Depending on the settings of side and trans it overwrites C with

| side = 'L' | side = 'R'
-------------|--------------|--------------
trans = 'N': | Q * C | C * Q
trans = 'T': | trans(Q) * C | C * trans(Q)

In case side is specified as 'L', the Q matrix is expected to be of size m-by-m, in case side is set to 'R', Q is expected to be of size n-by-n.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the sormqr() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ ormqr() [3/3]

void blaze::ormqr ( char  side,
char  trans,
int  m,
int  n,
int  k,
const double *  A,
int  lda,
const double *  tau,
double *  C,
int  ldc,
double *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the multiplication of the double precision Q from a QR decomposition with another matrix.

Parameters
side'L' to apply $ Q $ or $ Q^T $ from the left, 'R' to apply from the right.
trans'N' for $ Q $, 'T' for $ Q^T $.
mThe number of rows of the matrix C $[0..\infty)$.
nThe number of columns of the matrix C $[0..\infty)$.
kThe number of elementary reflectors, whose product defines the matrix Q.
APointer to the first element of the QR decomposed double precision column-major matrix.
ldaThe total number of elements between two columns of the matrix A $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
CPointer to the first element of the double precision column-major matrix multiplicator.
ldcThe total number of elements between two columns of the matrix C $[0..\infty)$.
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work.
infoReturn code of the function call.
Returns
void

This function multiplies the Q matrix resulting from the QR decomposition of the sgeqrf() function with the given general double precision m-by-n matrix C. Depending on the settings of side and trans it overwrites C with

| side = 'L' | side = 'R'
-------------|--------------|--------------
trans = 'N': | Q * C | C * Q
trans = 'T': | trans(Q) * C | C * trans(Q)

In case side is specified as 'L', the Q matrix is expected to be of size m-by-m, in case side is set to 'R', Q is expected to be of size n-by-n.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the dormqr() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ ormrq() [1/3]

template<typename MT1 , bool SO1, typename MT2 , bool SO2>
void blaze::ormrq ( DenseMatrix< MT1, SO1 > &  C,
const DenseMatrix< MT2, SO2 > &  A,
char  side,
char  trans,
const ElementType_< MT2 > *  tau 
)
inline

LAPACK kernel for the multiplication of the double precision Q from a RQ decomposition with another matrix.

Parameters
CThe matrix multiplier.
AThe decomposed matrix.
side'L' to apply $ Q $ or $ Q^T $ from the left, 'R' to apply from the right.
trans'N' for $ Q $, 'T' for $ Q^T $.
tauArray for the scalar factors of the elementary reflectors.
Returns
void
Exceptions
std::invalid_argumentInvalid size of Q matrix.
std::invalid_argumentInvalid side argument provided.
std::invalid_argumentInvalid trans argument provided.

This function multiplies a square Q matrix resulting from the RQ decomposition of the gerqf() functions with the given general m-by-n matrix C. Depending on the settings of side and trans it overwrites C with

| side = 'L' | side = 'R'
-------------|--------------|--------------
trans = 'N': | Q * C | C * Q
trans = 'T': | trans(Q) * C | C * trans(Q)

Note that the size of matrix C is preserved, which means that the function does not work for non-square Q matrices. Therefore in case the number of rows of A is smaller than the number of columns, a std::invalid_argument exception is thrown. Also note that this function can only be used for general, non-adapted matrices with float or double element type. The attempt to call the function with any adapted matrix or matrices of any other element type results in a compile time error!

The following code example demonstrates the use of the ormrq() function:

DynamicMatrix<double,columnMajor> A;
DynamicMatrix<double,columnMajor> C;
DynamicVector<double> tau;
// ... Resizing and initialization
gerqf( A, tau.data() ); // Performing the RQ decomposition
ormrq( C, A, 'R', 'N', tau.data() ); // Computing C = C * Q

The function fails if ...

  • ... the number of rows of the given A matrix is larger than the number of columns;
  • ... the given side argument is neither 'L' nor 'R';
  • ... the given trans argument is neither 'N' nor 'T'.

In all failure cases an exception is thrown.

For more information on the ormrq() functions (i.e. sormrq() and dormrq()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ ormrq() [2/3]

void blaze::ormrq ( char  side,
char  trans,
int  m,
int  n,
int  k,
const float *  A,
int  lda,
const float *  tau,
float *  C,
int  ldc,
float *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the multiplication of the single precision Q from a RQ decomposition with another matrix.

Parameters
side'L' to apply $ Q $ or $ Q^T $ from the left, 'R' to apply from the right.
trans'N' for $ Q $, 'T' for $ Q^T $.
mThe number of rows of the matrix C $[0..\infty)$.
nThe number of columns of the matrix C $[0..\infty)$.
kThe number of elementary reflectors, whose product defines the matrix Q.
APointer to the first element of the RQ decomposed single precision column-major matrix.
ldaThe total number of elements between two columns of the matrix A $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
CPointer to the first element of the single precision column-major matrix multiplicator.
ldcThe total number of elements between two columns of the matrix C $[0..\infty)$.
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work.
infoReturn code of the function call.
Returns
void

This function multiplies the Q matrix resulting from the RQ decomposition of the sgerqf() function with the given general single precision m-by-n matrix C. Depending on the settings of side and trans it overwrites C with

| side = 'L' | side = 'R'
-------------|--------------|--------------
trans = 'N': | Q * C | C * Q
trans = 'T': | trans(Q) * C | C * trans(Q)

In case side is specified as 'L', the Q matrix is expected to be of size m-by-m, in case side is set to 'R', Q is expected to be of size n-by-n.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the sormrq() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ ormrq() [3/3]

void blaze::ormrq ( char  side,
char  trans,
int  m,
int  n,
int  k,
const double *  A,
int  lda,
const double *  tau,
double *  C,
int  ldc,
double *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the multiplication of the double precision Q from a RQ decomposition with another matrix.

Parameters
side'L' to apply $ Q $ or $ Q^T $ from the left, 'R' to apply from the right.
trans'N' for $ Q $, 'T' for $ Q^T $.
mThe number of rows of the matrix C $[0..\infty)$.
nThe number of columns of the matrix C $[0..\infty)$.
kThe number of elementary reflectors, whose product defines the matrix Q.
APointer to the first element of the RQ decomposed double precision column-major matrix.
ldaThe total number of elements between two columns of the matrix A $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
CPointer to the first element of the double precision column-major matrix multiplicator.
ldcThe total number of elements between two columns of the matrix C $[0..\infty)$.
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work.
infoReturn code of the function call.
Returns
void

This function multiplies the Q matrix resulting from the RQ decomposition of the sgerqf() function with the given general double precision m-by-n matrix C. Depending on the settings of side and trans it overwrites C with

| side = 'L' | side = 'R'
-------------|--------------|--------------
trans = 'N': | Q * C | C * Q
trans = 'T': | trans(Q) * C | C * trans(Q)

In case side is specified as 'L', the Q matrix is expected to be of size m-by-m, in case side is set to 'R', Q is expected to be of size n-by-n.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the dormrq() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ potrf() [1/5]

template<typename MT , bool SO>
void blaze::potrf ( DenseMatrix< MT, SO > &  A,
char  uplo 
)
inline

LAPACK kernel for the Cholesky decomposition of the given dense positive definite matrix.

Parameters
AThe matrix to be decomposed.
uplo'L' to use the lower part of the matrix, 'U' to use the upper part.
Returns
void
Exceptions
std::invalid_argumentInvalid non-square matrix provided.
std::invalid_argumentInvalid uplo argument provided.
std::runtime_errorDecomposition of singular matrix failed.

This function performs the dense matrix Cholesky decomposition of a symmetric positive definite matrix based on the LAPACK potrf() functions. Note that the function only works for general, non-adapted matrices with float, double, complex<float>, or complex<double> element type. The attempt to call the function with any adapted matrix or matrices of any other element type results in a compile time error!
The decomposition has the form

\[ A = U^{H} U \texttt{ (if uplo = 'U'), or } A = L L^{H} \texttt{ (if uplo = 'L'), } \]

where U is an upper triangular matrix and L is a lower triangular matrix. The Cholesky decomposition fails if ...

  • ... the given system matrix A is not a symmetric positive definite matrix;
  • ... the given uplo argument is neither 'L' nor 'U'.

In all failure cases an exception is thrown.

For more information on the potrf() functions (i.e. spotrf(), dpotrf(), cpotrf(), and zpotrf()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.
This function does only provide the basic exception safety guarantee, i.e. in case of an exception A may already have been modified.

◆ potrf() [2/5]

void blaze::potrf ( char  uplo,
int  n,
float *  A,
int  lda,
int *  info 
)
inline

LAPACK kernel for the Cholesky decomposition of the given dense positive definite single precision column-major matrix.

Parameters
uplo'L' to use the lower part of the matrix, 'U' to use the upper part.
nThe number of rows/columns of the matrix $[0..\infty)$.
APointer to the first element of the single precision column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
infoReturn code of the function call.
Returns
void

This function performs the dense matrix Cholesky decomposition of a symmetric positive definite single precision column-major matrix based on the LAPACK spotrf() function. The decomposition has the form

\[ A = U^{T} U \texttt{ (if uplo = 'U'), or } A = L L^{T} \texttt{ (if uplo = 'L'), } \]

where U is an upper triangular matrix and L is a lower triangular matrix. The resulting decomposition is stored within A: In case uplo is set to 'L' the result is stored in the lower part of the matrix and the upper part remains untouched, in case uplo is set to 'U' the result is stored in the upper part and the lower part remains untouched.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: If info = -i, the i-th argument had an illegal value.
  • > 0: If info = i, the leading minor of order i is not positive definite.

For more information on the spotrf() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ potrf() [3/5]

void blaze::potrf ( char  uplo,
int  n,
double *  A,
int  lda,
int *  info 
)
inline

LAPACK kernel for the Cholesky decomposition of the given dense positive definite double precision column-major matrix.

Parameters
uplo'L' to use the lower part of the matrix, 'U' to use the upper part.
nThe number of rows/columns of the matrix $[0..\infty)$.
APointer to the first element of the double precision column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
infoReturn code of the function call.
Returns
void

This function performs the dense matrix Cholesky decomposition of a symmetric positive definite double precision column-major matrix based on the LAPACK dpotrf() function. The decomposition has the form

\[ A = U^{T} U \texttt{ (if uplo = 'U'), or } A = L L^{T} \texttt{ (if uplo = 'L'), } \]

where U is an upper triangular matrix and L is a lower triangular matrix. The resulting decomposition is stored within A: In case uplo is set to 'L' the result is stored in the lower part of the matrix and the upper part remains untouched, in case uplo is set to 'U' the result is stored in the upper part and the lower part remains untouched.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: If info = -i, the i-th argument had an illegal value.
  • > 0: If info = i, the leading minor of order i is not positive definite.

For more information on the dpotrf() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ potrf() [4/5]

void blaze::potrf ( char  uplo,
int  n,
complex< float > *  A,
int  lda,
int *  info 
)
inline

LAPACK kernel for the Cholesky decomposition of the given dense positive definite single precision complex column-major matrix.

Parameters
uplo'L' to use the lower part of the matrix, 'U' to use the upper part.
nThe number of rows/columns of the matrix $[0..\infty)$.
APointer to the first element of the single precision complex column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
infoReturn code of the function call.
Returns
void

This function performs the dense matrix Cholesky decomposition of a symmetric positive definite single precision complex column-major matrix based on the LAPACK cpotrf() function. The decomposition has the form

\[ A = U^{H} U \texttt{ (if uplo = 'U'), or } A = L L^{H} \texttt{ (if uplo = 'L'), } \]

where U is an upper triangular matrix and L is a lower triangular matrix. The resulting decomposition is stored within A: In case uplo is set to 'L' the result is stored in the lower part of the matrix and the upper part remains untouched, in case uplo is set to 'U' the result is stored in the upper part and the lower part remains untouched.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: If info = -i, the i-th argument had an illegal value.
  • > 0: If info = i, the leading minor of order i is not positive definite.

For more information on the cpotrf() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ potrf() [5/5]

void blaze::potrf ( char  uplo,
int  n,
complex< double > *  A,
int  lda,
int *  info 
)
inline

LAPACK kernel for the Cholesky decomposition of the given dense positive definite double precision complex column-major matrix.

Parameters
uplo'L' to use the lower part of the matrix, 'U' to use the upper part.
nThe number of rows/columns of the matrix $[0..\infty)$.
APointer to the first element of the double precision complex column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
infoReturn code of the function call.
Returns
void

This function performs the dense matrix Cholesky decomposition of a symmetric positive definite double precision complex column-major matrix based on the LAPACK zpotrf() function. The decomposition has the form

\[ A = U^{H} U \texttt{ (if uplo = 'U'), or } A = L L^{H} \texttt{ (if uplo = 'L'), } \]

where U is an upper triangular matrix and L is a lower triangular matrix. The resulting decomposition is stored within A: In case uplo is set to 'L' the result is stored in the lower part of the matrix and the upper part remains untouched, in case uplo is set to 'U' the result is stored in the upper part and the lower part remains untouched.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: If info = -i, the i-th argument had an illegal value.
  • > 0: If info = i, the leading minor of order i is not positive definite.

For more information on the zpotrf() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ sytrf() [1/5]

template<typename MT , bool SO>
void blaze::sytrf ( DenseMatrix< MT, SO > &  A,
char  uplo,
int *  ipiv 
)
inline

LAPACK kernel for the decomposition of the given dense symmetric indefinite matrix.

Parameters
AThe matrix to be decomposed.
uplo'L' to use the lower part of the matrix, 'U' to use the upper part.
ipivAuxiliary array of size n for the pivot indices.
Returns
void
Exceptions
std::invalid_argumentInvalid non-square matrix provided.
std::invalid_argumentInvalid uplo argument provided.

This function performs the dense matrix decomposition of a symmetric indefinite matrix based on the LAPACK sytrf() functions, which use the Bunch-Kaufman diagonal pivoting method. Note that the function only works for general, non-adapted matrices with float, double, complex<float>, or complex<double> element type. The attempt to call the function with any adapted matrix or matrices of any other element type results in a compile time error!
The decomposition has the form

\[ A = U D U^{T} \texttt{ (if uplo = 'U'), or } A = L D L^{T} \texttt{ (if uplo = 'L'), } \]

where U (or L) is a product of permutation and unit upper (lower) triangular matrices, and D is symmetric and block diagonal with 1-by-1 and 2-by-2 diagonal blocks. The resulting decomposition is stored within A: In case uplo is set to 'L' the result is stored in the lower part of the matrix and the upper part remains untouched, in case uplo is set to 'U' the result is stored in the upper part and the lower part remains untouched.

The function fails if ...

  • ... the given matrix is not a square matrix;
  • ... the given uplo argument is neither 'L' nor 'U'.

In all failure cases a std::invalid_argument exception is thrown.

For more information on the sytrf() functions (i.e. ssytrf(), dsytrf(), csytrf(), and zsytrf()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ sytrf() [2/5]

void blaze::sytrf ( char  uplo,
int  n,
float *  A,
int  lda,
int *  ipiv,
float *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the decomposition of the given dense symmetric indefinite single precision column-major matrix.

Parameters
uplo'L' to use the lower part of the matrix, 'U' to use the upper part.
nThe number of rows/columns of the symmetric matrix $[0..\infty)$.
APointer to the first element of the single precision column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
ipivAuxiliary array of size n for the pivot indices.
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; size >= max( 1, n ).
infoReturn code of the function call.
Returns
void

This function performs the dense matrix decomposition of a symmetric indefinite single precision column-major matrix based on the LAPACK ssytrf() function, which uses the Bunch-Kaufman diagonal pivoting method. The decomposition has the form

\[ A = U D U^{T} \texttt{ (if uplo = 'U'), or } A = L D L^{T} \texttt{ (if uplo = 'L'), } \]

where U (or L) is a product of permutation and unit upper (lower) triangular matrices, and D is symmetric and block diagonal with 1-by-1 and 2-by-2 diagonal blocks. The resulting decomposition is stored within A: In case uplo is set to 'L' the result is stored in the lower part of the matrix and the upper part remains untouched, in case uplo is set to 'U' the result is stored in the upper part and the lower part remains untouched.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: If info = -i, the i-th argument had an illegal value.
  • > 0: If info = i, the decomposition has been completed, but D(i,i) is exactly zero.

If the function exits successfully (i.e. info = 0) then the first element of the work array returns the optimal lwork. For optimal performance lwork >= n*NB, where NB is the optimal blocksize returned by the LAPACK function ilaenv(). If lwork = -1 then a workspace query is assumed. The function only calculates the optimal size of the work array and returns this value as the first entry of the work array.

For more information on the ssytrf() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ sytrf() [3/5]

void blaze::sytrf ( char  uplo,
int  n,
double *  A,
int  lda,
int *  ipiv,
double *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the decomposition of the given dense symmetric indefinite double precision column-major matrix.

Parameters
uplo'L' to use the lower part of the matrix, 'U' to use the upper part.
nThe number of rows/columns of the symmetric matrix $[0..\infty)$.
APointer to the first element of the double precision column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
ipivAuxiliary array of size n for the pivot indices.
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; size >= max( 1, n ).
infoReturn code of the function call.
Returns
void

This function performs the dense matrix decomposition of a symmetric indefinite double precision column-major matrix based on the LAPACK dsytrf() function, which uses the Bunch-Kaufman diagonal pivoting method. The decomposition has the form

\[ A = U D U^{T} \texttt{ (if uplo = 'U'), or } A = L D L^{T} \texttt{ (if uplo = 'L'), } \]

where U (or L) is a product of permutation and unit upper (lower) triangular matrices, and D is symmetric and block diagonal with 1-by-1 and 2-by-2 diagonal blocks. The resulting decomposition is stored within A: In case uplo is set to 'L' the result is stored in the lower part of the matrix and the upper part remains untouched, in case uplo is set to 'U' the result is stored in the upper part and the lower part remains untouched.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: If info = -i, the i-th argument had an illegal value.
  • > 0: If info = i, the decomposition has been completed, but D(i,i) is exactly zero.

If the function exits successfully (i.e. info = 0) then the first element of the work array returns the optimal lwork. For optimal performance lwork >= n*NB, where NB is the optimal blocksize returned by the LAPACK function ilaenv(). If lwork = -1 then a workspace query is assumed. The function only calculates the optimal size of the work array and returns this value as the first entry of the work array.

For more information on the dsytrf() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ sytrf() [4/5]

void blaze::sytrf ( char  uplo,
int  n,
complex< float > *  A,
int  lda,
int *  ipiv,
complex< float > *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the decomposition of the given dense symmetric indefinite single precision complex column-major matrix.

Parameters
uplo'L' to use the lower part of the matrix, 'U' to use the upper part.
nThe number of rows/columns of the symmetric matrix $[0..\infty)$.
APointer to the first element of the single precision complex column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
ipivAuxiliary array of size n for the pivot indices.
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; size >= max( 1, n ).
infoReturn code of the function call.
Returns
void

This function performs the dense matrix decomposition of a symmetric indefinite single precision column-major matrix based on the LAPACK csytrf() function, which uses the Bunch-Kaufman diagonal pivoting method. The decomposition has the form

\[ A = U D U^{T} \texttt{ (if uplo = 'U'), or } A = L D L^{T} \texttt{ (if uplo = 'L'), } \]

where U (or L) is a product of permutation and unit upper (lower) triangular matrices, and D is symmetric and block diagonal with 1-by-1 and 2-by-2 diagonal blocks. The resulting decomposition is stored within A: In case uplo is set to 'L' the result is stored in the lower part of the matrix and the upper part remains untouched, in case uplo is set to 'U' the result is stored in the upper part and the lower part remains untouched.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: If info = -i, the i-th argument had an illegal value.
  • > 0: If info = i, the decomposition has been completed, but D(i,i) is exactly zero.

If the function exits successfully (i.e. info = 0) then the first element of the work array returns the optimal lwork. For optimal performance lwork >= n*NB, where NB is the optimal blocksize returned by the LAPACK function ilaenv(). If lwork = -1 then a workspace query is assumed. The function only calculates the optimal size of the work array and returns this value as the first entry of the work array.

For more information on the csytrf() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ sytrf() [5/5]

void blaze::sytrf ( char  uplo,
int  n,
complex< double > *  A,
int  lda,
int *  ipiv,
complex< double > *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the decomposition of the given dense symmetric indefinite double precision complex column-major matrix.

Parameters
uplo'L' to use the lower part of the matrix, 'U' to use the upper part.
nThe number of rows/columns of the symmetric matrix $[0..\infty)$.
APointer to the first element of the double precision complex column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
ipivAuxiliary array of size n for the pivot indices.
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; size >= max( 1, n ).
infoReturn code of the function call.
Returns
void

This function performs the dense matrix decomposition of a symmetric indefinite double precision column-major matrix based on the LAPACK zsytrf() function, which uses the Bunch-Kaufman diagonal pivoting method. The decomposition has the form

\[ A = U D U^{T} \texttt{ (if uplo = 'U'), or } A = L D L^{T} \texttt{ (if uplo = 'L'), } \]

where U (or L) is a product of permutation and unit upper (lower) triangular matrices, and D is symmetric and block diagonal with 1-by-1 and 2-by-2 diagonal blocks. The resulting decomposition is stored within A: In case uplo is set to 'L' the result is stored in the lower part of the matrix and the upper part remains untouched, in case uplo is set to 'U' the result is stored in the upper part and the lower part remains untouched.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: If info = -i, the i-th argument had an illegal value.
  • > 0: If info = i, the decomposition has been completed, but D(i,i) is exactly zero.

If the function exits successfully (i.e. info = 0) then the first element of the work array returns the optimal lwork. For optimal performance lwork >= n*NB, where NB is the optimal blocksize returned by the LAPACK function ilaenv(). If lwork = -1 then a workspace query is assumed. The function only calculates the optimal size of the work array and returns this value as the first entry of the work array.

For more information on the zsytrf() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ unglq() [1/3]

template<typename MT , bool SO>
void blaze::unglq ( DenseMatrix< MT, SO > &  A,
const ElementType_< MT > *  tau 
)
inline

LAPACK kernel for the reconstruction of the orthogonal matrix Q from a LQ decomposition.

Parameters
AThe decomposed matrix.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
Returns
void

This function reconstructs the orthogonal matrix Q of a LQ decomposition based on the LAPACK unglq() functions from matrices that have already been LQ factorized by the gelqf() functions. Note that this function can only be used for general, non-adapted matrices with complex<float> or complex<double> element type. The attempt to call the function with any adapted matrix or matrices of any other element type results in a compile time error!
The min(m,n)-by-n Q matrix is stored within the given matrix A:

using cplx = complex<double>;
DynamicMatrix<cplx,columnMajor> A;
DynamicVector<cplx> tau;
// ... Resizing and initialization
gelqf( A, tau.data() ); // Performing the LQ decomposition
unglq( A, tau.data() ); // Reconstructing the Q matrix
const int m( A.rows() );
const int n( A.columns() );
DynamicMatrix<cplx,columnMajor> Q( submatrix( A, 0, 0, min(m,n), n ) );

For more information on the unglq() functions (i.e. cunglq() and zunglq()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ unglq() [2/3]

void blaze::unglq ( int  m,
int  n,
int  k,
complex< float > *  A,
int  lda,
const complex< float > *  tau,
complex< float > *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the reconstruction of the orthogonal matrix Q from a LQ decomposition.

Parameters
mThe number of rows of the given matrix $[0..n)$.
nThe number of columns of the given matrix $[0..\infty)$.
kThe number of elementary reflectors, whose product defines the matrix $[0..m)$.
APointer to the first element of the single precision complex column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; size >= max( 1, n ).
infoReturn code of the function call.
Returns
void

This function generates all or part of the orthogonal matrix Q from a LQ decomposition based on the LAPACK cunglq() function for single precision complex column-major matrices that have already been factorized by the cgelqf() function. The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the cunglq() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ unglq() [3/3]

void blaze::unglq ( int  m,
int  n,
int  k,
complex< double > *  A,
int  lda,
const complex< double > *  tau,
complex< double > *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the reconstruction of the orthogonal matrix Q from a LQ decomposition.

Parameters
mThe number of rows of the given matrix $[0..n)$.
nThe number of columns of the given matrix $[0..\infty)$.
kThe number of elementary reflectors, whose product defines the matrix $[0..m)$.
APointer to the first element of the double precision complex column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; size >= max( 1, n ).
infoReturn code of the function call.
Returns
void

This function generates all or part of the orthogonal matrix Q from a LQ decomposition based on the LAPACK zunglq() function for double precision complex column-major matrices that have already been factorized by the zgelqf() function. The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the zunglq() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ ungql() [1/3]

template<typename MT , bool SO>
void blaze::ungql ( DenseMatrix< MT, SO > &  A,
const ElementType_< MT > *  tau 
)
inline

LAPACK kernel for the reconstruction of the orthogonal matrix Q from a QL decomposition.

Parameters
AThe decomposed matrix.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
Returns
void

This function reconstructs the orthogonal matrix Q of a QL decomposition based on the LAPACK ungql() functions from matrices that have already been QL factorized by the geqlf() functions. Note that this function can only be used for general, non-adapted matrices with float or double element type. The attempt to call the function with any adapted matrix or matrices of any other element type results in a compile time error!
The min(m,n)-by-n Q matrix is stored within the given matrix A:

using cplx = complex<double>;
DynamicMatrix<cplx,columnMajor> A;
DynamicVector<cplx> tau;
// ... Resizing and initialization
geqlf( A, tau.data() ); // Performing the QL decomposition
ungql( A, tau.data() ); // Reconstructing the Q matrix
const int m( A.rows() );
const int n( A.columns() );
const size_t column( m < n ? n - m : 0UL )
DynamicMatrix<cplx,columnMajor> Q( submatrix( A, 0UL, column, m, min(m,n) ) );

For more information on the ungql() functions (i.e. cungql() and zungql()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ ungql() [2/3]

void blaze::ungql ( int  m,
int  n,
int  k,
complex< float > *  A,
int  lda,
const complex< float > *  tau,
complex< float > *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the reconstruction of the orthogonal matrix Q from a QL decomposition.

Parameters
mThe number of rows of the given matrix $[0..\infty)$.
nThe number of columns of the given matrix $[0..m)$.
kThe number of elementary reflectors, whose product defines the matrix $[0..n)$.
APointer to the first element of the single precision column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; size >= max( 1, n ).
infoReturn code of the function call.
Returns
void

This function generates all or part of the orthogonal matrix Q from a QL decomposition based on the LAPACK cungql() function for single precision column-major matrices that have already been factorized by the sgeqlf() function. The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the cungql() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ ungql() [3/3]

void blaze::ungql ( int  m,
int  n,
int  k,
complex< double > *  A,
int  lda,
const complex< double > *  tau,
complex< double > *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the reconstruction of the orthogonal matrix Q from a QL decomposition.

Parameters
mThe number of rows of the given matrix $[0..\infty)$.
nThe number of columns of the given matrix $[0..m)$.
kThe number of elementary reflectors, whose product defines the matrix $[0..n)$.
APointer to the first element of the double precision column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; size >= max( 1, n ).
infoReturn code of the function call.
Returns
void

This function generates all or part of the orthogonal matrix Q from a QL decomposition based on the LAPACK zungql() function for double precision column-major matrices that have already been factorized by the dgeqlf() function. The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the zungql() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ ungqr() [1/3]

template<typename MT , bool SO>
void blaze::ungqr ( DenseMatrix< MT, SO > &  A,
const ElementType_< MT > *  tau 
)
inline

LAPACK kernel for the reconstruction of the orthogonal matrix Q from a QR decomposition.

Parameters
AThe decomposed matrix.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
Returns
void

This function reconstructs the orthogonal matrix Q of a QR decomposition based on the LAPACK ungqr() functions from matrices that have already been QR factorized by the geqrf() functions. Note that this function can only be used for general, non-adapted matrices with complex<float> or complex<double> element type. The attempt to call the function with any adapted matrix or matrices of any other element type results in a compile time error!
The m-by-min(m,n) Q matrix is stored within the given matrix A:

using cplx = complex<double>;
DynamicMatrix<cplx,columnMajor> A;
DynamicVector<cplx> tau;
// ... Resizing and initialization
geqrf( A, tau.data() ); // Performing the QR decomposition
ungqr( A, tau.data() ); // Reconstructing the Q matrix
const int m( A.rows() );
const int n( A.columns() );
DynamicMatrix<cplx,columnMajor> Q( submatrix( A, 0, 0, m, min(m,n) ) );

For more information on the ungqr() functions (i.e. cungqr() and zungqr()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ ungqr() [2/3]

void blaze::ungqr ( int  m,
int  n,
int  k,
complex< float > *  A,
int  lda,
const complex< float > *  tau,
complex< float > *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the reconstruction of the orthogonal matrix Q from a QR decomposition.

Parameters
mThe number of rows of the given matrix $[0..\infty)$.
nThe number of columns of the given matrix $[0..m)$.
kThe number of elementary reflectors, whose product defines the matrix $[0..n)$.
APointer to the first element of the single precision complex column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; size >= max( 1, n ).
infoReturn code of the function call.
Returns
void

This function generates all or part of the orthogonal matrix Q from a QR decomposition based on the LAPACK cungqr() function for single precision complex column-major matrices that have already been factorized by the cgeqrf() function. The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the cungqr() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ ungqr() [3/3]

void blaze::ungqr ( int  m,
int  n,
int  k,
complex< double > *  A,
int  lda,
const complex< double > *  tau,
complex< double > *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the reconstruction of the orthogonal matrix Q from a QR decomposition.

Parameters
mThe number of rows of the given matrix $[0..\infty)$.
nThe number of columns of the given matrix $[0..m)$.
kThe number of elementary reflectors, whose product defines the matrix $[0..n)$.
APointer to the first element of the double precision complex column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; size >= max( 1, n ).
infoReturn code of the function call.
Returns
void

This function generates all or part of the orthogonal matrix Q from a QR decomposition based on the LAPACK zungqr() function for double precision complex column-major matrices that have already been factorized by the zgeqrf() function. The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the zungqr() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ ungrq() [1/3]

template<typename MT , bool SO>
void blaze::ungrq ( DenseMatrix< MT, SO > &  A,
const ElementType_< MT > *  tau 
)
inline

LAPACK kernel for the reconstruction of the orthogonal matrix Q from a RQ decomposition.

Parameters
AThe decomposed matrix.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
Returns
void

This function reconstructs the orthogonal matrix Q of a RQ decomposition based on the LAPACK ungrq() functions from matrices that have already been RQ factorized by the gerqf() functions. Note that this function can only be used for general, non-adapted matrices with float or double element type. The attempt to call the function with any adapted matrix or matrices of any other element type results in a compile time error!
The min(m,n)-by-n Q matrix is stored within the given matrix A:

using cplx = complex<double>;
DynamicMatrix<cplx,columnMajor> A;
DynamicVector<cplx> tau;
// ... Resizing and initialization
gerqf( A, tau.data() ); // Performing the RQ decomposition
ungrq( A, tau.data() ); // Reconstructing the Q matrix
const int m( A.rows() );
const int n( A.columns() );
const size_t row( m > n ? m - n : 0UL )
DynamicMatrix<cplx,columnMajor> Q( submatrix( A, row, 0UL, min(m,n), n ) );

For more information on the ungrq() functions (i.e. cungrq() and zungrq()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ ungrq() [2/3]

void blaze::ungrq ( int  m,
int  n,
int  k,
complex< float > *  A,
int  lda,
const complex< float > *  tau,
complex< float > *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the reconstruction of the orthogonal matrix Q from a RQ decomposition.

Parameters
mThe number of rows of the given matrix $[0..n)$.
nThe number of columns of the given matrix $[0..\infty)$.
kThe number of elementary reflectors, whose product defines the matrix $[0..m)$.
APointer to the first element of the single precision column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; size >= max( 1, n ).
infoReturn code of the function call.
Returns
void

This function generates all or part of the orthogonal matrix Q from a RQ decomposition based on the LAPACK cungrq() function for single precision column-major matrices that have already been factorized by the sgerqf() function. The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the cungrq() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ ungrq() [3/3]

void blaze::ungrq ( int  m,
int  n,
int  k,
complex< double > *  A,
int  lda,
const complex< double > *  tau,
complex< double > *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the reconstruction of the orthogonal matrix Q from a RQ decomposition.

Parameters
mThe number of rows of the given matrix $[0..n)$.
nThe number of columns of the given matrix $[0..\infty)$.
kThe number of elementary reflectors, whose product defines the matrix $[0..m)$.
APointer to the first element of the double precision column-major matrix.
ldaThe total number of elements between two columns of the matrix $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work; size >= max( 1, n ).
infoReturn code of the function call.
Returns
void

This function generates all or part of the orthogonal matrix Q from a RQ decomposition based on the LAPACK zungrq() function for double precision column-major matrices that have already been factorized by the dgerqf() function. The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the zungrq() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ unmlq() [1/3]

template<typename MT1 , bool SO, typename MT2 >
void blaze::unmlq ( DenseMatrix< MT1, SO > &  C,
const DenseMatrix< MT2, SO > &  A,
char  side,
char  trans,
const ElementType_< MT2 > *  tau 
)
inline

LAPACK kernel for the multiplication of the double precision Q from a LQ decomposition with another matrix.

Parameters
CThe matrix multiplier.
AThe decomposed matrix.
side'L' to apply $ Q $ or $ Q^T $ from the left, 'R' to apply from the right.
trans'N' for $ Q $, 'T' for $ Q^T $.
tauArray for the scalar factors of the elementary reflectors.
Returns
void
Exceptions
std::invalid_argumentInvalid size of Q matrix.
std::invalid_argumentInvalid side argument provided.
std::invalid_argumentInvalid trans argument provided.

This function multiplies a square Q matrix resulting from the LQ decomposition of the gelqf() functions with the given general m-by-n matrix C. Depending on the settings of side and trans it overwrites C with

| side = 'L' | side = 'R'
-------------|--------------|--------------
trans = 'N': | Q * C | C * Q
trans = 'T': | trans(Q) * C | C * trans(Q)

Note that the size of matrix C is preserved, which means that the function does not work for non-square Q matrices. Therefore in case the number of rows of A is larger than the number of columns, a std::invalid_argument exception is thrown. Also Note that this function can only be used for general, non-adapted matrices with float or double element type. The attempt to call the function with any adapted matrix or matrices of any other element type results in a compile time error!

The following code example demonstrates the use of the unmlq() function:

DynamicMatrix<double,columnMajor> A;
DynamicMatrix<double,columnMajor> C;
DynamicVector<double> tau;
// ... Resizing and initialization
gelqf( A, tau.data() ); // Performing the LQ decomposition
unmlq( C, A, 'R', 'N', tau.data() ); // Computing C = C * Q

The function fails if ...

  • ... the number of rows of the given A matrix is larger than the number of columns;
  • ... the given side argument is neither 'L' nor 'R';
  • ... the given trans argument is neither 'N' nor 'T'.

In all failure cases an exception is thrown.

For more information on the unmlq() functions (i.e. sunmlq() and dunmlq()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ unmlq() [2/3]

void blaze::unmlq ( char  side,
char  trans,
int  m,
int  n,
int  k,
const complex< float > *  A,
int  lda,
const complex< float > *  tau,
complex< float > *  C,
int  ldc,
complex< float > *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the multiplication of the single precision complex Q from a LQ decomposition with another matrix.

Parameters
side'L' to apply $ Q $ or $ Q^H $ from the left, 'R' to apply from the right.
trans'N' for $ Q $, 'C' for $ Q^H $.
mThe number of rows of the matrix C $[0..\infty)$.
nThe number of columns of the matrix C $[0..\infty)$.
kThe number of elementary reflectors, whose product defines the matrix Q.
APointer to the first element of the LQ decomposed single precision complex column-major matrix.
ldaThe total number of elements between two columns of the matrix A $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
CPointer to the first element of the single precision complex column-major matrix multiplicator.
ldcThe total number of elements between two columns of the matrix C $[0..\infty)$.
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work.
infoReturn code of the function call.
Returns
void

This function multiplies the Q matrix resulting from the LQ decomposition of the sgelqf() function with the given general single precision complex m-by-n matrix C. Depending on the settings of side and trans it overwrites C with

| side = 'L' | side = 'R'
-------------|---------------|---------------
trans = 'N': | Q * C | C * Q
trans = 'C': | ctrans(Q) * C | C * ctrans(Q)

In case side is specified as 'L', the Q matrix is expected to be of size m-by-m, in case side is set to 'R', Q is expected to be of size n-by-n.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the cunmlq() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ unmlq() [3/3]

void blaze::unmlq ( char  side,
char  trans,
int  m,
int  n,
int  k,
const complex< double > *  A,
int  lda,
const complex< double > *  tau,
complex< double > *  C,
int  ldc,
complex< double > *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the multiplication of the double precision complex Q from a LQ decomposition with another matrix.

Parameters
side'L' to apply $ Q $ or $ Q^H $ from the left, 'R' to apply from the right.
trans'N' for $ Q $, 'C' for $ Q^H $.
mThe number of rows of the matrix C $[0..\infty)$.
nThe number of columns of the matrix C $[0..\infty)$.
kThe number of elementary reflectors, whose product defines the matrix Q.
APointer to the first element of the LQ decomposed double precision complex column-major matrix.
ldaThe total number of elements between two columns of the matrix A $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
CPointer to the first element of the double precision complex column-major matrix multiplicator.
ldcThe total number of elements between two columns of the matrix C $[0..\infty)$.
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work.
infoReturn code of the function call.
Returns
void

This function multiplies the Q matrix resulting from the LQ decomposition of the sgelqf() function with the given general double precision complex m-by-n matrix C. Depending on the settings of side and trans it overwrites C with

| side = 'L' | side = 'R'
-------------|---------------|---------------
trans = 'N': | Q * C | C * Q
trans = 'C': | ctrans(Q) * C | C * ctrans(Q)

In case side is specified as 'L', the Q matrix is expected to be of size m-by-m, in case side is set to 'R', Q is expected to be of size n-by-n.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the zunmlq() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ unmql() [1/3]

template<typename MT1 , bool SO, typename MT2 >
void blaze::unmql ( DenseMatrix< MT1, SO > &  C,
const DenseMatrix< MT2, SO > &  A,
char  side,
char  trans,
const ElementType_< MT2 > *  tau 
)
inline

LAPACK kernel for the multiplication of the double precision Q from a QL decomposition with another matrix.

Parameters
CThe matrix multiplier.
AThe decomposed matrix.
side'L' to apply $ Q $ or $ Q^T $ from the left, 'R' to apply from the right.
trans'N' for $ Q $, 'T' for $ Q^T $.
tauArray for the scalar factors of the elementary reflectors.
Returns
void
Exceptions
std::invalid_argumentInvalid size of Q matrix.
std::invalid_argumentInvalid side argument provided.
std::invalid_argumentInvalid trans argument provided.

This function multiplies a square Q matrix resulting from the QL decomposition of the geqlf() functions with the given general m-by-n matrix C. Depending on the settings of side and trans it overwrites C with

| side = 'L' | side = 'R'
-------------|--------------|--------------
trans = 'N': | Q * C | C * Q
trans = 'T': | trans(Q) * C | C * trans(Q)

Note that the size of matrix C is preserved, which means that the function does not work for non-square Q matrices. Therefore in case the number of rows of A is smaller than the number of columns, a std::invalid_argument exception is thrown. Also note that this function can only be used for general, non-adapted matrices with float or double element type. The attempt to call the function with any adapted matrix or matrices of any other element type results in a compile time error!

The following code example demonstrates the use of the unmql() function:

DynamicMatrix<double,columnMajor> A;
DynamicMatrix<double,columnMajor> C;
DynamicVector<double> tau;
// ... Resizing and initialization
geqlf( A, tau.data() ); // Performing the QL decomposition
unmql( C, A, 'R', 'N', tau.data() ); // Computing C = C * Q

The function fails if ...

  • ... the number of rows of the given A matrix is larger than the number of columns;
  • ... the given side argument is neither 'L' nor 'R';
  • ... the given trans argument is neither 'N' nor 'T'.

In all failure cases an exception is thrown.

For more information on the unmql() functions (i.e. cunmql() and zunmql()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ unmql() [2/3]

void blaze::unmql ( char  side,
char  trans,
int  m,
int  n,
int  k,
const complex< float > *  A,
int  lda,
const complex< float > *  tau,
complex< float > *  C,
int  ldc,
complex< float > *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the multiplication of the single precision Q from a QL decomposition with another matrix.

Parameters
side'L' to apply $ Q $ or $ Q^H $ from the left, 'R' to apply from the right.
trans'N' for $ Q $, 'C' for $ Q^H $.
mThe number of rows of the matrix C $[0..\infty)$.
nThe number of columns of the matrix C $[0..\infty)$.
kThe number of elementary reflectors, whose product defines the matrix Q.
APointer to the first element of the QL decomposed single precision column-major matrix.
ldaThe total number of elements between two columns of the matrix A $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
CPointer to the first element of the single precision column-major matrix multiplicator.
ldcThe total number of elements between two columns of the matrix C $[0..\infty)$.
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work.
infoReturn code of the function call.
Returns
void

This function multiplies the Q matrix resulting from the QL decomposition of the sgeqlf() function with the given general single precision m-by-n matrix C. Depending on the settings of side and trans it overwrites C with

| side = 'L' | side = 'R'
-------------|---------------|---------------
trans = 'N': | Q * C | C * Q
trans = 'C': | ctrans(Q) * C | C * ctrans(Q)

In case side is specified as 'L', the Q matrix is expected to be of size m-by-m, in case side is set to 'R', Q is expected to be of size n-by-n.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the cunmql() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ unmql() [3/3]

void blaze::unmql ( char  side,
char  trans,
int  m,
int  n,
int  k,
const complex< double > *  A,
int  lda,
const complex< double > *  tau,
complex< double > *  C,
int  ldc,
complex< double > *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the multiplication of the double precision Q from a QL decomposition with another matrix.

Parameters
side'L' to apply $ Q $ or $ Q^H $ from the left, 'R' to apply from the right.
trans'N' for $ Q $, 'C' for $ Q^H $.
mThe number of rows of the matrix C $[0..\infty)$.
nThe number of columns of the matrix C $[0..\infty)$.
kThe number of elementary reflectors, whose product defines the matrix Q.
APointer to the first element of the QL decomposed double precision column-major matrix.
ldaThe total number of elements between two columns of the matrix A $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
CPointer to the first element of the double precision column-major matrix multiplicator.
ldcThe total number of elements between two columns of the matrix C $[0..\infty)$.
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work.
infoReturn code of the function call.
Returns
void

This function multiplies the Q matrix resulting from the QL decomposition of the sgeqlf() function with the given general double precision m-by-n matrix C. Depending on the settings of side and trans it overwrites C with

| side = 'L' | side = 'R'
-------------|---------------|---------------
trans = 'N': | Q * C | C * Q
trans = 'C': | ctrans(Q) * C | C * ctrans(Q)

In case side is specified as 'L', the Q matrix is expected to be of size m-by-m, in case side is set to 'R', Q is expected to be of size n-by-n.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the zunmql() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ unmqr() [1/3]

template<typename MT1 , bool SO, typename MT2 >
void blaze::unmqr ( DenseMatrix< MT1, SO > &  C,
DenseMatrix< MT2, SO > &  A,
char  side,
char  trans,
ElementType_< MT2 > *  tau 
)
inline

LAPACK kernel for the multiplication of the double precision Q from a QR decomposition with another matrix.

Parameters
CThe matrix multiplier.
AThe decomposed matrix.
side'L' to apply $ Q $ or $ Q^H $ from the left, 'R' to apply from the right.
trans'N' for $ Q $, 'C' for $ Q^H $.
tauArray for the scalar factors of the elementary reflectors.
Returns
void
Exceptions
std::invalid_argumentInvalid size of Q matrix.
std::invalid_argumentInvalid side argument provided.
std::invalid_argumentInvalid trans argument provided.

This function multiplies a square Q matrix resulting from the QR decomposition of the geqrf() functions with the given general m-by-n matrix C. Depending on the settings of side and trans it overwrites C with

| side = 'L' | side = 'R'
-------------|--------------|--------------
trans = 'N': | Q * C | C * Q
trans = 'C': | trans(Q) * C | C * trans(Q)

Note that the size of matrix C is preserved, which means that the function does not work for non-square Q matrices. Therefore in case the number of rows of A is larger than the number of columns, a std::invalid_argument exception is thrown. Also Note that this function can only be used for general, non-adapted matrices with float or double element type. The attempt to call the function with any adapted matrix or matrices of any other element type results in a compile time error!

The following code example demonstrates the use of the unmqr() function:

DynamicMatrix<double,columnMajor> A;
DynamicMatrix<double,columnMajor> C;
DynamicVector<double> tau;
// ... Resizing and initialization
geqrf( A, tau.data() ); // Performing the QR decomposition
unmqr( C, A, 'R', 'N', tau.data() ); // Computing C = C * Q

The function fails if ...

  • ... the number of rows of the given A matrix is larger than the number of columns;
  • ... the given side argument is neither 'L' nor 'R';
  • ... the given trans argument is neither 'N' nor 'T'.

In all failure cases an exception is thrown.

For more information on the unmqr() functions (i.e. cunmqr() and zunmqr()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ unmqr() [2/3]

void blaze::unmqr ( char  side,
char  trans,
int  m,
int  n,
int  k,
const complex< float > *  A,
int  lda,
const complex< float > *  tau,
complex< float > *  C,
int  ldc,
complex< float > *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the multiplication of the single precision Q from a QR decomposition with another matrix.

Parameters
side'L' to apply $ Q $ or $ Q^H $ from the left, 'R' to apply from the right.
trans'N' for $ Q $, 'C' for $ Q^H $.
mThe number of rows of the matrix C $[0..\infty)$.
nThe number of columns of the matrix C $[0..\infty)$.
kThe number of elementary reflectors, whose product defines the matrix Q.
APointer to the first element of the QR decomposed single precision column-major matrix.
ldaThe total number of elements between two columns of the matrix A $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
CPointer to the first element of the single precision column-major matrix multiplicator.
ldcThe total number of elements between two columns of the matrix C $[0..\infty)$.
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work.
infoReturn code of the function call.
Returns
void

This function multiplies the Q matrix resulting from the QR decomposition of the sgeqrf() function with the given general single precision m-by-n matrix C. Depending on the settings of side and trans it overwrites C with

| side = 'L' | side = 'R'
-------------|---------------|---------------
trans = 'N': | Q * C | C * Q
trans = 'C': | ctrans(Q) * C | C * ctrans(Q)

In case side is specified as 'L', the Q matrix is expected to be of size m-by-m, in case side is set to 'R', Q is expected to be of size n-by-n.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the cunmqr() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ unmqr() [3/3]

void blaze::unmqr ( char  side,
char  trans,
int  m,
int  n,
int  k,
const complex< double > *  A,
int  lda,
const complex< double > *  tau,
complex< double > *  C,
int  ldc,
complex< double > *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the multiplication of the double precision Q from a QR decomposition with another matrix.

Parameters
side'L' to apply $ Q $ or $ Q^H $ from the left, 'R' to apply from the right.
trans'N' for $ Q $, 'C' for $ Q^H $.
mThe number of rows of the matrix C $[0..\infty)$.
nThe number of columns of the matrix C $[0..\infty)$.
kThe number of elementary reflectors, whose product defines the matrix Q.
APointer to the first element of the QR decomposed double precision column-major matrix.
ldaThe total number of elements between two columns of the matrix A $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
CPointer to the first element of the double precision column-major matrix multiplicator.
ldcThe total number of elements between two columns of the matrix C $[0..\infty)$.
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work.
infoReturn code of the function call.
Returns
void

This function multiplies the Q matrix resulting from the QR decomposition of the sgeqrf() function with the given general double precision m-by-n matrix C. Depending on the settings of side and trans it overwrites C with

| side = 'L' | side = 'R'
-------------|---------------|---------------
trans = 'N': | Q * C | C * Q
trans = 'C': | ctrans(Q) * C | C * ctrans(Q)

In case side is specified as 'L', the Q matrix is expected to be of size m-by-m, in case side is set to 'R', Q is expected to be of size n-by-n.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the zunmqr() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ unmrq() [1/3]

template<typename MT1 , bool SO, typename MT2 >
void blaze::unmrq ( DenseMatrix< MT1, SO > &  C,
const DenseMatrix< MT2, SO > &  A,
char  side,
char  trans,
const ElementType_< MT2 > *  tau 
)
inline

LAPACK kernel for the multiplication of the double precision Q from a RQ decomposition with another matrix.

Parameters
CThe matrix multiplier.
AThe decomposed matrix.
side'L' to apply $ Q $ or $ Q^T $ from the left, 'R' to apply from the right.
trans'N' for $ Q $, 'T' for $ Q^T $.
tauArray for the scalar factors of the elementary reflectors.
Returns
void
Exceptions
std::invalid_argumentInvalid size of Q matrix.
std::invalid_argumentInvalid side argument provided.
std::invalid_argumentInvalid trans argument provided.

This function multiplies a square Q matrix resulting from the RQ decomposition of the gerqf() functions with the given general m-by-n matrix C. Depending on the settings of side and trans it overwrites C with

| side = 'L' | side = 'R'
-------------|--------------|--------------
trans = 'N': | Q * C | C * Q
trans = 'T': | trans(Q) * C | C * trans(Q)

Note that the size of matrix C is preserved, which means that the function does not work for non-square Q matrices. Therefore in case the number of rows of A is smaller than the number of columns, a std::invalid_argument exception is thrown. Also note that this function can only be used for general, non-adapted matrices with float or double element type. The attempt to call the function with any adapted matrix or matrices of any other element type results in a compile time error!

The following code example demonstrates the use of the unmrq() function:

DynamicMatrix<double,columnMajor> A;
DynamicMatrix<double,columnMajor> C;
DynamicVector<double> tau;
// ... Resizing and initialization
gerqf( A, tau.data() ); // Performing the RQ decomposition
unmrq( C, A, 'R', 'N', tau.data() ); // Computing C = C * Q

The function fails if ...

  • ... the number of rows of the given A matrix is larger than the number of columns;
  • ... the given side argument is neither 'L' nor 'R';
  • ... the given trans argument is neither 'N' nor 'T'.

In all failure cases an exception is thrown.

For more information on the unmrq() functions (i.e. cunmrq() and zunmrq()) see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ unmrq() [2/3]

void blaze::unmrq ( char  side,
char  trans,
int  m,
int  n,
int  k,
const complex< float > *  A,
int  lda,
const complex< float > *  tau,
complex< float > *  C,
int  ldc,
complex< float > *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the multiplication of the single precision Q from a RQ decomposition with another matrix.

Parameters
side'L' to apply $ Q $ or $ Q^H $ from the left, 'R' to apply from the right.
trans'N' for $ Q $, 'C' for $ Q^H $.
mThe number of rows of the matrix C $[0..\infty)$.
nThe number of columns of the matrix C $[0..\infty)$.
kThe number of elementary reflectors, whose product defines the matrix Q.
APointer to the first element of the RQ decomposed single precision column-major matrix.
ldaThe total number of elements between two columns of the matrix A $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
CPointer to the first element of the single precision column-major matrix multiplicator.
ldcThe total number of elements between two columns of the matrix C $[0..\infty)$.
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work.
infoReturn code of the function call.
Returns
void

This function multiplies the Q matrix resulting from the RQ decomposition of the sgerqf() function with the given general single precision m-by-n matrix C. Depending on the settings of side and trans it overwrites C with

| side = 'L' | side = 'R'
-------------|---------------|---------------
trans = 'N': | Q * C | C * Q
trans = 'C': | ctrans(Q) * C | C * ctrans(Q)

In case side is specified as 'L', the Q matrix is expected to be of size m-by-m, in case side is set to 'R', Q is expected to be of size n-by-n.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the cunmrq() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.

◆ unmrq() [3/3]

void blaze::unmrq ( char  side,
char  trans,
int  m,
int  n,
int  k,
const complex< double > *  A,
int  lda,
const complex< double > *  tau,
complex< double > *  C,
int  ldc,
complex< double > *  work,
int  lwork,
int *  info 
)
inline

LAPACK kernel for the multiplication of the double precision Q from a RQ decomposition with another matrix.

Parameters
side'L' to apply $ Q $ or $ Q^H $ from the left, 'R' to apply from the right.
trans'N' for $ Q $, 'C' for $ Q^H $.
mThe number of rows of the matrix C $[0..\infty)$.
nThe number of columns of the matrix C $[0..\infty)$.
kThe number of elementary reflectors, whose product defines the matrix Q.
APointer to the first element of the RQ decomposed double precision column-major matrix.
ldaThe total number of elements between two columns of the matrix A $[0..\infty)$.
tauArray for the scalar factors of the elementary reflectors; size >= min( m, n ).
CPointer to the first element of the double precision column-major matrix multiplicator.
ldcThe total number of elements between two columns of the matrix C $[0..\infty)$.
workAuxiliary array; size >= max( 1, lwork ).
lworkThe dimension of the array work.
infoReturn code of the function call.
Returns
void

This function multiplies the Q matrix resulting from the RQ decomposition of the sgerqf() function with the given general double precision m-by-n matrix C. Depending on the settings of side and trans it overwrites C with

| side = 'L' | side = 'R'
-------------|---------------|---------------
trans = 'N': | Q * C | C * Q
trans = 'C': | ctrans(Q) * C | C * ctrans(Q)

In case side is specified as 'L', the Q matrix is expected to be of size m-by-m, in case side is set to 'R', Q is expected to be of size n-by-n.

The info argument provides feedback on the success of the function call:

  • = 0: The decomposition finished successfully.
  • < 0: The i-th argument had an illegal value.

For more information on the zunmrq() function, see the LAPACK online documentation browser:

http://www.netlib.org/lapack/explore-html/

Note
This function can only be used if a fitting LAPACK library, which supports this function, is available and linked to the executable. Otherwise a call to this function will result in a linker error.