1SORM2R(1) LAPACK routine (version 3.2) SORM2R(1)
2
3
4
6 SORM2R - overwrites the general real m by n matrix C with Q * C if
7 SIDE = 'L' and TRANS = 'N', or Q'* C if SIDE = 'L' and TRANS = 'T',
8 or C * Q if SIDE = 'R' and TRANS = 'N', or C * Q' if SIDE = 'R' and
9 TRANS = 'T',
10
12 SUBROUTINE SORM2R( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK,
13 INFO )
14
15 CHARACTER SIDE, TRANS
16
17 INTEGER INFO, K, LDA, LDC, M, N
18
19 REAL A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
20
22 SORM2R overwrites the general real m by n matrix C with where Q is a
23 real orthogonal matrix defined as the product of k elementary reflec‐
24 tors
25 Q = H(1) H(2) . . . H(k)
26 as returned by SGEQRF. Q is of order m if SIDE = 'L' and of order n if
27 SIDE = 'R'.
28
30 SIDE (input) CHARACTER*1
31 = 'L': apply Q or Q' from the Left
32 = 'R': apply Q or Q' from the Right
33
34 TRANS (input) CHARACTER*1
35 = 'N': apply Q (No transpose)
36 = 'T': apply Q' (Transpose)
37
38 M (input) INTEGER
39 The number of rows of the matrix C. M >= 0.
40
41 N (input) INTEGER
42 The number of columns of the matrix C. N >= 0.
43
44 K (input) INTEGER
45 The number of elementary reflectors whose product defines the
46 matrix Q. If SIDE = 'L', M >= K >= 0; if SIDE = 'R', N >= K >=
47 0.
48
49 A (input) REAL array, dimension (LDA,K)
50 The i-th column must contain the vector which defines the ele‐
51 mentary reflector H(i), for i = 1,2,...,k, as returned by SGE‐
52 QRF in the first k columns of its array argument A. A is modi‐
53 fied by the routine but restored on exit.
54
55 LDA (input) INTEGER
56 The leading dimension of the array A. If SIDE = 'L', LDA >=
57 max(1,M); if SIDE = 'R', LDA >= max(1,N).
58
59 TAU (input) REAL array, dimension (K)
60 TAU(i) must contain the scalar factor of the elementary reflec‐
61 tor H(i), as returned by SGEQRF.
62
63 C (input/output) REAL array, dimension (LDC,N)
64 On entry, the m by n matrix C. On exit, C is overwritten by
65 Q*C or Q'*C or C*Q' or C*Q.
66
67 LDC (input) INTEGER
68 The leading dimension of the array C. LDC >= max(1,M).
69
70 WORK (workspace) REAL array, dimension
71 (N) if SIDE = 'L', (M) if SIDE = 'R'
72
73 INFO (output) INTEGER
74 = 0: successful exit
75 < 0: if INFO = -i, the i-th argument had an illegal value
76
77
78
79 LAPACK routine (version 3.2) November 2008 SORM2R(1)