LAPACK  3.8.0 LAPACK: Linear Algebra PACKage

## ◆ dlaswp()

 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 (K2-K1+1) is the number of elements of IPIV for which a row interchange will be done.``` [in] IPIV ``` IPIV is INTEGER array, dimension (K1+(K2-K1)*abs(INCX)) The vector of pivot indices. Only the elements in positions K1 through K1+(K2-K1)*abs(INCX) of IPIV are accessed. IPIV(K1+(K-K1)*abs(INCX)) = L implies rows K and L are to be interchanged.``` [in] INCX ``` INCX is INTEGER The increment between successive values of IPIV. If INCX is negative, the pivots are applied in reverse order.```
Date
June 2017
Further Details:
```  Modified by
R. C. Whaley, Computer Science Dept., Univ. of Tenn., Knoxville, USA```

Definition at line 117 of file dlaswp.f.

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