01:       SUBROUTINE CLAR2V( N, X, Y, Z, INCX, C, S, INCC )
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            INCC, INCX, N
09: *     ..
10: *     .. Array Arguments ..
11:       REAL               C( * )
12:       COMPLEX            S( * ), X( * ), Y( * ), Z( * )
13: *     ..
14: *
15: *  Purpose
16: *  =======
17: *
18: *  CLAR2V applies a vector of complex plane rotations with real cosines
19: *  from both sides to a sequence of 2-by-2 complex Hermitian matrices,
20: *  defined by the elements of the vectors x, y and z. For i = 1,2,...,n
21: *
22: *     (       x(i)  z(i) ) :=
23: *     ( conjg(z(i)) y(i) )
24: *
25: *       (  c(i) conjg(s(i)) ) (       x(i)  z(i) ) ( c(i) -conjg(s(i)) )
26: *       ( -s(i)       c(i)  ) ( conjg(z(i)) y(i) ) ( s(i)        c(i)  )
27: *
28: *  Arguments
29: *  =========
30: *
31: *  N       (input) INTEGER
32: *          The number of plane rotations to be applied.
33: *
34: *  X       (input/output) COMPLEX array, dimension (1+(N-1)*INCX)
35: *          The vector x; the elements of x are assumed to be real.
36: *
37: *  Y       (input/output) COMPLEX array, dimension (1+(N-1)*INCX)
38: *          The vector y; the elements of y are assumed to be real.
39: *
40: *  Z       (input/output) COMPLEX array, dimension (1+(N-1)*INCX)
41: *          The vector z.
42: *
43: *  INCX    (input) INTEGER
44: *          The increment between elements of X, Y and Z. INCX > 0.
45: *
46: *  C       (input) REAL array, dimension (1+(N-1)*INCC)
47: *          The cosines of the plane rotations.
48: *
49: *  S       (input) COMPLEX array, dimension (1+(N-1)*INCC)
50: *          The sines of the plane rotations.
51: *
52: *  INCC    (input) INTEGER
53: *          The increment between elements of C and S. INCC > 0.
54: *
55: *  =====================================================================
56: *
57: *     .. Local Scalars ..
58:       INTEGER            I, IC, IX
59:       REAL               CI, SII, SIR, T1I, T1R, T5, T6, XI, YI, ZII,
60:      $                   ZIR
61:       COMPLEX            SI, T2, T3, T4, ZI
62: *     ..
63: *     .. Intrinsic Functions ..
64:       INTRINSIC          AIMAG, CMPLX, CONJG, REAL
65: *     ..
66: *     .. Executable Statements ..
67: *
68:       IX = 1
69:       IC = 1
70:       DO 10 I = 1, N
71:          XI = REAL( X( IX ) )
72:          YI = REAL( Y( IX ) )
73:          ZI = Z( IX )
74:          ZIR = REAL( ZI )
75:          ZII = AIMAG( ZI )
76:          CI = C( IC )
77:          SI = S( IC )
78:          SIR = REAL( SI )
79:          SII = AIMAG( SI )
80:          T1R = SIR*ZIR - SII*ZII
81:          T1I = SIR*ZII + SII*ZIR
82:          T2 = CI*ZI
83:          T3 = T2 - CONJG( SI )*XI
84:          T4 = CONJG( T2 ) + SI*YI
85:          T5 = CI*XI + T1R
86:          T6 = CI*YI - T1R
87:          X( IX ) = CI*T5 + ( SIR*REAL( T4 )+SII*AIMAG( T4 ) )
88:          Y( IX ) = CI*T6 - ( SIR*REAL( T3 )-SII*AIMAG( T3 ) )
89:          Z( IX ) = CI*T3 + CONJG( SI )*CMPLX( T6, T1I )
90:          IX = IX + INCX
91:          IC = IC + INCC
92:    10 CONTINUE
93:       RETURN
94: *
95: *     End of CLAR2V
96: *
97:       END
98: