1
SUBROUTINE ZDROT( N, CX, INCX, CY, INCY, C, S )
3
* .. Scalar Arguments ..
7
* .. Array Arguments ..
8
COMPLEX*16 CX( * ), CY( * )
14
* Applies a plane rotation, where the cos and sin (c and s) are real
15
* and the vectors cx and cy are complex.
16
* jack dongarra, linpack, 3/11/78.
22
* On entry, N specifies the order of the vectors cx and cy.
23
* N must be at least zero.
26
* CX (input) COMPLEX*16 array, dimension at least
27
* ( 1 + ( N - 1 )*abs( INCX ) ).
28
* Before entry, the incremented array CX must contain the n
29
* element vector cx. On exit, CX is overwritten by the updated
32
* INCX (input) INTEGER
33
* On entry, INCX specifies the increment for the elements of
34
* CX. INCX must not be zero.
37
* CY (input) COMPLEX*16 array, dimension at least
38
* ( 1 + ( N - 1 )*abs( INCY ) ).
39
* Before entry, the incremented array CY must contain the n
40
* element vector cy. On exit, CY is overwritten by the updated
43
* INCY (input) INTEGER
44
* On entry, INCY specifies the increment for the elements of
45
* CY. INCY must not be zero.
48
* C (input) DOUBLE PRECISION
49
* On entry, C specifies the cosine, cos.
52
* S (input) DOUBLE PRECISION
53
* On entry, S specifies the sine, sin.
56
* =====================================================================
62
* .. Executable Statements ..
66
IF( INCX.EQ.1 .AND. INCY.EQ.1 )
69
* code for unequal increments or equal increments not equal
75
$ IX = ( -N+1 )*INCX + 1
77
$ IY = ( -N+1 )*INCY + 1
79
CTEMP = C*CX( IX ) + S*CY( IY )
80
CY( IY ) = C*CY( IY ) - S*CX( IX )
87
* code for both increments equal to 1
91
CTEMP = C*CX( I ) + S*CY( I )
92
CY( I ) = C*CY( I ) - S*CX( I )