Developer Reference for Intel® oneAPI Math Kernel Library for C
p?unmlq
Multiplies a general matrix by the unitary matrix Q of the LQ factorization formed by p?gelqf .
Syntax
voidpcunmlq ( char*side , char*trans , MKL_INT*m , MKL_INT*n , MKL_INT*k , MKL_Complex8*a , MKL_INT*ia , MKL_INT*ja , MKL_INT*desca , MKL_Complex8*tau , MKL_Complex8*c , MKL_INT*ic , MKL_INT*jc , MKL_INT*descc , MKL_Complex8*work , MKL_INT*lwork , MKL_INT*info );
voidpzunmlq ( char*side , char*trans , MKL_INT*m , MKL_INT*n , MKL_INT*k , MKL_Complex16*a , MKL_INT*ia , MKL_INT*ja , MKL_INT*desca , MKL_Complex16*tau , MKL_Complex16*c , MKL_INT*ic , MKL_INT*jc , MKL_INT*descc , MKL_Complex16*work , MKL_INT*lwork , MKL_INT*info );
Include Files
mkl_scalapack.h
Description
pcunmlq pzunmlq This routine function overwrites the general complex m -by- n distributed matrix sub( C ) = C ( iс : iс + m -1, jс : jс + n -1) with
side = ‘L’ |
side = ‘R’ |
|
trans = ‘N’ : |
Q *sub( C ) |
sub( C )* Q |
trans = ‘T’ : |
Q:code:`H` *sub( C ) |
sub( C )* Q:code:`H` |
where Q is a complex unitary distributed matrix defined as the product of k elementary reflectors
Q = H ( k )’ … H (2)’ H (1)’
as returned by p?gelqf (Computes the LQ factorization of a general rectangular matrix.) . Q is of order m if side = 'L' and of order n if side = 'R' .
Input Parameters
side
(global)
='L' : Q or Q:code:`H` is applied from the left. ='R' : Q or Q:code:`H` is applied from the right.
trans
(global)
='N' , no transpose, Q is applied. ='C' , conjugate transpose, Q:code:`H` is applied.
m
(global) The number of rows in the distributed matrix sub( C ) (m≥0) .
n
(global) The number of columns in the distributed matrix sub( C)(n≥0) .
k
(global) The number of elementary reflectors whose product defines the matrix Q . Constraints:
If side = 'L' , m≥k≥0 If side = 'R' , n≥k≥0 .
- a
-
(local) COMPLEX for pcunmlq DOUBLE COMPLEX for pzunmlq .
Pointer into the local memory to an array of size (lld_a,LOCc(ja+m-1))lld_a * LOCc ( ja + m -1) , if side = 'L' and (lld_a,LOCc(ja+n-1))lld_a * LOCc ( ja + n -1) , if side = 'R' , where lld_a≥ max(1, LOCr (ia+k-1)) . The i -th column of the matrix stored in a must contain the vector that defines the elementary reflector H ( i ), ia ≤ i ≤ ia + k -1, as returned by GUID-30298C45-65B8-4000-8C41-FE1A9B069B98.xml#GUID-30298C45-65B8-4000-8C41-FE1A9B069B98 in the k rows of its distributed matrix argument A ( ia : ia + k -1, ja :*). A ( ia : ia + k -1, ja :*) is modified by the function but restored on exit.
ia , ja
(global) The row and column indices in the global matrix A indicating the first row and the first column of the submatrix A , respectively.
desca
(global and local) array of size dlen_ . The array descriptor for the distributed matrix A .
- tau
-
(local) COMPLEX for pcunmlq DOUBLE COMPLEX for pzunmlq Array of size LOCc(ia+k-1) .
Contains the scalar factor tau [ j ] of elementary reflectors H ( j +1) as returned by p?gelqf (0 ≤ j < LOCc(ia+k-1) ) . tau is tied to the distributed matrix A .
- c
-
(local) COMPLEX for pcunmlq DOUBLE COMPLEX for pzunmlq .
Pointer into the local memory to an array of local size (lld_c,LOCc(jc+n-1))lld_c * LOCc ( jc + n -1) .
Contains the local pieces of the distributed matrix sub( C ) to be factored.
ic , jc
(global) The row and column indices in the global matrix C indicating the first row and the first column of the submatrix C , respectively.
descc
(global and local) array of size dlen_ . The array descriptor for the distributed matrix C .
- work
-
(local) COMPLEX for pcunmlq DOUBLE COMPLEX for pzunmlq . Workspace array of size of lwork .
lwork
(local or global) size of the array work ; must be at least:
If side = 'L' , lwork≥max((mb_a*(mb_a-1))/2, (mpc0 + maxmqa0)+ numroc(numroc(m + iroffc, mb_a, 0, 0, NPROW), mb_a, 0, 0, lcmp), nqc0))*mb_a) + mb_a*mb_a else if side = 'R' , lwork≥max((mb_a* (mb_a-1))/2, (mpc0 + nqc0)*mb_a + mb_a*mb_a end if where lcmp = lcm/NPROW with lcm = ilcm (NPROW, NPCOL) , iroffa = mod(ia-1, mb_a) , icoffa = mod(ja-1, nb_a) , iacol = indxg2p(ja, nb_a, MYCOL, csrc_a, NPCOL) , mqa0 = numroc(m + icoffa, nb_a, MYCOL, iacol, NPCOL) , iroffc = mod(ic-1, mb_c) , icoffc = mod(jc-1, nb_c) , icrow = indxg2p(ic, mb_c, MYROW, rsrc_c, NPROW) , iccol = indxg2p(jc, nb_c, MYCOL, csrc_c, NPCOL) , mpc0 = numroc(m+iroffc, mb_c, MYROW, icrow, NPROW) , nqc0 = numroc(n+icoffc, nb_c, MYCOL, iccol, NPCOL) ,
ilcm , indxg2p and numroc are ScaLAPACK tool functions; MYROW , MYCOL , NPROW and NPCOL can be determined by calling the function blacs_gridinfo .
If lwork = -1 , then lwork is global input and a workspace query is assumed; the function only calculates the minimum and optimal size for all work arrays. Each of these values is returned in the first entry of the corresponding work array, and no error message is issued by pxerbla .
Output Parameters
- c
-
Overwritten by the product Q *sub( C ), or Q' *sub ( C ), or sub( C )* Q' , or sub( C )* Q
work(1)[0]
On exit work(1)[0] contains the minimum value of lwork required for optimum performance.
info
(global)
= 0 : the execution is successful.
< 0 : if the i -th argument is an array and the j- th entry , indexed j - 1, had an illegal value, then info = -( i *100+ j ); if the i- th argument is a scalar and had an illegal value, then info = -i .