Intel® oneAPI Math Kernel Library Developer Reference - C
Computes the QR factorization of a set of general m x n, matrices, stored in Compact format (see Compact Format for details).
void mkl_sgeqrf_compact (MKL_LAYOUT layout, MKL_INT m, MKL_INT n, float * ap, MKL_INT ldap, float * taup, float * work, MKL_INT lwork, MKL_INT * info, MKL_COMPACT_PACK format, MKL_INT nm);
void mkl_cgeqrf_compact (MKL_LAYOUT layout, MKL_INT m, MKL_INT n, float * ap, MKL_INT ldap, float * taup, float * work, MKL_INT lwork, MKL_INT * info, MKL_COMPACT_PACK format, MKL_INT nm);
void mkl_dgeqrf_compact (MKL_LAYOUT layout, MKL_INT m, MKL_INT n, double * ap, MKL_INT ldap, double * taup, double * work, MKL_INT lwork, MKL_INT * info, MKL_COMPACT_PACK format, MKL_INT nm);
void mkl_zgeqrf_compact (MKL_LAYOUT layout, MKL_INT m, MKL_INT n, double * ap, MKL_INT ldap, double * taup, double * work, MKL_INT lwork, MKL_INT * info, MKL_COMPACT_PACK format, MKL_INT nm);
The routine forms the QR factorization of a set of general, m x n matrices A, stored in Compact format. The routine does not form the Q factors explicitly. Instead, Q is represented as a product of min(m,n) elementary reflectors. The factorization (output) data will also be stored in Compact format.
Compact routines have some limitations; see Numerical Limitations.
Specifies whether two-dimensional array storage is row-major (MKL_ROW_MAJOR) or column-major (MKL_COL_MAJOR).
Application Notes:
The compact array that will store the elementary reflectors needs to be allocated before the routine is called and unpacked after. First, the routine mkl_?get_size_compact should be called, to determine the size of taup, and memory for taup should be allocated. After calling mkl_?geqrf_compact, taup stores the elementary reflectors in compact form, so should be unpacked using mkl_?geunpack_compact. See Compact Format for more details, or reference the example below. (Note: the following example is meant to demonstrate the calling sequence to allocate memory and unpack taup. All other parameters are assumed to be already set up before the sequence below is executed.)
MKL_R_TYPE *tau_array[nm]; // ... tau_buffer_size = mkl_?get_size_compact(min(m, n), 1, format, nm); MKL_R_TYPE *tau_compact = (MKL_R_TYPE *)mkl_malloc(tau_buffer_size, 128); mkl_?geqrf_compact(layout, m, n, a_compact, ldap, tau_compact, work, lwork, &info, format, nm); // Note that here MKL_COL_MAJOR is used because tau is a 1-d array mkl_?geunpack_compact(MKL_COL_MAJOR, min(m, n), 1, tau_array, min(m, n), tau_compact, min(m, n), format, nm);
Points to the beginning of a set of the tauc arrays, each of which has size min(m,n), stored in Compact format. tauc contains scalars that define elementary reflectors for Qc in its decomposition in a product of elementary reflectors. taup needs to be allocated by the user before calling this routine. See the application notes (below the description) for more details.