Developer Reference for Intel® oneAPI Math Kernel Library for Fortran
p?orgl2/p?ungl2
Generates all or part of the orthogonal/unitary matrix Q from an LQ factorization determined by p?gelqf (unblocked algorithm).
Syntax
call psorgl2 ( m , n , k , a , ia , ja , desca , tau , work , lwork , info )
call pdorgl2 ( m , n , k , a , ia , ja , desca , tau , work , lwork , info )
call pcungl2 ( m , n , k , a , ia , ja , desca , tau , work , lwork , info )
call pzungl2 ( m , n , k , a , ia , ja , desca , tau , work , lwork , info )
Include Files
mkl_scalapack.h
Description
psorgl2 pdorgl2 pcungl2 pzungl2 The p?orgl2/p?ungl2 routine function generates a m -by- n real/complex matrix Q denoting A(ia:ia+m-1, ja:ja+n-1) with orthonormal rows, which is defined as the first m rows of a product of k elementary reflectors of order n
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.) .
Input Parameters
m
(global) INTEGER .
The number of rows in the distributed submatrix Q . m ≥ 0 .
n
(global) INTEGER .
The number of columns in the distributed submatrix Q . n ≥ m ≥ 0 .
k
(global) INTEGER .
The number of elementary reflectors whose product defines the matrix Q . m ≥ k ≥ 0 .
- a
-
REAL for psorgl2 DOUBLE PRECISION for pdorgl2 COMPLEX for pcungl2 COMPLEX*16 for pzungl2 .
Pointer into the local memory to an array of size ( lld_a , LOCc ( ja + n -1)) .
On entry, the i -th row must contain the vector that defines the elementary reflector H ( i ), ia ≤ i ≤ ia + k -1, as returned by p?gelqf (Computes the LQ factorization of a general rectangular matrix.) in the k rows of its distributed matrix argument A(ia:ia+k-1, ja:*) .
ia
(global) INTEGER .
The row index in the global matrix A indicating the first row of sub( A ).
ja
(global) INTEGER .
The column index in the global matrix A indicating the first column of sub( A ).
desca
(global and local) INTEGER array of size dlen_ . The array descriptor for the distributed matrix A .
- tau
-
(local) REAL for psorgl2 DOUBLE PRECISION for pdorgl2 COMPLEX for pcungl2 COMPLEX*16 for pzungl2 .
Array of size LOCr ( ja + k -1). tau(j)[j] contains the scalar factor of the elementary reflectors H ( j ) , 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 .
- WORK
-
(local) REAL for psorgl2 DOUBLE PRECISION for pdorgl2 COMPLEX for pcungl2 COMPLEX*16 for pzungl2 . Workspace array of size lwork .
lwork
(local or global) INTEGER .
The size of the array work . lwork is local input and must be at least lwork ≥ nqa0 + max(1, mpa0) , where iroffa = mod(ia-1, mb_a) , icoffa = mod(ja-1, nb_a) , iarow = indxg2p(ia, mb_a, myrow, rsrc_a, nprow) , iacol = indxg2p(ja, nb_a, mycol, csrc_a, npcol) , mpa0 = numroc(m+iroffa, mb_a, myrow, iarow, nprow) , nqa0 = numroc(n+icoffa, nb_a, mycol, iacol, npcol) .
indxg2p and numroc are ScaLAPACK tool functions; myrow , mycol , nprow, and npcol can be determined by calling the subroutine blacs_gridinfo .
If lwork = -1 , then lwork is global input and a workspace query is assumed; the routine 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
- a
-
On exit, this array contains the local pieces of the m -by- n distributed matrix Q .
work
On exit, work(1)[0] returns the minimal and optimal lwork .
info
(local) INTEGER .
= 0 : successful exit
< 0 : if the i -th argument is an array and the j -th entry 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 .