The function may be called by the names: f08lec, nag_lapackeig_dgbbrd or nag_dgbbrd.
3Description
f08lec reduces a real band matrix to upper bidiagonal form by an orthogonal transformation: . The orthogonal matrices and , of order and respectively, are determined as a product of Givens rotation matrices, and may be formed explicitly by the function if required. A matrix may also be updated to give .
The function uses a vectorizable form of the reduction.
4References
None.
5Arguments
1: – Nag_OrderTypeInput
On entry: the order argument specifies the two-dimensional storage scheme being used, i.e., row-major ordering or column-major ordering. C language defined storage is specified by . See Section 3.1.3 in the Introduction to the NAG Library CL Interface for a more detailed explanation of the use of this argument.
Constraint:
or .
2: – Nag_VectTypeInput
On entry: indicates whether the matrices and/or are generated.
Neither nor is generated.
is generated.
is generated.
Both and are generated.
Constraint:
, , or .
3: – IntegerInput
On entry: , the number of rows of the matrix .
Constraint:
.
4: – IntegerInput
On entry: , the number of columns of the matrix .
Constraint:
.
5: – IntegerInput
On entry: , the number of columns of the matrix .
Constraint:
.
6: – IntegerInput
On entry: the number of subdiagonals, , within the band of .
Constraint:
.
7: – IntegerInput
On entry: the number of superdiagonals, , within the band of .
Constraint:
.
8: – doubleInput/Output
Note: the dimension, dim, of the array ab
must be at least
when
;
when
.
On entry: the original band matrix .
This is stored as a notional two-dimensional array with row elements or column elements stored contiguously. The storage of elements , for row and column , depends on the order argument as follows:
if , is stored as ;
if , is stored as .
On exit: ab is overwritten by values generated during the reduction.
9: – IntegerInput
On entry: the stride separating row or column elements (depending on the value of order) of the matrix in the array
ab.
Constraint:
.
10: – doubleOutput
On exit: the diagonal elements of the bidiagonal matrix .
11: – doubleOutput
On exit: the superdiagonal elements of the bidiagonal matrix .
12: – doubleOutput
Note: the dimension, dim, of the array q
must be at least
On entry: the stride separating row or column elements (depending on the value of order) in the array q.
Constraints:
if or , ;
otherwise .
14: – doubleOutput
Note: the dimension, dim, of the array pt
must be at least
when
or ;
otherwise.
The th element of the matrix is stored in
when ;
when .
On exit: the orthogonal matrix , if or . If or , pt is not referenced.
15: – IntegerInput
On entry: the stride separating row or column elements (depending on the value of order) in the array pt.
Constraints:
if or , ;
otherwise .
16: – doubleInput/Output
Note: the dimension, dim, of the array c
must be at least
when
;
when
.
The th element of the matrix is stored in
when ;
when .
On entry: an matrix .
On exit: c is overwritten by . If , c is not referenced.
17: – IntegerInput
On entry: the stride separating row or column elements (depending on the value of order) in the array c.
Constraints:
if ,
if , ;
if , ;
if , .
18: – NagError *Input/Output
The NAG error argument (see Section 7 in the Introduction to the NAG Library CL Interface).
6Error Indicators and Warnings
NE_ALLOC_FAIL
Dynamic memory allocation failed.
See Section 3.1.2 in the Introduction to the NAG Library CL Interface for further information.
NE_BAD_PARAM
On entry, argument had an illegal value.
NE_ENUM_INT_2
On entry, , and .
Constraint: if or , ;
otherwise .
On entry, , and .
Constraint: if or , ;
otherwise .
NE_INT
On entry, .
Constraint: .
On entry, .
Constraint: .
On entry, .
Constraint: .
On entry, .
Constraint: .
On entry, .
Constraint: .
On entry, . Constraint: .
On entry, . Constraint: .
On entry, . Constraint: .
On entry, . Constraint: .
NE_INT_2
On entry, and .
Constraint: .
NE_INT_3
On entry, , and .
Constraint: if , ;
if , .
On entry, , and .
Constraint: .
NE_INTERNAL_ERROR
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact NAG for assistance.
See Section 7.5 in the Introduction to the NAG Library CL Interface for further information.
NE_NO_LICENCE
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library CL Interface for further information.
7Accuracy
The computed bidiagonal form satisfies , where
is a modestly increasing function of , and is the machine precision.
The elements of themselves may be sensitive to small perturbations in or to rounding errors in the computation, but this does not affect the stability of the singular values and vectors.
The computed matrix differs from an exactly orthogonal matrix by a matrix such that
A similar statement holds for the computed matrix .
8Parallelism and Performance
Background information to multithreading can be found in the Multithreading documentation.
f08lec makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
Please consult the X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this function. Please also consult the Users' Note for your implementation for any additional implementation-specific information.
9Further Comments
The total number of real floating-point operations is approximately the sum of:
, if and , and
, if is updated, and
, if either or is generated (double this if both),
where , assuming . For this section we assume that .