Multiplication of Q From QR Factorization#
UNMQR (UNitary matrix Multiplication after QR factorization) overwrites the general M x N matrix C with
\(op(Q) C\) if
side = side::left\(C op(Q)\) if
side = side::right
where \(Q\) is a unitary matrix from the QR factorization. As an output of the QR factorization, \(Q\) is not explicitly formed. The elements below the diagonal of A, with the array tau, represent the matrix \(Q\) as a product of \(\min(M, N)\) Householder vectors.
Operation \(op()\) indicates if \(Q\) is non_transposed, or transposed for real data type, or conj_transposed for complex data type.
\(Q\) is of order \(M\) if side = side::left, and of order \(N\) if side = side::right.
cuSolverDx unmqr device functions are (see Execution Methods):
__device__ void execute(const data_type* A, const data_type* tau, data_type* C);
// with runtime leading dimensions
__device__ void execute(const data_type* A, const unsigned int lda, const data_type* tau,
data_type* C);
__device__ void execute(const data_type* A, const data_type* tau,
data_type* C, const unsigned int ldc);
__device__ void execute(const data_type* A, const unsigned int lda, const data_type* tau,
data_type* C, const unsigned int ldc);
A is a batched matrix coming from the output of the QR factorization. If side = side::left, A is \(M \times K\) with leading dimension \(\mathrm{lda} \geq M\) if matrix A is in column-major layout, or \(\mathrm{lda} \geq K\) if matrix A is row-major. If side = side::right, A is instead \(N \times K\) with leading dimension \(\mathrm{lda} \geq N\) if matrix A is in column-major layout, or \(\mathrm{lda} \geq K\) if matrix A is row-major.
Array tau is an input array of size \(K\) for each batch, coming from the output of the QR factorization.
If side = side::left, then \(K\) cannot be larger than \(M\). If side = side::right, then \(K\) cannot be larger than \(N\).
The elements below the diagonal of A, with the array tau, represent the matrix \(Q\) as a product of a sequence of \(K\) Householder vectors.
Matrix C is an input and output matrix, having dimension of \(M \times N\) per batch. After the function, matrix C is overwritten with the result of the multiplication.
The functions support:
AandCbeing either column- or row-major memory layout, see Arrangement Operator,\(op(Q)\) either being
non_transposed,transposedfor real data type, orconj_transposedfor complex data type, see TransposeMode Operator, andSideof multiplication being eitherside::leftorside::right, see Side Operator.