Debian Codegraph @

Modules/ThirdParty/VNL/src/vxl/v3p/netlib/blas/csrot.f

raw
1 subroutine csrot (n,cx,incx,cy,incy,c,s)
2 c
3 c applies a plane rotation, where the cos and sin (c and s) are real
4 c and the vectors cx and cy are complex.
5 c jack dongarra, linpack, 3/11/78.
6 c
7 complex cx(1),cy(1),ctemp
8 real c,s
9 integer i,incx,incy,ix,iy,n
10 c
11 if(n.le.0)return
12 if(incx.eq.1.and.incy.eq.1)go to 20
13 c
14 c code for unequal increments or equal increments not equal
15 c to 1
16 c
17 ix = 1
18 iy = 1
19 if(incx.lt.0)ix = (-n+1)*incx + 1
20 if(incy.lt.0)iy = (-n+1)*incy + 1
21 do 10 i = 1,n
22 ctemp = c*cx(ix) + s*cy(iy)
23 cy(iy) = c*cy(iy) - s*cx(ix)
24 cx(ix) = ctemp
25 ix = ix + incx
26 iy = iy + incy
27 10 continue
28 return
29 c
30 c code for both increments equal to 1
31 c
32 20 do 30 i = 1,n
33 ctemp = c*cx(i) + s*cy(i)
34 cy(i) = c*cy(i) - s*cx(i)
35 cx(i) = ctemp
36 30 continue
37 return
38 end