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 GELQF does not explicitly form \(Q\), but represents it as a product of a sequence of K Householder reflectors. Function unglq explicitly forms Q as a \(M x N\) unitary matrix where \(N \geq M \geq K\).
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 \times N\) matrix coming from the output of GELQF, with leading dimension \(\mathrm{lda} \geq M\) if A is in column-major layout, or \(\mathrm{lda} \geq 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 \(M \times N\) matrix \(Q\).
The functions support:
Abeing either column- or row-major memory layout, see Arrangement Operator,Dimensions \(N \geq M \geq K\) are required.