typedef enum _vsip_mat_op { VSIP_MAT_NTRANS = 0, // op(A) = A VSIP_MAT_TRANS = 1, // op(A) = A^T VSIP_MAT_HERM = 2, // op(A) = A^H (complex only) VSIP_MAT_CONJ = 3 // op(X) = A^* (complex only) } vsip_mat_op; typedef enum _vsip_mat_side { VSIP_MAT_LSIDE = 0, VSIP_MAT_RSIDE = 1 } vsip_mat_side; int vsip_qrdprodq_f(const vsip_qr_f *qrd, vsip_mat_op opQ, vsip_mat_side apQ, const vsip_mview_f *c); int vsip_cqrdprodq_f(const vsip_cqr_f *qrd, vsip_mat_op opQ, vsip_mat_side apQ, const vsip_cmview_f *c);
This function performs matrix multiplication with the orthogonal matrix
from a QR decomposition. It computes either
,
,
,
,
or
, depending on the specified parameters.
The operation performed is determined by the opQ and apQ parameters:
opQ specifies whether to use
,
or
apQ specifies whether
is on the left or right of the multiplication
const vsip_dqr_p* qrd: Pointer to the QR decomposition object containing a previously computed decomposition.
vsip_mat_op opQ: Operation to perform with Q:
VSIP_MAT_NTRANS: Use
as is
VSIP_MAT_TRANS: Use the transpose of
,
VSIP_MAT_HERM: Use the conjugate transpose of
, 
vsip_mat_side apQ: Side of multiplication:
VSIP_MAT_LEFT:
is on the left (
,
or
)
VSIP_MAT_RIGHT:
is on the right (
,
or
)
const vsip_dmview_p* c: On input, contains matrix
. On output, contains the result of the multiplication.
Returns 0 on success.
Returns a non-zero value on error.
The QR decomposition must have been previously computed using vsip_dqrd_p .
The QR object must have been created with an option that saves the
matrix (VSIP_QRD_SAVEQ or
VSIP_QRD_SAVEQ1).
The input matrix
must have appropriate dimensions for the operation.
For VSIP_QRD_SAVEQ1:
| Input | Output
| |||
| MAT_LSIDE | MAT_RSIDE | MAT_LSIDE | MAT_RSIDE | |
| MAT_NTRANS | | | | |
| MAT_TRANS | | | | |
| MAT_HERM | | | | |
For VSIP_QRD_SAVEQ:
| Input and Output
| ||
| MAT_LSIDE | MAT_RSIDE | |
| MAT_NTRANS | | |
| MAT_TRANS | | |
| MAT_HERM | | |