p?labrd
p?labrd
Reduces the first
nb
rows and columns of a general rectangular matrix A to real bidiagonal form by an orthogonal/unitary transformation, and returns auxiliary matrices that are needed to apply the transformation to the unreduced part of A.Syntax
void
pslabrd
(
MKL_INT
*m
,
MKL_INT
*n
,
MKL_INT
*nb
,
float
*a
,
MKL_INT
*ia
,
MKL_INT
*ja
,
MKL_INT
*desca
,
float
*d
,
float
*e
,
float
*tauq
,
float
*taup
,
float
*x
,
MKL_INT
*ix
,
MKL_INT
*jx
,
MKL_INT
*descx
,
float
*y
,
MKL_INT
*iy
,
MKL_INT
*jy
,
MKL_INT
*descy
,
float
*work
);
void
pdlabrd
(
MKL_INT
*m
,
MKL_INT
*n
,
MKL_INT
*nb
,
double
*a
,
MKL_INT
*ia
,
MKL_INT
*ja
,
MKL_INT
*desca
,
double
*d
,
double
*e
,
double
*tauq
,
double
*taup
,
double
*x
,
MKL_INT
*ix
,
MKL_INT
*jx
,
MKL_INT
*descx
,
double
*y
,
MKL_INT
*iy
,
MKL_INT
*jy
,
MKL_INT
*descy
,
double
*work
);
void
pclabrd
(
MKL_INT
*m
,
MKL_INT
*n
,
MKL_INT
*nb
,
MKL_Complex8
*a
,
MKL_INT
*ia
,
MKL_INT
*ja
,
MKL_INT
*desca
,
float
*d
,
float
*e
,
MKL_Complex8
*tauq
,
MKL_Complex8
*taup
,
MKL_Complex8
*x
,
MKL_INT
*ix
,
MKL_INT
*jx
,
MKL_INT
*descx
,
MKL_Complex8
*y
,
MKL_INT
*iy
,
MKL_INT
*jy
,
MKL_INT
*descy
,
MKL_Complex8
*work
);
void
pzlabrd
(
MKL_INT
*m
,
MKL_INT
*n
,
MKL_INT
*nb
,
MKL_Complex16
*a
,
MKL_INT
*ia
,
MKL_INT
*ja
,
MKL_INT
*desca
,
double
*d
,
double
*e
,
MKL_Complex16
*tauq
,
MKL_Complex16
*taup
,
MKL_Complex16
*x
,
MKL_INT
*ix
,
MKL_INT
*jx
,
MKL_INT
*descx
,
MKL_Complex16
*y
,
MKL_INT
*iy
,
MKL_INT
*jy
,
MKL_INT
*descy
,
MKL_Complex16
*work
);
Include Files
- mkl_scalapack.h
Description
The to upper or lower bidiagonal form by an orthogonal/unitary transformation
p?labrd
function
reduces the first nb
rows and columns of a real/complex general m
-by-n
distributed matrix sub(A
) = A
(
, ia
:ia
+m
-1ja
:ja
+n
-1)Q'* A * P
, and returns the matrices X
and Y
necessary to apply the transformation to the unreduced part of sub(A
).If , ,
m
≥
n
sub(
is reduced to upper bidiagonal form; if A
)m
< n
sub(
is reduced to lower bidiagonal form.A
)This is an auxiliary
function
called by p?gebrd
.Input Parameters
- m
- (global) The number of rows in the distributed matrixsub(.A)(.m≥0)
- n
- (global) The number of columns in the distributed matrix sub(A).(.n≥0)
- nb
- (global)The number of leading rows and columns of sub(A) to be reduced.
- a
- (local).Pointer into the local memory to an array of size.*lld_aLOC(cja+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 matrixAindicating the first row and the first column of the matrix sub(A), respectively.
- desca
- (global and local) array of sizedlen_. The array descriptor for the distributed matrixA.
- ix,jx
- (global) The row and column indices in the global matrixXindicating the first row and the first column of the matrix sub(X), respectively.
- descx
- (global and local) array of sizedlen_. The array descriptor for the distributed matrixX.
- iy,jy
- (global) The row and column indices in the global matrixYindicating the first row and the first column of the matrix sub(Y), respectively.
- descy
- (global and local) array of sizedlen_. The array descriptor for the distributed matrixY.
- work
- (local).Workspace array of sizelwork.,lwork≥nb_a+nqwithnq=numroc(n+mod(ia-1,nb_y),nb_y,mycol,iacol,npcol)iacol=indxg2p(ja,nb_a,mycol,csrc_a,npcol)indxg2pandnumrocare ScaLAPACK tool functions;myrow,mycol,nprow, andnpcolcan be determined by calling thefunctionblacs_gridinfo.
Output Parameters
- a
- (local)On exit, the firstnbrows and columns of the matrix are overwritten; the rest of the distributed matrixsub(is unchanged.A)If, elements on and below the diagonal in the firstm≥nnbcolumns, with the arraytauq, represent the orthogonal/unitary matrixQas a product of elementary reflectors; and elements above the diagonal in the firstnbrows, with the arraytaup, represent the orthogonal/unitary matrixPas a product of elementary reflectors.If, elements below the diagonal in the firstm<nnbcolumns, with the arraytauq, represent the orthogonal/unitary matrixQas a product of elementary reflectors, and elements on and above the diagonal in the firstnbrows, with the arraytaup, represent the orthogonal/unitary matrixPas a product of elementary reflectors.SeeApplication Notesbelow.
- d
- (local).Array of sizeifLOCr(ia+min(m,n)-1);m≥notherwise. The distributed diagonal elements of the bidiagonal distributed matrixLOCc(ja+min(m,n)-1)B:d[i] =A(ia+i,ja+i),i= 0, 1, ..., size (d)-1dis tied to the distributed matrixA.
- e
- (local).Array of sizeifLOCr(ia+min(m,n)-1);m≥notherwise. The distributed off-diagonal elements of the bidiagonal distributed matrixLOCc(ja+min(m,n)-2)B:if,m≥n;e[i] =A(ia+i,ja+i+1) fori= 0, 1, ...,n-2if,m<n.e[i] =A(ia+i+1,ja+i) fori= 0, 1, ...,m-2eis tied to the distributed matrixA.
- tauq,taup
- (local).Array sizeLOCc(ja+min(m,n)-1) fortauq, sizeLOCr(ia+min(m,n)-1) fortaup. The scalar factors of the elementary reflectors which represent the orthogonal/unitary matrixQfortauq,Pfortaup.tauqandtaupare tied to the distributed matrixA.SeeApplication Notesbelow.
- x
- (local)Pointer into the local memory to an array of sizelld_x*nb. On exit, the local pieces of the distributedm-by-nbmatrixX(,ix:ix+m-1required to update the unreduced part of sub(jx:jx+nb-1)A).
- y
- (local).Pointer into the local memory to an array of sizelld_y*nb. On exit, the local pieces of the distributedn-by-nbmatrixY(,iy:iy+n-1required to update the unreduced part of sub(jy:jy+nb-1)A).
Application Notes
The matrices
Q
and P
are represented as products of elementary reflectors:Q
= H
(1)*H
(2)*...*H
(nb
)P
= G
(1)*G
(2)*...*G
(nb
)Each and has the form:
H
(i)G
(i)H
(i) = I
- tauq
*v
*v'
G
(i) = I
- taup
*u
*u'
where
tauq
and taup
are real/complex scalars, and v
and u
are real/complex vectors. If , , and is stored on exit in
m
≥
n
v
(1: i
-1 ) = 0, v
(i
) = 1v
(i
:m
)A
(ia
+i
-1:ia
+m
-1, ja
+i
-1)u
(1:i
) = 0, u
(i
+1 ) = 1u
(i
+1:n
)A
(ia
+i
-1, ja
+i
:ja
+n
-1)tauq
is stored in tauq
[
ja
+i
-2]taup
in taup
[
ia
+i
-2]If , , , and is stored on exit in
m
< n
v
(1: i
) = 0v
(i
+1 ) = 1v
(i+
1:m
)A
(ia
+i+
1:ia
+m
-1, ja
+i
-1)u
(1:i
-1 ) = 0u
(i
) = 1u
(i
:n
)A
(ia
+i
-1ja
+i
:ja
+n
-1)tauq
is stored in tauq
[
ja
+i
-2]taup
in taup
[
ia
+i
-2]v
and u
together form the m
-by-nb
matrix V
and the nb
-by-n
matrix U'
which are necessary, with X
and Y
, to apply the transformation to the unreduced part of the matrix, using a block update of the form: sub(
. A
):= sub(A
) - V*Y'
- X*U'
The contents of :
sub(
on exit are illustrated by the following examples with A
)nb
= 2
where , and .
a
denotes an element of the original matrix which is unchanged, vi
denotes an element of the vector defining H
(i
)ui
an element of the vector defining G
(i
)