3 /* Subroutine */ int dlaswp_(integer *n, doublereal *a, integer *lda, integer
4 *k1, integer *k2, integer *ipiv, integer *incx)
6 /* System generated locals */
7 integer a_dim1, a_offset, i__1, i__2, i__3, i__4;
10 integer i__, j, k, i1, i2, n32, ip, ix, ix0, inc;
14 /* -- LAPACK auxiliary routine (version 3.1) -- */
15 /* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
18 /* .. Scalar Arguments .. */
20 /* .. Array Arguments .. */
26 /* DLASWP performs a series of row interchanges on the matrix A. */
27 /* One row interchange is initiated for each of rows K1 through K2 of A. */
32 /* N (input) INTEGER */
33 /* The number of columns of the matrix A. */
35 /* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) */
36 /* On entry, the matrix of column dimension N to which the row */
37 /* interchanges will be applied. */
38 /* On exit, the permuted matrix. */
40 /* LDA (input) INTEGER */
41 /* The leading dimension of the array A. */
43 /* K1 (input) INTEGER */
44 /* The first element of IPIV for which a row interchange will */
47 /* K2 (input) INTEGER */
48 /* The last element of IPIV for which a row interchange will */
51 /* IPIV (input) INTEGER array, dimension (K2*abs(INCX)) */
52 /* The vector of pivot indices. Only the elements in positions */
53 /* K1 through K2 of IPIV are accessed. */
54 /* IPIV(K) = L implies rows K and L are to be interchanged. */
56 /* INCX (input) INTEGER */
57 /* The increment between successive values of IPIV. If IPIV */
58 /* is negative, the pivots are applied in reverse order. */
64 /* R. C. Whaley, Computer Science Dept., Univ. of Tenn., Knoxville, USA */
66 /* ===================================================================== */
68 /* .. Local Scalars .. */
70 /* .. Executable Statements .. */
72 /* Interchange row I with row IPIV(I) for each of rows K1 through K2. */
74 /* Parameter adjustments */
76 a_offset = 1 + a_dim1;
86 } else if (*incx < 0) {
87 ix0 = (1 - *k2) * *incx + 1;
98 for (j = 1; j <= i__1; j += 32) {
102 for (i__ = i1; i__3 < 0 ? i__ >= i__2 : i__ <= i__2; i__ += i__3)
107 for (k = j; k <= i__4; ++k) {
108 temp = a[i__ + k * a_dim1];
109 a[i__ + k * a_dim1] = a[ip + k * a_dim1];
110 a[ip + k * a_dim1] = temp;
125 for (i__ = i1; i__3 < 0 ? i__ >= i__1 : i__ <= i__1; i__ += i__3) {
129 for (k = n32; k <= i__2; ++k) {
130 temp = a[i__ + k * a_dim1];
131 a[i__ + k * a_dim1] = a[ip + k * a_dim1];
132 a[ip + k * a_dim1] = temp;