1 SUBROUTINE pslarzt( DIRECT, STOREV, N, K, V, IV, JV, DESCV, TAU,
10 CHARACTER DIRECT, STOREV
15 REAL TAU( * ), T( * ), V( * ), WORK( * )
186 INTEGER BLOCK_CYCLIC_2D, CSRC_, CTXT_, DLEN_, DTYPE_,
187 $ lld_, mb_, m_, nb_, n_, rsrc_
188 parameter( block_cyclic_2d = 1, dlen_ = 9, dtype_ = 1,
189 $ ctxt_ = 2, m_ = 3, n_ = 4, mb_ = 5, nb_ = 6,
190 $ rsrc_ = 7, csrc_ = 8, lld_ = 9 )
192 parameter( zero = 0.0e+0 )
195 INTEGER ICOFF, ICTXT, II, IIV, INFO, IVCOL, IVROW,
196 $ itmp0, itmp1, iw, jjv, ldv, mycol, myrow,
201 $ scopy, sgemv, sgsum2d, slaset,
207 EXTERNAL lsame, numroc
216 ictxt = descv( ctxt_ )
217 CALL blacs_gridinfo( ictxt, nprow, npcol, myrow, mycol )
222 IF( .NOT.lsame( direct,
'B' ) )
THEN
224 ELSE IF( .NOT.lsame( storev,
'R' ) )
THEN
228 CALL pxerbla( ictxt,
'PSLARZT', -info )
229 CALL blacs_abort( ictxt, 1 )
233 CALL infog2l( iv, jv, descv, nprow, npcol, myrow, mycol,
234 $ iiv, jjv, ivrow, ivcol )
236 IF( myrow.EQ.ivrow )
THEN
240 icoff = mod( jv-1, descv( nb_ ) )
241 nq = numroc( n+icoff, descv( nb_ ), mycol, ivcol, npcol )
245 DO 10 ii = iiv+k-2, iiv, -1
252 CALL sgemv(
'No transpose', itmp0, nq, -tau( ii ),
253 $ v( ii+1+(jjv-1)*ldv ), ldv,
254 $ v( ii+(jjv-1)*ldv ), ldv, zero, work( iw ),
257 CALL slaset(
'All', itmp0, 1, zero, zero, work( iw ),
264 CALL sgsum2d( ictxt,
'Rowwise',
' ', iw-1, 1, work, iw-1,
267 IF( mycol.EQ.ivcol )
THEN
271 itmp1 = k + 1 + (k-1) * descv( mb_ )
273 t( itmp1-1 ) = tau( iiv+k-1 )
275 DO 20 ii = iiv+k-2, iiv, -1
280 itmp1 = itmp1 - descv( mb_ ) - 1
281 CALL scopy( itmp0, work( iw ), 1, t( itmp1 ), 1 )
284 CALL strmv(
'Lower',
'No transpose',
'Non-unit', itmp0,
285 $ t( itmp1+descv( mb_ ) ), descv( mb_ ),
287 t( itmp1-1 ) = tau( ii )