?gehrd
?gehrd
Reduces a general matrix to upper Hessenberg form.
Syntax
lapack_int
LAPACKE_sgehrd
(
int
matrix_layout
,
lapack_int
n
,
lapack_int
ilo
,
lapack_int
ihi
,
float
*
a
,
lapack_int
lda
,
float
*
tau
);
lapack_int
LAPACKE_dgehrd
(
int
matrix_layout
,
lapack_int
n
,
lapack_int
ilo
,
lapack_int
ihi
,
double
*
a
,
lapack_int
lda
,
double
*
tau
);
lapack_int
LAPACKE_cgehrd
(
int
matrix_layout
,
lapack_int
n
,
lapack_int
ilo
,
lapack_int
ihi
,
lapack_complex_float
*
a
,
lapack_int
lda
,
lapack_complex_float
*
tau
);
lapack_int
LAPACKE_zgehrd
(
int
matrix_layout
,
lapack_int
n
,
lapack_int
ilo
,
lapack_int
ihi
,
lapack_complex_double
*
a
,
lapack_int
lda
,
lapack_complex_double
*
tau
);
Include Files
- mkl.h
Description
The routine reduces a general matrix . Here
A
to upper Hessenberg form H
by an orthogonal or unitary similarity transformation A
= Q*H*Q
H
H
has real subdiagonal elements.The routine does not form the matrix
Q
explicitly. Instead, Q
is represented as a product of elementary reflectors. Routines are provided to work with Q
in this representation.Input Parameters
- matrix_layout
- Specifies whether matrix storage layout is row major (LAPACK_ROW_MAJOR) or column major (LAPACK_COL_MAJOR).
- n
- The order of the matrixA().n≥0
- ilo,ihi
- IfAis an output by?gebal, theniloandihimust contain the values returned by that routine. Otherwiseandilo= 1. (Ifihi=n, thenn>01; if≤ilo≤ihi≤n,n= 0andilo= 1.)ihi= 0
- a
- Arrays:a(size max(1,contains the matrixlda*n))A.
- lda
- The leading dimension ofa; at least max(1,n).
Output Parameters
- a
- The elements on and above the subdiagonal contain the upper Hessenberg matrixH. The subdiagonal elements ofHare real. The elements below the subdiagonal, with the arraytau, represent the orthogonal matrixQas a product ofnelementary reflectors.
- tau
- Array, size at least max (1,n-1).Contains scalars that define elementary reflectors for the matrixQ.
Return Values
This function returns a value
info
.If , the execution is successful.
info
=0If , the
info
= -i
i
-th parameter had an illegal value.Application Notes
The computed Hessenberg matrix , where
H
is exactly similar to a nearby matrix A
+ E
||
is a modestly increasing function of E
||2
< c
(n
)ε
||A
||2
, c
(n
)n
, and ε
is the machine precision.The approximate number of floating-point operations for real flavors is
(2/3)*(
; for complex flavors it is 4 times greater.ihi
- ilo
)2
(2ihi
+ 2ilo
+ 3n
)