1SORMHR(1) LAPACK routine (version 3.1) SORMHR(1)
2
3
4
6 SORMHR - the general real M-by-N matrix C with SIDE = 'L' SIDE = 'R'
7 TRANS = 'N'
8
10 SUBROUTINE SORMHR( SIDE, TRANS, M, N, ILO, IHI, A, LDA, TAU, C, LDC,
11 WORK, LWORK, INFO )
12
13 CHARACTER SIDE, TRANS
14
15 INTEGER IHI, ILO, INFO, LDA, LDC, LWORK, M, N
16
17 REAL A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
18
20 SORMHR overwrites the general real M-by-N matrix C with TRANS = 'T':
21 Q**T * C C * Q**T
22
23 where Q is a real orthogonal matrix of order nq, with nq = m if SIDE =
24 'L' and nq = n if SIDE = 'R'. Q is defined as the product of IHI-ILO
25 elementary reflectors, as returned by SGEHRD:
26
27 Q = H(ilo) H(ilo+1) . . . H(ihi-1).
28
29
31 SIDE (input) CHARACTER*1
32 = 'L': apply Q or Q**T from the Left;
33 = 'R': apply Q or Q**T from the Right.
34
35 TRANS (input) CHARACTER*1
36 = 'N': No transpose, apply Q;
37 = 'T': Transpose, apply Q**T.
38
39 M (input) INTEGER
40 The number of rows of the matrix C. M >= 0.
41
42 N (input) INTEGER
43 The number of columns of the matrix C. N >= 0.
44
45 ILO (input) INTEGER
46 IHI (input) INTEGER ILO and IHI must have the same values
47 as in the previous call of SGEHRD. Q is equal to the unit
48 matrix except in the submatrix Q(ilo+1:ihi,ilo+1:ihi). If SIDE
49 = 'L', then 1 <= ILO <= IHI <= M, if M > 0, and ILO = 1 and IHI
50 = 0, if M = 0; if SIDE = 'R', then 1 <= ILO <= IHI <= N, if N >
51 0, and ILO = 1 and IHI = 0, if N = 0.
52
53 A (input) REAL array, dimension
54 (LDA,M) if SIDE = 'L' (LDA,N) if SIDE = 'R' The vectors which
55 define the elementary reflectors, as returned by SGEHRD.
56
57 LDA (input) INTEGER
58 The leading dimension of the array A. LDA >= max(1,M) if SIDE
59 = 'L'; LDA >= max(1,N) if SIDE = 'R'.
60
61 TAU (input) REAL array, dimension
62 (M-1) if SIDE = 'L' (N-1) if SIDE = 'R' TAU(i) must contain the
63 scalar factor of the elementary reflector H(i), as returned by
64 SGEHRD.
65
66 C (input/output) REAL array, dimension (LDC,N)
67 On entry, the M-by-N matrix C. On exit, C is overwritten by
68 Q*C or Q**T*C or C*Q**T or C*Q.
69
70 LDC (input) INTEGER
71 The leading dimension of the array C. LDC >= max(1,M).
72
73 WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
74 On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
75
76 LWORK (input) INTEGER
77 The dimension of the array WORK. If SIDE = 'L', LWORK >=
78 max(1,N); if SIDE = 'R', LWORK >= max(1,M). For optimum per‐
79 formance LWORK >= N*NB if SIDE = 'L', and LWORK >= M*NB if SIDE
80 = 'R', where NB is the optimal blocksize.
81
82 If LWORK = -1, then a workspace query is assumed; the routine
83 only calculates the optimal size of the WORK array, returns
84 this value as the first entry of the WORK array, and no error
85 message related to LWORK is issued by XERBLA.
86
87 INFO (output) INTEGER
88 = 0: successful exit
89 < 0: if INFO = -i, the i-th argument had an illegal value
90
91
92
93 LAPACK routine (version 3.1) November 2006 SORMHR(1)