1
subroutine iswap (n,sx,incx,sy,incy)
3
c interchanges two vectors.
4
c uses unrolled loops for increments equal to 1.
5
c jack dongarra, linpack, 3/11/78.
7
integer sx(1),sy(1),stemp
8
integer i,incx,incy,ix,iy,m,mp1,n
11
if(incx.eq.1.and.incy.eq.1)go to 20
13
c code for unequal increments or equal increments not equal
18
if(incx.lt.0)ix = (-n+1)*incx + 1
19
if(incy.lt.0)iy = (-n+1)*incy + 1
29
c code for both increments equal to 1
35
if( m .eq. 0 ) go to 40