LAPACK  3.6.1 LAPACK: Linear Algebra PACKage
 subroutine dlaswp ( integer N, double precision, dimension( lda, * ) A, integer LDA, integer K1, integer K2, integer, dimension( * ) IPIV, integer INCX )

DLASWP performs a series of row interchanges on a general rectangular matrix.

Purpose:
``` DLASWP performs a series of row interchanges on the matrix A.
One row interchange is initiated for each of rows K1 through K2 of A.```
Parameters
 [in] N ``` N is INTEGER The number of columns of the matrix A.``` [in,out] A ``` A is DOUBLE PRECISION array, dimension (LDA,N) On entry, the matrix of column dimension N to which the row interchanges will be applied. On exit, the permuted matrix.``` [in] LDA ``` LDA is INTEGER The leading dimension of the array A.``` [in] K1 ``` K1 is INTEGER The first element of IPIV for which a row interchange will be done.``` [in] K2 ``` K2 is INTEGER The last element of IPIV for which a row interchange will be done.``` [in] IPIV ``` IPIV is INTEGER array, dimension (K2*abs(INCX)) The vector of pivot indices. Only the elements in positions K1 through K2 of IPIV are accessed. IPIV(K) = L implies rows K and L are to be interchanged.``` [in] INCX ``` INCX is INTEGER The increment between successive values of IPIV. If IPIV is negative, the pivots are applied in reverse order.```
Date
September 2012
Further Details:
```  Modified by
R. C. Whaley, Computer Science Dept., Univ. of Tenn., Knoxville, USA```

Definition at line 116 of file dlaswp.f.

116 *
117 * -- LAPACK auxiliary routine (version 3.4.2) --
118 * -- LAPACK is a software package provided by Univ. of Tennessee, --
119 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
120 * September 2012
121 *
122 * .. Scalar Arguments ..
123  INTEGER incx, k1, k2, lda, n
124 * ..
125 * .. Array Arguments ..
126  INTEGER ipiv( * )
127  DOUBLE PRECISION a( lda, * )
128 * ..
129 *
130 * =====================================================================
131 *
132 * .. Local Scalars ..
133  INTEGER i, i1, i2, inc, ip, ix, ix0, j, k, n32
134  DOUBLE PRECISION temp
135 * ..
136 * .. Executable Statements ..
137 *
138 * Interchange row I with row IPIV(I) for each of rows K1 through K2.
139 *
140  IF( incx.GT.0 ) THEN
141  ix0 = k1
142  i1 = k1
143  i2 = k2
144  inc = 1
145  ELSE IF( incx.LT.0 ) THEN
146  ix0 = 1 + ( 1-k2 )*incx
147  i1 = k2
148  i2 = k1
149  inc = -1
150  ELSE
151  RETURN
152  END IF
153 *
154  n32 = ( n / 32 )*32
155  IF( n32.NE.0 ) THEN
156  DO 30 j = 1, n32, 32
157  ix = ix0
158  DO 20 i = i1, i2, inc
159  ip = ipiv( ix )
160  IF( ip.NE.i ) THEN
161  DO 10 k = j, j + 31
162  temp = a( i, k )
163  a( i, k ) = a( ip, k )
164  a( ip, k ) = temp
165  10 CONTINUE
166  END IF
167  ix = ix + incx
168  20 CONTINUE
169  30 CONTINUE
170  END IF
171  IF( n32.NE.n ) THEN
172  n32 = n32 + 1
173  ix = ix0
174  DO 50 i = i1, i2, inc
175  ip = ipiv( ix )
176  IF( ip.NE.i ) THEN
177  DO 40 k = n32, n
178  temp = a( i, k )
179  a( i, k ) = a( ip, k )
180  a( ip, k ) = temp
181  40 CONTINUE
182  END IF
183  ix = ix + incx
184  50 CONTINUE
185  END IF
186 *
187  RETURN
188 *
189 * End of DLASWP
190 *

Here is the caller graph for this function: