Developer Reference for Intel® oneAPI Math Kernel Library for C
p?orml2/p?unml2
Multiplies a general matrix by the orthogonal/unitary matrix from an LQ factorization determined by p?gelqf (unblocked algorithm).
Syntax
voidpsorml2 ( char*side , char*trans , MKL_INT*m , MKL_INT*n , MKL_INT*k , float*a , MKL_INT*ia , MKL_INT*ja , MKL_INT*desca , float*tau , float*c , MKL_INT*ic , MKL_INT*jc , MKL_INT*descc , float*work , MKL_INT*lwork , MKL_INT*info );
voidpdorml2 ( char*side , char*trans , MKL_INT*m , MKL_INT*n , MKL_INT*k , double*a , MKL_INT*ia , MKL_INT*ja , MKL_INT*desca , double*tau , double*c , MKL_INT*ic , MKL_INT*jc , MKL_INT*descc , double*work , MKL_INT*lwork , MKL_INT*info );
voidpcunml2 ( 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 );
voidpzunml2 ( 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
psorml2 pdorml2 pcunml2 pzunml2 The p?orml2/p?unml2 routine function overwrites the general real/complex m -by- n distributed matrix sub ( C )= C(ic:ic+m-1, jc:jc+n-1) with
Q *sub( C ) if side = 'L' and trans = 'N' , or
Q:code:`T` *sub( C ) / Q:code:`H` *sub( C ) if side = 'L' and trans = 'T' (for real flavors) or trans = 'C' (for complex flavors), or
sub( C )* Q if side = 'R ‘ and trans = 'N' , or
sub( C )* Q:code:`T` / sub( C )* Q:code:`H` if side = 'R' and trans = 'T' (for real flavors) or trans = 'C' (for complex flavors).
where Q is a real orthogonal or complex unitary distributed matrix defined as the product of k elementary reflectors
Q = H(k)*...*H(2)*H(1) (for real flavors)
Q = ( H ( k )) :code:`H` *…*( H (2)) :code:`H` *( H (1)) :code:`H` (for complex flavors)
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’ : apply Q or Q:code:`T` for real flavors ( Q:code:`H` for complex flavors) from the left, = ‘R’ : apply Q or Q:code:`T` for real flavors ( Q:code:`H` for complex flavors) from the right.
trans
(global)
= ‘N’ : apply Q (no transpose) = ‘T’ : apply Q:code:`T` (transpose, for real flavors) = ‘C’ : apply Q:code:`H` (conjugate transpose, for complex flavors)
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 . If side = 'L' , m ≥ k ≥ 0; if side = 'R' , n ≥ k ≥ 0 .
- a
-
(local) REAL for psorml2 DOUBLE PRECISION for pdorml2 COMPLEX for pcunml2 COMPLEX*16 for pzunml2 . 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' ,
(lld_a, LOCc(ja+n-1))lld_a * LOCc ( ja + n -1) if side='R' ,
where lld_a ≥ max (1, LOCr(ia+k-1)) .
On entry, the i -th row 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:*) . The argument A(ia:ia+k-1, ja:*) is modified by the function but restored on exit.
ia
(global)
The row index in the global matrix A indicating the first row of sub( A ).
ja
(global)
The column index in the global matrix A indicating the first column of sub( A ).
desca
(global and local) array of size dlen_ . The array descriptor for the distributed matrix A .
- tau
-
(local) REAL for psorml2 DOUBLE PRECISION for pdorml2 COMPLEX for pcunml2 COMPLEX*16 for pzunml2 .
Array of size LOCc(ia+k-1) . tau [ i ] contains the scalar factor of the elementary reflector H ( i +1), i = 0, 1, …, LOCc(ja+k-1) -1 , as returned by GUID-30298C45-65B8-4000-8C41-FE1A9B069B98.xml#GUID-30298C45-65B8-4000-8C41-FE1A9B069B98 . This array is tied to the distributed matrix A .
- c
-
(local) REAL for psorml2 DOUBLE PRECISION for pdorml2 COMPLEX for pcunml2 COMPLEX*16 for pzunml2 .
Pointer into the local memory to an array of size (lld_c, LOCc(jc+n-1))lld_c * LOCc ( jc + n -1) . On entry, the local pieces of the distributed matrix sub ( C ).
ic
(global)
The row index in the global matrix C indicating the first row of sub( C ).
jc
(global)
The column index in the global matrix C indicating the first column of sub( C ).
descc
(global and local) array of size dlen_ . The array descriptor for the distributed matrix C .
- work
-
(local) REAL for psorml2 DOUBLE PRECISION for pdorml2 COMPLEX for pcunml2 COMPLEX*16 for pzunml2 . Workspace array of size lwork .
lwork
(local or global)
The size of the array work . lwork is local input and must be at least if side = 'L' , lwork ≥ mqc0 + max(max( 1, npc0), numroc(numroc(m+icoffc, mb_a, 0, 0, nprow), mb_a, 0, 0, lcmp)) , if side = 'R' , lwork ≥ npc0 + max(1, mqc0) , where lcmp = lcm / nprow , lcm = iclm(nprow, 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+icoffc, mb_c, mycol, icrow, nprow) , Nqc0 = numroc(n+iroffc, nb_c, myrow, 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 GUID-E523C816-D553-4D4E-8458-5404828CC07B.xml .
Output Parameters
- c
-
On exit, c is overwritten by Q *sub( C ), or Q:code:`T` *sub( C )/ Q:code:`H` *sub( C ), or sub( C )* Q , or sub( C )* Q:code:`T` / sub( C )* Q:code:`H`
work
On exit, work(1)[0] returns the minimal and optimal lwork .
info
(local)
= 0 : successful exit
< 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 .
If side = 'L' , (nb_a.eq.mb_c .AND. icoffa.eq.iroffc)(nb_a == mb_c && icoffa == iroffc)
If side = 'R' , (nb_a.eq.nb_c .AND. icoffa.eq.icoffc .AND. iacol.eq.iccol)(nb_a == nb_c && icoffa == icoffc && iacol == iccol) .