1 SUBROUTINE pclauu2( UPLO, N, A, IA, JA, DESCA )
122 INTEGER BLOCK_CYCLIC_2D, CSRC_, CTXT_, DLEN_, DTYPE_,
123 $ LLD_, MB_, M_, NB_, N_, RSRC_
124 parameter( block_cyclic_2d = 1, dlen_ = 9, dtype_ = 1,
125 $ ctxt_ = 2, m_ = 3, n_ = 4, mb_ = 5, nb_ = 6,
126 $ rsrc_ = 7, csrc_ = 8, lld_ = 9 )
128 parameter( one = ( 1.0e+0, 0.0e+0 ) )
131 INTEGER IACOL, IAROW, ICURR, IDIAG, IIA, IOFFA, JJA,
132 $ LDA, MYCOL, MYROW, NA, NPCOL, NPROW
136 EXTERNAL blacs_gridinfo, cgemv, clacgv,
142 EXTERNAL cdotc, lsame
145 INTRINSIC cmplx, real
156 CALL blacs_gridinfo( desca( ctxt_ ), nprow, npcol, myrow, mycol )
157 CALL infog2l( ia, ja, desca, nprow, npcol, myrow, mycol, iia, jja,
160 IF( myrow.EQ.iarow .AND. mycol.EQ.iacol )
THEN
163 idiag = iia + ( jja - 1 ) * lda
166 IF( lsame( uplo,
'U' ) )
THEN
170 DO 10 na = n-1, 1, -1
173 a( idiag ) = aii*aii + real( cdotc( na, a( icurr ), lda,
174 $ a( icurr ), lda ) )
175 CALL clacgv( na, a( icurr ), lda )
176 CALL cgemv(
'No transpose', n-na-1, na, one,
177 $ a( ioffa+lda ), lda, a( icurr ), lda,
178 $
cmplx( aii ), a( ioffa ), 1 )
179 CALL clacgv( na, a( icurr ), lda )
180 idiag = idiag + lda + 1
184 CALL csscal( n, aii, a( ioffa ), 1 )
193 a(idiag) = aii*aii + real( cdotc( n-na, a( icurr ), 1,
195 CALL clacgv( na-1, a( ioffa ), lda )
196 CALL cgemv(
'Conjugate transpose', n-na, na-1, one,
197 $ a( ioffa+1 ), lda, a( icurr ), 1,
198 $
cmplx( aii ), a( ioffa ), lda )
199 CALL clacgv( na-1, a( ioffa ), lda )
200 idiag = idiag + lda + 1
204 CALL csscal( n, aii, a( ioffa ), lda )