Matrix Q Generation from LQ Factorization#
UNGLQ (UNitary matrix Generation after LQ factorization) explicitly generates the unitary matrix Q from the LQ factorization GELQF. Recall that the LQ factorization of a M x N matrix A is given by:
where L is an (M x M) lower triangular matrix, and Q is an (M x N) unitary matrix with orthonormal rows, defined as the first M rows of a produce of K Householder reflectors H of order N:
Function LQ Factorization does not explicitly form Q. The elements below the diagonal of A, i.e., the vectors v, with the array tau, represent the matrix Q as a product of a sequence of K Householder reflectors.
Function unglq explicitly forms Q as a (M x N) unitary matrix, where N >= M >= K is required.
cuSolverDx unglq device functions are (see Execution Methods):
__device__ void execute(data_type* A, const data_type* tau);
// with runtime leading dimensions
__device__ void execute(data_type* A, const unsigned int lda, const data_type* tau);
A is a batched M x N matrix coming from the output of GELQF, with leading dimension lda >= M if A is in column-major layout, or lda >= N if A is row-major. The lower triangular part of A contains the vectors v that define the elementary Householder reflectors.
Array tau is an input array of size K for each batch, coming from the output of GELQF.
After the function returns, A is overwritten with the matrix Q (M x N).
The functions support:
Abeing either column- or row-major memory layout, see Arrangement Operator,Matrix
AdimensionN >= M >= Kis required.