Visible to Intel only — GUID: GUID-4262608D-7DE4-49D7-A133-42312CA96728
Visible to Intel only — GUID: GUID-4262608D-7DE4-49D7-A133-42312CA96728
?larot
Applies a Givens rotation to two adjacent rows or columns.
Syntax
void slarot (lapack_logical *lrows, lapack_logical *ileft, lapack_logical *iright, lapack_int *nl, float *c, float *s, float *a, lapack_int *lda, float *xleft, float *xright);
void dlarot (lapack_logical *lrows, lapack_logical *ileft, lapack_logical *iright, lapack_int *nl, double *c, double *s, double *a, lapack_int *lda, double *xleft, double *xright);
void clarot (lapack_logical *lrows, lapack_logical *ileft, lapack_logical *iright, lapack_int *nl, lapack_complex *c, lapack_complex *s, lapack_complex *a, lapack_int *lda, lapack_complex *xleft, lapack_complex *xright);
void zlarot (lapack_logical *lrows, lapack_logical *ileft, lapack_logical *iright, lapack_int *nl, lapack_complex_double *c, lapack_complex_double *s, lapack_complex_double *a, lapack_int *lda, lapack_complex_double *xleft, lapack_complex_double *xright);
Include Files
- mkl.h
Description
The routine ?larot applies a Givens rotation to two adjacent rows or columns, where one element of the first or last column or row is stored in some format other than GE so that elements of the matrix may be used or modified for which no array element is provided.
One example is a symmetric matrix in SB format (bandwidth = 4), for which uplo = 'L'. Two adjacent rows will have the format:
row j : C > C > C > C > C > . . . . row j + 1 : C > C > C > C > C > . . . .
'*' indicates elements for which storage is provided.
'.' indicates elements for which no storage is provided, but are not necessarily zero; their values are determined by symmetry.
' ' indicates elements which are required to be zero, and have no storage provided.
Those columns which have two '*' entries can be handled by srot (for slarot and clarot), or by drot( for dlarot and zlarot).
Those columns which have no '*' entries can be ignored, since as long as the Givens rotations are carefully applied to preserve symmetry, their values are determined.
Those columns which have one '*' have to be handled separately, by using separate variables p and q :
row j : C > C > C > C > C > p. . . . row j + 1 : q C > C > C > C > C > . . . .
If element p is set correctly, ?larot rotates the column and sets p to its new value. The next call to ?larot rotates columns j and j +1, and restore symmetry. The element q is zero at the beginning, and non-zero after the rotation. Later, rotations would presumably be chosen to zero q out.
Typical Calling Sequences: rotating the i -th and (i +1)-st rows.
Input Parameters
- lrows
-
If lrows = 1, ?larot rotates two rows.
If lrows = 0, ?larot rotates two columns.
- lleft
-
If lleft = 1, xleft is used instead of the corresponding element of a for the first element in the second row (if lrows = 0) or column (if lrows=1).
If lleft = 0, the corresponding element of a is used.
- lright
-
If lleft = 1, xright is used instead of the corresponding element of a for the first element in the second row (if lrows = 0) or column (if lrows=1).
If lright = 0, the corresponding element of a is used.
- nl
-
The length of the rows (if lrows=1) or columns (if lrows=1) to be rotated.
If xleft or xright are used, the columns or rows they are in should be included in nl, e.g., if lleft = lright = 1, then nl must be at least 2.
The number of rows or columns to be rotated exclusive of those involving xleft and/or xright may not be negative, i.e., nl minus how many of lleft and lright are 1 must be at least zero; if not, xerbla is called.
- c, s
-
Specify the Givens rotation to be applied.
If lrows = 1, then the matrix
is applied from the left.
If lrows = 0, then the transpose thereof is applied from the right.
- a
-
The array containing the rows or columns to be rotated. The first element of a should be the upper left element to be rotated.
- lda
-
The "effective" leading dimension of a.
If a contains a matrix stored in GE or SY format, then this is just the leading dimension of A.
If a contains a matrix stored in band (GB or SB) format, then this should be one less than the leading dimension used in the calling routine. Thus, if a in ?larot is of size lda*n, then a[(j - 1)*lda] would be the j -th element in the first of the two rows to be rotated, and a[(j - 1)*lda + 1] would be the j -th in the second, regardless of how the array may be stored in the calling routine. a cannot be dimensioned, because for band format the row number may exceed lda, which is not legal FORTRAN.
If lrows = 1, then lda must be at least 1, otherwise it must be at least nl minus the number of 1 values in xleft and xright.
- xleft
-
If lrows = 1, xleft is used and modified instead of a[1] (if lrows = 1) or a[lda + 1] (if lrows = 0).
- xright
-
If lright = 1, xright is used and modified instead of a[(nl - 1)*lda] (if lrows = 1) or a[nl - 1] (if lrows = 0).
Output Parameters
- a
-
On exit, modified array A.