1 SUBROUTINE slaref( TYPE, A, LDA, WANTZ, Z, LDZ, BLOCK, IROW1,
2 $ ICOL1, ISTART, ISTOP, ITMP1, ITMP2, LILOZ,
3 $ LIHIZ, VECS, V2, V3, T1, T2, T3 )
14 INTEGER ICOL1, IROW1, ISTART, ISTOP, ITMP1, ITMP2, LDA,
16 REAL T1, T2, T3, V2, V3
19 REAL A( LDA, * ), VECS( * ), Z( LDZ, * )
114 REAL H11, H22, SUM, T12, T13, T22, T23, T32, T33,
115 $ v22, v23, v32, v33, a1, a2, a3, a4, a5, b1,
116 $ b2, b3, b4, b5, tmp1, tmp2, tmp3, sum1, sum2,
128 IF( lsame(
TYPE,
'R' ) ) then
130 DO 30 k = istart, istop - mod( istop-istart+1, 3 ), 3
131 v2 = vecs( ( k-1 )*3+1 )
132 v3 = vecs( ( k-1 )*3+2 )
133 t1 = vecs( ( k-1 )*3+3 )
134 v22 = vecs( ( k-1 )*3+4 )
135 v32 = vecs( ( k-1 )*3+5 )
136 t12 = vecs( ( k-1 )*3+6 )
137 v23 = vecs( ( k-1 )*3+7 )
138 v33 = vecs( ( k-1 )*3+8 )
139 t13 = vecs( ( k-1 )*3+9 )
146 DO 10 j = itmp1, itmp2-mod(itmp2-itmp1+1,2), 2
152 b1 = a( irow1 , j+1 )
153 b2 = a( irow1+1, j+1 )
154 b3 = a( irow1+2, j+1 )
155 b4 = a( irow1+3, j+1 )
156 b5 = a( irow1+4, j+1 )
157 sum1 = a1 + v2*a2 + v3*a3
158 a( irow1 , j ) = a1 - sum1 * t1
161 tmp1 = b1 + v2*b2 + v3*b3
162 a( irow1 , j+1 ) = b1 - tmp1 * t1
165 sum2 = h11 + v22*h22 + v32*a4
166 a( irow1+1, j ) = h11 - sum2 * t12
167 h11 = h22 - sum2 * t22
168 h22 = a4 - sum2 * t32
169 tmp2 = a11 + v22*a22 + v32*b4
170 a( irow1+1, j+1 ) = a11 - tmp2 * t12
171 a11 = a22 - tmp2 * t22
172 a22 = b4 - tmp2 * t32
173 sum3 = h11 + v23*h22 + v33*a5
174 a( irow1+2, j ) = h11 - sum3 * t13
175 a( irow1+3, j ) = h22 - sum3 * t23
176 a( irow1+4, j ) = a5 - sum3 * t33
177 tmp3 = a11 + v23*a22 + v33*b5
178 a( irow1+2, j+1 ) = a11 - tmp3 * t13
179 a( irow1+3, j+1 ) = a22 - tmp3 * t23
180 a( irow1+4, j+1 ) = b5 - tmp3 * t33
182 DO 20 j = itmp2-mod(itmp2-itmp1+1,2)+1, itmp2
183 sum = a( irow1, j ) + v2*a( irow1+1, j ) +
185 a( irow1, j ) = a( irow1, j ) - sum*t1
186 h11 = a( irow1+1, j ) - sum*t2
187 h22 = a( irow1+2, j ) - sum*t3
188 sum = h11 + v22*h22 + v32*a( irow1+3, j )
189 a( irow1+1, j ) = h11 - sum*t12
191 h22 = a( irow1+3, j ) - sum*t32
192 sum = h11 + v23*h22 + v33*a( irow1+4, j )
193 a( irow1+2, j ) = h11 - sum*t13
194 a( irow1+3, j ) = h22 - sum*t23
195 a( irow1+4, j ) = a( irow1+4, j ) - sum*t33
199 DO 50 k = istop - mod( istop-istart+1, 3 ) + 1, istop
200 v2 = vecs( ( k-1 )*3+1 )
201 v3 = vecs( ( k-1 )*3+2 )
202 t1 = vecs( ( k-1 )*3+3 )
205 DO 40 j = itmp1, itmp2
206 sum = a( irow1, j ) + v2*a( irow1+1, j ) +
208 a( irow1, j ) = a( irow1, j ) - sum*t1
209 a( irow1+1, j ) = a( irow1+1, j ) - sum*t2
210 a( irow1+2, j ) = a( irow1+2, j ) - sum*t3
215 DO 60 j = itmp1, itmp2
216 sum = a( irow1, j ) + v2*a( irow1+1, j ) +
218 a( irow1, j ) = a( irow1, j ) - sum*t1
219 a( irow1+1, j ) = a( irow1+1, j ) - sum*t2
220 a( irow1+2, j ) = a( irow1+2, j ) - sum*t3
228 DO 90 k = istart, istop - mod( istop-istart+1, 3 ), 3
229 v2 = vecs( ( k-1 )*3+1 )
230 v3 = vecs( ( k-1 )*3+2 )
231 t1 = vecs( ( k-1 )*3+3 )
232 v22 = vecs( ( k-1 )*3+4 )
233 v32 = vecs( ( k-1 )*3+5 )
234 t12 = vecs( ( k-1 )*3+6 )
235 v23 = vecs( ( k-1 )*3+7 )
236 v33 = vecs( ( k-1 )*3+8 )
237 t13 = vecs( ( k-1 )*3+9 )
244 DO 70 j = itmp1, itmp2
245 sum = a( j, icol1 ) + v2*a( j, icol1+1 ) +
247 a( j, icol1 ) = a( j, icol1 ) - sum*t1
248 h11 = a( j, icol1+1 ) - sum*t2
249 h22 = a( j, icol1+2 ) - sum*t3
250 sum = h11 + v22*h22 + v32*a( j, icol1+3 )
251 a( j, icol1+1 ) = h11 - sum*t12
253 h22 = a( j, icol1+3 ) - sum*t32
254 sum = h11 + v23*h22 + v33*a( j, icol1+4 )
255 a( j, icol1+2 ) = h11 - sum*t13
256 a( j, icol1+3 ) = h22 - sum*t23
257 a( j, icol1+4 ) = a( j, icol1+4 ) - sum*t33
260 DO 80 j = liloz, lihiz
261 sum = z( j, icol1 ) + v2*z( j, icol1+1 ) +
263 z( j, icol1 ) = z( j, icol1 ) - sum*t1
264 h11 = z( j, icol1+1 ) - sum*t2
265 h22 = z( j, icol1+2 ) - sum*t3
266 sum = h11 + v22*h22 + v32*z( j, icol1+3 )
267 z( j, icol1+1 ) = h11 - sum*t12
269 h22 = z( j, icol1+3 ) - sum*t32
270 sum = h11 + v23*h22 + v33*z( j, icol1+4 )
271 z( j, icol1+2 ) = h11 - sum*t13
272 z( j, icol1+3 ) = h22 - sum*t23
273 z( j, icol1+4 ) = z( j, icol1+4 ) - sum*t33
278 DO 120 k = istop - mod( istop-istart+1, 3 ) + 1, istop
279 v2 = vecs( ( k-1 )*3+1 )
280 v3 = vecs( ( k-1 )*3+2 )
281 t1 = vecs( ( k-1 )*3+3 )
284 DO 100 j = itmp1, itmp2
285 sum = a( j, icol1 ) + v2*a( j, icol1+1 ) +
287 a( j, icol1 ) = a( j, icol1 ) - sum*t1
288 a( j, icol1+1 ) = a( j, icol1+1 ) - sum*t2
289 a( j, icol1+2 ) = a( j, icol1+2 ) - sum*t3
292 DO 110 j = liloz, lihiz
293 sum = z( j, icol1 ) + v2*z( j, icol1+1 ) +
295 z( j, icol1 ) = z( j, icol1 ) - sum*t1
296 z( j, icol1+1 ) = z( j, icol1+1 ) - sum*t2
297 z( j, icol1+2 ) = z( j, icol1+2 ) - sum*t3
303 DO 130 j = itmp1, itmp2
304 sum = a( j, icol1 ) + v2*a( j, icol1+1 ) +
306 a( j, icol1 ) = a( j, icol1 ) - sum*t1
307 a( j, icol1+1 ) = a( j, icol1+1 ) - sum*t2
308 a( j, icol1+2 ) = a( j, icol1+2 ) - sum*t3