Contents

# p?gebd2

Reduces a general rectangular matrix to real bidiagonal form by an orthogonal/unitary transformation (unblocked algorithm).

## Syntax

Include Files
• mkl_scalapack.h
Description
The
p?gebd2
function
reduces a real/complex general
m
-by-
n
distributed matrix sub(
A
) =
A
(
ia
:
ia
+
m
-1,
ja
:
ja
+
n
-1)
to upper or lower bidiagonal form
B
by an orthogonal/unitary transformation:
`Q'*sub(A)*P = B.`
If
m
n
,
B
is the upper bidiagonal; if
m
<
n
,
B
is the lower bidiagonal.
Input Parameters
m
(global)
The number of rows of the distributed matrix sub(
A
).
(
m
0)
.
n
(global)
The number of columns in the distributed matrix sub(
A
). (
n
0).
a
(local).
Pointer into the local memory to an array of size
lld_a
*
LOC
c
(
ja
+
n
-1)
.
On entry, this array contains the local pieces of the general distributed matrix sub(
A
).
ia
,
ja
(global) The row and column indices in the global matrix
A
indicating the first row and the first column of the matrix sub(
A
), respectively.
desca
(global and local) array of size
dlen_
. The array descriptor for the distributed matrix A.
work
(local).
This is a workspace array of size
lwork
.
lwork
(local or global)
The size of the array
work
.
lwork
is local input and must be at least
lwork
max(
mpa
0,
nqa
0)
,
where
nb
=
mb_a
=
nb_a
,
iroffa
= mod(
ia
-1,
nb
),
iarow
= indxg2p(
ia
,
nb
,
myrow
,
rsrc_a
,
nprow
)
,
iacol
= indxg2p(
ja
,
nb
,
mycol
,
csrc_a
,
npcol
),
mpa
0 = numroc(
m
+
iroffa
,
nb
,
myrow
,
iarow
,
nprow
),
nqa
0 = numroc(
n
+
icoffa
,
nb
,
mycol
,
iacol
,
npcol
).
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
a
(local).
On exit, if
m
n
, the diagonal and the first superdiagonal of sub(
A
) are overwritten with the upper bidiagonal matrix
B
; the elements below the diagonal, with the array
tauq
, represent the orthogonal/unitary matrix
Q
as a product of elementary reflectors, and the elements above the first superdiagonal, with the array
taup
, represent the orthogonal matrix
P
as a product of elementary reflectors. If
m
<
n
, the diagonal and the first subdiagonal are overwritten with the lower bidiagonal matrix
B
; the elements below the first subdiagonal, with the array
tauq
, represent the orthogonal/unitary matrix
Q
as a product of elementary reflectors, and the elements above the diagonal, with the array
taup
, represent the orthogonal matrix
P
as a product of elementary reflectors.
See
Applications Notes
below.
d
(local)
Array of size
LOCc
(
ja
+min(
m
,
n
)-1)
if
m
n
;
LOCr
(
ia
+min(
m,n
)-1)
otherwise. The distributed diagonal elements of the bidiagonal matrix
B
:
d
[
i
] =
A
(
i
+1,
i
+1), i=0, 1,..., size (
d
) - 1
.
d
is tied to the distributed matrix
A
.
e
(local)
Array of size
LOCc
(
ja
+min(
m
,
n
)-1)
if
m
n
;
LOCr
(
ia
+min(
m
,
n
)-2)
otherwise. The distributed diagonal elements of the bidiagonal matrix
B
:
if
m
n
,
e
[
i
] =
A
(
i
+1,
i
+2) for
i
= 0, 1, ... ,
n
-2;
if
m
<
n
,
e
[
i
] =
A
(
i
+2,
i
+1) for
i
= 0, 1, ...,
m
-2
.
e
is tied to the distributed matrix
A
.
tauq
(local).
Array of size
LOCc
(
ja
+min(
m
,
n
)-1)
. The scalar factors of the elementary reflectors which represent the orthogonal/unitary matrix
Q
.
tauq
is tied to the distributed matrix
A
.
taup
(local).
Array of size
LOCr
(
ia
+min(
m
,
n
)-1)
. The scalar factors of the elementary reflectors which represent the orthogonal/unitary matrix
P
.
taup
is tied to the distributed matrix
A
.
work
On exit,
work

returns the minimal and optimal
lwork
.
info
(local)
If
info
= 0
, the execution is successful.
if
info
< 0
: If the
i
-th argument is an array and the
j
-th entry
, indexed
j
-1,
info
= - (
i
*100+
j
), if the
i
-th argument is a scalar and had an illegal value, then
info
= -
i
.
Application Notes
The matrices
Q
and
P
are represented as products of elementary reflectors:
If
m
n
,
Q
=
H
(1)*
H
(2)*...*
H
(
n
), and
P
=
G
(1)*
G
(2)*...*
G
(
n
-1)
Each
H
(i) and
G
(i) has the form:
H
(i) =
I
-
tauq
*
v
*
v'
, and
G
(i) =
I
-
taup
*
u
*
u'
,
where
tauq
and
taup
are real/complex scalars, and
v
and
u
are real/complex vectors.
v
(1:
i
-1) = 0
,
v(i)
= 1
, and
v
(
i
+
i
:
m
)
is stored on exit in
A
(
ia
+
i-ia
+
m
-1,
ja
+
i
-1)
;
u
(1:
i
) = 0,
u
(
i
+1) = 1
, and
u
(
i
+2:
n
)
is stored on exit in
A
(
ia
+
i
-1
,
ja
+
i
+1:
ja
+
n
-1)
;
tauq
is stored in
tauq
[
ja
+
i
-2]
and
taup
in
taup
[
ia
+
i
-2]
.
If
m
<
n
,
v
(1:
i
) = 0
,
v
(
i
+1) = 1
, and
v
(
i
+2:
m
)
is stored on exit in
A
(
ia
+
i
+1:
ia
+
m
-1,
ja
+
i
-1);
u
(1:
i
-1) = 0
,
u(i)
= 1
, and
u
(
i
+1 :
n
)
is stored on exit in
A
(
ia
+
i
-1,
ja
+
i
:
ja
+
n
-1)
;
tauq
is stored in
tauq
[
ja
+
i
-2]
and
taup
in
taup
[
ia
+
i
-2]
.
The contents of sub(
A
) on exit are illustrated by the following examples: where
d
and
e
denote diagonal and off-diagonal elements of
B
,
vi
denotes an element of the vector defining
H
(
i
)
, and
ui
an element of the vector defining
G
(
i
)
.

#### Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804