Developer Reference for Intel® oneAPI Math Kernel Library for C
?unmhr
Multiplies an arbitrary complex matrix C by the complex unitary matrix Q determined by ?gehrd .
Syntax
lapack_intLAPACKE_cunmhr ( intmatrix_layout , charside , chartrans , lapack_intm , lapack_intn , lapack_intilo , lapack_intihi , constlapack_complex_float*a , lapack_intlda , constlapack_complex_float*tau , lapack_complex_float*c , lapack_intldc );
lapack_intLAPACKE_zunmhr ( intmatrix_layout , charside , chartrans , lapack_intm , lapack_intn , lapack_intilo , lapack_intihi , constlapack_complex_double*a , lapack_intlda , constlapack_complex_double*tau , lapack_complex_double*c , lapack_intldc );
Include Files
mkl.h
Description
cunmhr zunmhr unmhr
The routine multiplies a matrix C by the unitary matrix Q that has been determined by a preceding call to cgehrd / zgehrd . (The routine ?gehrd reduces a real general matrix A to upper Hessenberg form H by an orthogonal similarity transformation, A = Q*H*Q^{H} , and represents the matrix Q as a product of ihi - ilo elementary reflectors . Here ilo and ihi are values determined by cgebal / zgebal when balancing the matrix; if the matrix has not been balanced, ilo = 1 and ihi = n .)
With ?unmhr , you can form one of the matrix products Q*C , Q:code:`H`*C , C*Q , or C*Q:code:`H` , overwriting the result on C (which may be any complex rectangular matrix). A common application of this routine is to transform a matrix V of eigenvectors of H to the matrix QV of eigenvectors of A .
Input Parameters
- matrix_layout
-
Specifies whether matrix storage layout is row major ( LAPACK_ROW_MAJOR ) or column major ( LAPACK_COL_MAJOR ).
side
Must be ‘L’ or ‘R’ .
If side = 'L' , then the routine forms Q*C or Q:code:`H`*C . If side = 'R' , then the routine forms C*Q or C*Q:code:`H` .
trans
Must be ‘N’ or ‘C’ .
If trans = 'N' , then Q is applied to C . If trans = 'T' , then Q:code:`H` is applied to C .
m
The number of rows in C ( m≥ 0 ).
n
The number of columns in C ( n≥ 0 ).
ilo , ihi
These must be the same parameters ilo and ihi , respectively, as supplied to ?gehrd .
If m > 0 and side = 'L' , then 1 ≤ilo≤ihi≤m . If m = 0 and side = 'L' , then ilo = 1 and ihi = 0 . If n > 0 and side = 'R' , then 1 ≤ilo≤ihi≤n . If n = 0 and side = 'R' , then ilo =1 and ihi = 0 .
- a , tau , c , work
-
COMPLEX for cunmhr DOUBLE COMPLEX for zunmhr . Arrays:
a (size max(1, lda * n ) for side =’R’ and size max(1, lda * m ) for side =’L’) contains details of the vectors which define the elementary reflectors, as returned by ?gehrd .
The second dimension of a must be at least max(1, m ) if side = 'L' and at least max(1, n ) if side = 'R' .
tau contains further details of the elementary reflectors, as returned by ?gehrd .
The dimension of tau must be at least max (1, m -1) if side = 'L' and at least max (1, n -1) if side = 'R' .
c (size max(1, ldc * n ) for column major layout and max(1, ldc * m for row major layout) contains the m -by- n matrix C .
The second dimension of c must be at least max(1, n ). work is a workspace array, its dimension max(1, lwork) .
lda
The leading dimension of a ; at least max(1, m ) if side = 'L' and at least max (1, n ) if side = 'R' .
ldc
The leading dimension of c ; at least max(1, m ) for column major layout and at least max(1, n ) for row major layout .
lwork
The size of the work array.
If side = 'L' , lwork≥ max(1,n) . If side = 'R' , lwork≥ max(1,m) . If lwork = -1 , then a workspace query is assumed; the routine only calculates the optimal size of the work array, returns this value as the first entry of the work array, and no error message related to lwork is issued by xerbla . See Application Notes for the suggested value of lwork .
Output Parameters
- c
-
C is overwritten by Q*C , or Q:code:`H` * C, or C*Q:code:`H` , or C*Q as specified by side and trans .
- work(1)
-
If info = 0 , on exit work(1) contains the minimum value of lwork required for optimum performance. Use this lwork for subsequent runs.
Return Values
This function returns a value info .
If info=0 , the execution is successful.
If info = -i , the i -th parameter had an illegal value.
LAPACK 95 Interface Notes
There exist FORTRAN 77 and FORTRAN 95 interfaces for this routine. See the Intel® oneMKL Fortran Developer Reference for details.
Application Notes
The computed matrix \(Q\) differs from the exact result by a matrix \(E\) such that \(||E||_{2} = O(\varepsilon) ||C||_{2}\) , where \(\varepsilon\) is the machine precision.
The approximate number of floating-point operations is
\(8n(ihi-ilo)^{2}\) if side = 'L' ;
\(8m(ihi-ilo)^{2}\) if side = 'R' .
The real counterpart of this routine is ormhr .