1 SUBROUTINE pslaswp( DIREC, ROWCOL, N, A, IA, JA, DESCA, K1, K2,
10 CHARACTER DIREC, ROWCOL
11 INTEGER IA, JA, K1, K2, N
14 INTEGER DESCA( * ), IPIV( * )
136 INTEGER BLOCK_CYCLIC_2D, CSRC_, CTXT_, DLEN_, DTYPE_,
137 $ lld_, mb_, m_, nb_, n_, rsrc_
138 parameter( block_cyclic_2d = 1, dlen_ = 9, dtype_ = 1,
139 $ ctxt_ = 2, m_ = 3, n_ = 4, mb_ = 5, nb_ = 6,
140 $ rsrc_ = 7, csrc_ = 8, lld_ = 9 )
143 INTEGER I, ICURCOL, ICURROW, IIA, IP, J, JJA, JP,
144 $ mycol, myrow, npcol, nprow
147 EXTERNAL blacs_gridinfo,
infog2l, psswap
160 CALL blacs_gridinfo( desca( ctxt_ ), nprow, npcol, myrow, mycol )
162 IF( lsame( rowcol,
'R' ) )
THEN
163 IF( lsame( direc,
'F' ) )
THEN
164 CALL infog2l( k1, ja, desca, nprow, npcol, myrow, mycol,
165 $ iia, jja, icurrow, icurcol )
167 ip = ipiv( iia+i-k1 )
169 $
CALL psswap( n, a, i, ja, desca, desca( m_ ), a, ip,
170 $ ja, desca, desca( m_ ) )
173 CALL infog2l( k2, ja, desca, nprow, npcol, myrow, mycol,
174 $ iia, jja, icurrow, icurcol )
176 ip = ipiv( iia+i-k1 )
178 $
CALL psswap( n, a, i, ja, desca, desca( m_ ), a, ip,
179 $ ja, desca, desca( m_ ) )
183 IF( lsame( direc,
'F' ) )
THEN
184 CALL infog2l( ia, k1, desca, nprow, npcol, myrow, mycol,
185 $ iia, jja, icurrow, icurcol )
187 jp = ipiv( jja+j-k1 )
189 $
CALL psswap( n, a, ia, j, desca, 1, a, ia, jp,
193 CALL infog2l( ia, k2, desca, nprow, npcol, myrow, mycol,
194 $ iia, jja, icurrow, icurcol )
196 jp = ipiv( jja+j-k1 )
198 $
CALL psswap( n, a, ia, j, desca, 1, a, ia, jp,