1 SUBROUTINE pslassq( N, X, IX, JX, DESCX, INCX, SCALE, SUMSQ )
9 INTEGER IX, INCX, JX, N
137 INTEGER BLOCK_CYCLIC_2D, CSRC_, CTXT_, DLEN_, DTYPE_,
138 $ LLD_, MB_, M_, NB_, N_, RSRC_
139 parameter( block_cyclic_2d = 1, dlen_ = 9, dtype_ = 1,
140 $ ctxt_ = 2, m_ = 3, n_ = 4, mb_ = 5, nb_ = 6,
141 $ rsrc_ = 7, csrc_ = 8, lld_ = 9 )
143 parameter( zero = 0.0e+0 )
146 INTEGER I, ICOFF, ICTXT, IIX, IOFF, IROFF, IXCOL,
147 $ IXROW, JJX, LDX, MYCOL, MYROW, NP, NPCOL,
168 ictxt = descx( ctxt_ )
169 CALL blacs_gridinfo( ictxt, nprow, npcol, myrow, mycol )
173 CALL infog2l( ix, jx, descx, nprow, npcol, myrow, mycol, iix, jjx,
177 IF( incx.EQ.descx( m_ ) )
THEN
183 icoff = mod( jx, descx( nb_ ) )
184 nq = numroc( n+icoff, descx( nb_ ), mycol, ixcol, npcol )
191 ioff = iix + ( jjx - 1 ) * ldx
193 IF( x( ioff ).NE.zero )
THEN
194 temp1 = abs( x( ioff ) )
195 IF( scale.LT.temp1 )
THEN
196 sumsq = 1 + sumsq * ( scale / temp1 )**2
199 sumsq = sumsq + ( temp1 / scale )**2
211 CALL pstreecomb( ictxt,
'Rowwise', 2, work, -1, ixcol,
217 ELSE IF( incx.EQ.1 )
THEN
223 iroff = mod( ix, descx( mb_ ) )
224 np = numroc( n+iroff, descx( mb_ ), myrow, ixrow, nprow )
231 ioff = iix + ( jjx - 1 ) * ldx
233 IF( x( ioff ).NE.zero )
THEN
234 temp1 = abs( x( ioff ) )
235 IF( scale.LT.temp1 )
THEN
236 sumsq = 1 + sumsq*( scale / temp1 )**2
239 sumsq = sumsq + ( temp1 / scale )**2
251 CALL pstreecomb( ictxt,
'Columnwise', 2, work, -1, ixcol,