p?gebrd
p?gebrd
Reduces a general matrix to bidiagonal form.
Syntax
void
psgebrd
(
MKL_INT
*m
,
MKL_INT
*n
,
float
*a
,
MKL_INT
*ia
,
MKL_INT
*ja
,
MKL_INT
*desca
,
float
*d
,
float
*e
,
float
*tauq
,
float
*taup
,
float
*work
,
MKL_INT
*lwork
,
MKL_INT
*info
);
void
pdgebrd
(
MKL_INT
*m
,
MKL_INT
*n
,
double
*a
,
MKL_INT
*ia
,
MKL_INT
*ja
,
MKL_INT
*desca
,
double
*d
,
double
*e
,
double
*tauq
,
double
*taup
,
double
*work
,
MKL_INT
*lwork
,
MKL_INT
*info
);
void
pcgebrd
(
MKL_INT
*m
,
MKL_INT
*n
,
MKL_Complex8
*a
,
MKL_INT
*ia
,
MKL_INT
*ja
,
MKL_INT
*desca
,
float
*d
,
float
*e
,
MKL_Complex8
*tauq
,
MKL_Complex8
*taup
,
MKL_Complex8
*work
,
MKL_INT
*lwork
,
MKL_INT
*info
);
void
pzgebrd
(
MKL_INT
*m
,
MKL_INT
*n
,
MKL_Complex16
*a
,
MKL_INT
*ia
,
MKL_INT
*ja
,
MKL_INT
*desca
,
double
*d
,
double
*e
,
MKL_Complex16
*tauq
,
MKL_Complex16
*taup
,
MKL_Complex16
*work
,
MKL_INT
*lwork
,
MKL_INT
*info
);
Include Files
- mkl_scalapack.h
Description
The
p?gebrd
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 upper bidiagonal; if m
< n
B
is lower bidiagonal. Input Parameters
- m
- (global) The number of rows in the distributed matrix sub(A)(.m≥0)
- n
- (global) The number of columns in the distributed matrix sub(A)(.n≥0)
- a
- (local)Real pointer into the local memory to an array of size. On entry, this array contains the distributed matrix sub (lld_a*LOCc(ja+n-1)A).
- ia,ja
- (global) The row and column indices in the global matrixAindicating the first row and the first column of the submatrixA, respectively.
- desca
- (global and local) array of sizedlen_. The array descriptor for the distributed matrixA.
- work
- (local)Workspace array of sizelwork.
- lwork
- (local or global) size ofwork, must be at least:lwork≥nb*(mpa0 +nqa0+1)+nqa0where,nb=mb_a=nb_a,iroffa=mod(ia-1,nb),icoffa=mod(ja-1,nb),iarow=indxg2p(ia,nb,MYROW,rsrc_a,NPROW),iacol=indxg2p(ja,nb,MYCOL,csrc_a,NPCOL),mpa0 =numroc(m+iroffa,nb,MYROW, iarow,NPROW),nqa0 =numroc(n+icoffa,nb,MYCOL,iacol,NPCOL)mod(is the integer remainder ofx,y).x/yindxg2pandnumrocare ScaLAPACK tool functions;MYROW,MYCOL,NPROWandNPCOLcan be determined by calling thefunctionblacs_gridinfo.If, thenlwork= -1lworkis global input and a workspace query is assumed; thefunctiononly 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
- On exit, if, the diagonal and the first superdiagonal of sub(m≥nA) are overwritten with the upper bidiagonal matrixB; the elements below the diagonal, with the arraytauq, represent the orthogonal/unitary matrixQas a product of elementary reflectors, and the elements above the first superdiagonal, with the arraytaup, represent the orthogonal matrixPas a product of elementary reflectors. If, the diagonal and the first subdiagonal are overwritten with the lower bidiagonal matrixm<nB; the elements below the first subdiagonal, with the arraytauq, represent the orthogonal/unitary matrixQas a product of elementary reflectors, and the elements above the diagonal, with the arraytaup, represent the orthogonal matrixPas a product of elementary reflectors.SeeApplication Notesbelow.
- d
- (local)Array of sizeifLOCc(ja+min(m,n)-1)andm≥notherwise. The distributed diagonal elements of the bidiagonal matrixLOCr(ia+min(m,n)-1)B:.d[i] =A(i+1,i+1), 0 ≤i< size (d)dis tied to the distributed matrixA.
- e
- (local)Array of sizeifLOCr(ia+min(m,n)-1)otherwise. The distributed off-diagonal elements of the bidiagonal distributed matrixm≥n;LOCc(ja+min(m,n)-2)B:Ifm≥n,fore[i] =A(i+1,i+2);i= 0,1,...,n-2ifm<n,fore[i] =A(i+2,i+1).i= 0,1,...,m-2eis tied to the distributed matrixA.
- tauq,taup
- (local)Arrays of sizeforLOCc(ja+min(m,n)-1)fortauqandLOCr(ia+min(m,n)-1)taup. Contain the scalar factors of the elementary reflectors that represent the orthogonal/unitary matricesQandP, respectively.tauqandtaupare tied to the distributed matrixA.SeeApplication Notesbelow.
- work[0]
- On exitcontains the minimum value ofwork[0]lworkrequired for optimum performance.
- info
- (global)= 0: the execution is successful.< 0: if thei-th argument is an array and thej-th entry, indexedhad an illegal value, thenj- 1,info= -(i*100+j); if thei-th argument is a scalar and had an illegal value, theninfo=-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
+1: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
[
and ja
+i
-2]taup
in taup
[
.ia
+i
-2]If
m
< n
,Q
= H
(1)*H
(2)*...*H
(m
-1), and P
= G
(1)* G
(2)*...* G
(m
) Each
H
(i
) and G
(i
) has the form:H
(i
)= i
-tauq
*v
*v'
and G
(i
)= i
-taup
*u
*u'
here
tauq
and taup
are real/complex scalars, and v
and u
are real/complex vectors; v
(1:i
) = 0, v
(i
+1) = 1, and v
(i
+2:m
) is stored on exit in A
(ia
+i
: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
+1:ja
+n
-1);tauq
is stored in tauq
[
and ja
+i
-2]taup
in taup
[
. ia
+i
-2]The contents of sub(
A
) on exit are illustrated by the following examples:m
= 6n
= 5(
:m
> n
)
m
= 5n
= 6(
: m
< n
)
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
).