1 SUBROUTINE pclarzt( DIRECT, STOREV, N, K, V, IV, JV, DESCV, TAU,
10 CHARACTER DIRECT, STOREV
15 COMPLEX 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, 0.0e+0 ) )
195 INTEGER ICOFF, ICTXT, II, IIV, INFO, IVCOL, IVROW,
196 $ itmp0, itmp1, iw, jjv, ldv, mycol, myrow,
200 EXTERNAL blacs_abort, blacs_gridinfo, ccopy, cgemv,
201 $ cgsum2d, clacgv, claset, ctrmv,
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,
'PCLARZT', -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 clacgv( nq, v( ii+(jjv-1)*ldv ), ldv )
253 CALL cgemv(
'No transpose', itmp0, nq, -tau( ii ),
254 $ v( ii+1+(jjv-1)*ldv ), ldv,
255 $ v( ii+(jjv-1)*ldv ), ldv, zero, work( iw ),
257 CALL clacgv( nq, v( ii+(jjv-1)*ldv ), ldv )
259 CALL claset(
'All', itmp0, 1, zero, zero, work( iw ),
266 CALL cgsum2d( ictxt,
'Rowwise',
' ', iw-1, 1, work, iw-1,
269 IF( mycol.EQ.ivcol )
THEN
273 itmp1 = k + 1 + (k-1) * descv( mb_ )
275 t( itmp1-1 ) = tau( iiv+k-1 )
277 DO 20 ii = iiv+k-2, iiv, -1
282 itmp1 = itmp1 - descv( mb_ ) - 1
283 CALL ccopy( itmp0, work( iw ), 1, t( itmp1 ), 1 )
286 CALL ctrmv(
'Lower',
'No transpose',
'Non-unit', itmp0,
287 $ t( itmp1+descv( mb_ ) ), descv( mb_ ),
289 t( itmp1-1 ) = tau( ii )