01:       SUBROUTINE CLACRT( N, CX, INCX, CY, INCY, C, S )
02: *
03: *  -- LAPACK auxiliary routine (version 3.2) --
04: *     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
05: *     November 2006
06: *
07: *     .. Scalar Arguments ..
08:       INTEGER            INCX, INCY, N
09:       COMPLEX            C, S
10: *     ..
11: *     .. Array Arguments ..
12:       COMPLEX            CX( * ), CY( * )
13: *     ..
14: *
15: *  Purpose
16: *  =======
17: *
18: *  CLACRT performs the operation
19: *
20: *     (  c  s )( x )  ==> ( x )
21: *     ( -s  c )( y )      ( y )
22: *
23: *  where c and s are complex and the vectors x and y are complex.
24: *
25: *  Arguments
26: *  =========
27: *
28: *  N       (input) INTEGER
29: *          The number of elements in the vectors CX and CY.
30: *
31: *  CX      (input/output) COMPLEX array, dimension (N)
32: *          On input, the vector x.
33: *          On output, CX is overwritten with c*x + s*y.
34: *
35: *  INCX    (input) INTEGER
36: *          The increment between successive values of CX.  INCX <> 0.
37: *
38: *  CY      (input/output) COMPLEX array, dimension (N)
39: *          On input, the vector y.
40: *          On output, CY is overwritten with -s*x + c*y.
41: *
42: *  INCY    (input) INTEGER
43: *          The increment between successive values of CY.  INCY <> 0.
44: *
45: *  C       (input) COMPLEX
46: *  S       (input) COMPLEX
47: *          C and S define the matrix
48: *             [  C   S  ].
49: *             [ -S   C  ]
50: *
51: * =====================================================================
52: *
53: *     .. Local Scalars ..
54:       INTEGER            I, IX, IY
55:       COMPLEX            CTEMP
56: *     ..
57: *     .. Executable Statements ..
58: *
59:       IF( N.LE.0 )
60:      $   RETURN
61:       IF( INCX.EQ.1 .AND. INCY.EQ.1 )
62:      $   GO TO 20
63: *
64: *     Code for unequal increments or equal increments not equal to 1
65: *
66:       IX = 1
67:       IY = 1
68:       IF( INCX.LT.0 )
69:      $   IX = ( -N+1 )*INCX + 1
70:       IF( INCY.LT.0 )
71:      $   IY = ( -N+1 )*INCY + 1
72:       DO 10 I = 1, N
73:          CTEMP = C*CX( IX ) + S*CY( IY )
74:          CY( IY ) = C*CY( IY ) - S*CX( IX )
75:          CX( IX ) = CTEMP
76:          IX = IX + INCX
77:          IY = IY + INCY
78:    10 CONTINUE
79:       RETURN
80: *
81: *     Code for both increments equal to 1
82: *
83:    20 CONTINUE
84:       DO 30 I = 1, N
85:          CTEMP = C*CX( I ) + S*CY( I )
86:          CY( I ) = C*CY( I ) - S*CX( I )
87:          CX( I ) = CTEMP
88:    30 CONTINUE
89:       RETURN
90:       END
91: