1SLAHR2(1) LAPACK auxiliary routine (version 3.2) SLAHR2(1)
2
3
4
6 SLAHR2 - reduces the first NB columns of A real general n-BY-(n-k+1)
7 matrix A so that elements below the k-th subdiagonal are zero
8
10 SUBROUTINE SLAHR2( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY )
11
12 INTEGER K, LDA, LDT, LDY, N, NB
13
14 REAL A( LDA, * ), T( LDT, NB ), TAU( NB ), Y( LDY, NB )
15
17 SLAHR2 reduces the first NB columns of A real general n-BY-(n-k+1)
18 matrix A so that elements below the k-th subdiagonal are zero. The
19 reduction is performed by an orthogonal similarity transformation Q' *
20 A * Q. The routine returns the matrices V and T which determine Q as a
21 block reflector I - V*T*V', and also the matrix Y = A * V * T. This is
22 an auxiliary routine called by SGEHRD.
23
25 N (input) INTEGER
26 The order of the matrix A.
27
28 K (input) INTEGER
29 The offset for the reduction. Elements below the k-th subdiago‐
30 nal in the first NB columns are reduced to zero. K < N.
31
32 NB (input) INTEGER
33 The number of columns to be reduced.
34
35 A (input/output) REAL array, dimension (LDA,N-K+1)
36 On entry, the n-by-(n-k+1) general matrix A. On exit, the ele‐
37 ments on and above the k-th subdiagonal in the first NB columns
38 are overwritten with the corresponding elements of the reduced
39 matrix; the elements below the k-th subdiagonal, with the array
40 TAU, represent the matrix Q as a product of elementary reflec‐
41 tors. The other columns of A are unchanged. See Further
42 Details. LDA (input) INTEGER The leading dimension of the
43 array A. LDA >= max(1,N).
44
45 TAU (output) REAL array, dimension (NB)
46 The scalar factors of the elementary reflectors. See Further
47 Details.
48
49 T (output) REAL array, dimension (LDT,NB)
50 The upper triangular matrix T.
51
52 LDT (input) INTEGER
53 The leading dimension of the array T. LDT >= NB.
54
55 Y (output) REAL array, dimension (LDY,NB)
56 The n-by-nb matrix Y.
57
58 LDY (input) INTEGER
59 The leading dimension of the array Y. LDY >= N.
60
62 The matrix Q is represented as a product of nb elementary reflectors
63 Q = H(1) H(2) . . . H(nb).
64 Each H(i) has the form
65 H(i) = I - tau * v * v'
66 where tau is a real scalar, and v is a real vector with
67 v(1:i+k-1) = 0, v(i+k) = 1; v(i+k+1:n) is stored on exit in
68 A(i+k+1:n,i), and tau in TAU(i).
69 The elements of the vectors v together form the (n-k+1)-by-nb matrix V
70 which is needed, with T and Y, to apply the transformation to the unre‐
71 duced part of the matrix, using an update of the form: A := (I -
72 V*T*V') * (A - Y*V').
73 The contents of A on exit are illustrated by the following example with
74 n = 7, k = 3 and nb = 2:
75 ( a a a a a )
76 ( a a a a a )
77 ( a a a a a )
78 ( h h a a a )
79 ( v1 h a a a )
80 ( v1 v2 a a a )
81 ( v1 v2 a a a )
82 where a denotes an element of the original matrix A, h denotes a modi‐
83 fied element of the upper Hessenberg matrix H, and vi denotes an ele‐
84 ment of the vector defining H(i).
85 This file is a slight modification of LAPACK-3.0's SLAHRD incorporating
86 improvements proposed by Quintana-Orti and Van de Gejin. Note that the
87 entries of A(1:K,2:NB) differ from those returned by the original
88 LAPACK routine. This function is not backward compatible with
89 LAPACK3.0.
90
91
92
93 LAPACK auxiliary routine (versionNo3v.e2m)ber 2008 SLAHR2(1)