Matrix Q Generation from QR Factorization#
UNGQR (UNitary matrix Generation after QR factorization) explicitly generates the unitary matrix \(Q\) from the QR factorization GEQRF. Recall that GEQRF does not explicitly form \(Q\), but represents it as a product of a sequence of K Householder reflectors. Function ungqr explicitly forms Q as a \(M x N\) unitary matrix where \(M \geq N \geq K\).
cuSolverDx ungqr 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 GEQRF, 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 upper 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 GEQRF.
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 \(M \geq N \geq K\) are required.