## Developer Reference

• 2020.2
• 07/15/2020
• Public Content
Contents

# p?gelq2

Computes an LQ factorization of a general rectangular matrix (unblocked algorithm).

## Syntax

Description
The
p?gelq2
routine
computes an
LQ
factorization of a real/complex distributed
m
-by-
n
matrix
sub(
A
) =
A
(
ia
:
ia
+
m
-1
,
ja
:
ja
+
n
-1)
=
L
*
Q
.
Input Parameters
m
(global)
INTEGER
.
The number of rows of the distributed matrix sub(
A
).
(
m
≥0)
.
n
(global)
INTEGER
.
The number of columns of the distributed matrix sub(
A
).
(
n
0)
.
a
(local).
REAL
for
psgelq2
DOUBLE PRECISION
for
pdgelq2
COMPLEX
for
pcgelq2
COMPLEX*16
for
pzgelq2
.
Pointer into the local memory to an array of size
(
lld_a
,
LOCc
(
ja
+
n
-1))
.
On entry, this array contains the local pieces of the
m
-by-
n
distributed matrix sub(
A
) which is to be factored.
ia
,
ja
(global)
INTEGER
.
The row and column indices in the global matrix
A
indicating the first row and the first column of sub(
A
), respectively.
desca
(global and local)
INTEGER
array of size
dlen_
. The array descriptor for the distributed matrix
A
.
work
(local).
REAL
for
psgelq2
DOUBLE PRECISION
for
pdgelq2
COMPLEX
for
pcgelq2
COMPLEX*16
for
pzgelq2
.
This is a 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
nq
0 + max( 1,
mp
0 )
,
where
iroff
= mod(
ia
-1,
mb_a
),
icoff
= mod(
ja
-1,
nb_a
)
,
iarow
=
indxg2p
(
ia
,
mb_a
,
myrow
,
rsrc_a
,
nprow
)
,
iacol
=
indxg2p
(
ja
,
nb_a
,
mycol
,