Multiplication of Q From LQ Factorization#

UNMLQ (UNitary matrix Multiplication after LQ 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 LQ factorization. As an output of LQ factorization, \(Q\) is not explicitly formed. The elements above 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 unmlq device functions are as follows (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 LQ factorization. If side = side::left, A is \(K \times M\) with leading dimension \(\mathrm{lda} \geq K\) if matrix A is in column-major layout, or \(\mathrm{lda} \geq M\) if matrix A is row-major. If side = side::right, A is instead \(K \times N\) with leading dimension \(\mathrm{lda} \geq K\) if matrix A is in column-major layout, or \(\mathrm{lda} \geq N\) if matrix A is row-major.

Array tau is an input array of size \(K\) for each batch, coming from the output of the LQ 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 above 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:

  1. A and C being either column- or row-major memory layout, see Arrangement Operator,

  2. \(op(Q)\) either being non_transposed, transposed for real data type, or conj_transposed for complex data type, see TransposeMode Operator, and

  3. Side of multiplication being either side::left or side::right, see Side Operator.