Annotation of rpl/lapack/blas/zdrot.f, revision 1.15
1.8 bertrand 1: *> \brief \b ZDROT
2: *
3: * =========== DOCUMENTATION ===========
4: *
1.13 bertrand 5: * Online html documentation available at
6: * http://www.netlib.org/lapack/explore-html/
1.8 bertrand 7: *
8: * Definition:
9: * ===========
10: *
1.15 ! bertrand 11: * SUBROUTINE ZDROT( N, ZX, INCX, ZY, INCY, C, S )
1.13 bertrand 12: *
1.8 bertrand 13: * .. Scalar Arguments ..
14: * INTEGER INCX, INCY, N
15: * DOUBLE PRECISION C, S
16: * ..
17: * .. Array Arguments ..
1.15 ! bertrand 18: * COMPLEX*16 ZX( * ), ZY( * )
1.8 bertrand 19: * ..
1.13 bertrand 20: *
1.8 bertrand 21: *
22: *> \par Purpose:
23: * =============
24: *>
25: *> \verbatim
26: *>
27: *> Applies a plane rotation, where the cos and sin (c and s) are real
28: *> and the vectors cx and cy are complex.
29: *> jack dongarra, linpack, 3/11/78.
30: *> \endverbatim
31: *
32: * Arguments:
33: * ==========
34: *
35: *> \param[in] N
36: *> \verbatim
37: *> N is INTEGER
38: *> On entry, N specifies the order of the vectors cx and cy.
39: *> N must be at least zero.
40: *> \endverbatim
41: *>
1.15 ! bertrand 42: *> \param[in,out] ZX
1.8 bertrand 43: *> \verbatim
1.15 ! bertrand 44: *> ZX is COMPLEX*16 array, dimension at least
1.8 bertrand 45: *> ( 1 + ( N - 1 )*abs( INCX ) ).
1.15 ! bertrand 46: *> Before entry, the incremented array ZX must contain the n
! 47: *> element vector cx. On exit, ZX is overwritten by the updated
1.8 bertrand 48: *> vector cx.
49: *> \endverbatim
50: *>
51: *> \param[in] INCX
52: *> \verbatim
53: *> INCX is INTEGER
54: *> On entry, INCX specifies the increment for the elements of
1.15 ! bertrand 55: *> ZX. INCX must not be zero.
1.8 bertrand 56: *> \endverbatim
57: *>
1.15 ! bertrand 58: *> \param[in,out] ZY
1.8 bertrand 59: *> \verbatim
1.15 ! bertrand 60: *> ZY is COMPLEX*16 array, dimension at least
1.8 bertrand 61: *> ( 1 + ( N - 1 )*abs( INCY ) ).
1.15 ! bertrand 62: *> Before entry, the incremented array ZY must contain the n
! 63: *> element vector cy. On exit, ZY is overwritten by the updated
1.8 bertrand 64: *> vector cy.
65: *> \endverbatim
66: *>
67: *> \param[in] INCY
68: *> \verbatim
69: *> INCY is INTEGER
70: *> On entry, INCY specifies the increment for the elements of
1.15 ! bertrand 71: *> ZY. INCY must not be zero.
1.8 bertrand 72: *> \endverbatim
73: *>
74: *> \param[in] C
75: *> \verbatim
76: *> C is DOUBLE PRECISION
77: *> On entry, C specifies the cosine, cos.
78: *> \endverbatim
79: *>
80: *> \param[in] S
81: *> \verbatim
82: *> S is DOUBLE PRECISION
83: *> On entry, S specifies the sine, sin.
84: *> \endverbatim
85: *
86: * Authors:
87: * ========
88: *
1.13 bertrand 89: *> \author Univ. of Tennessee
90: *> \author Univ. of California Berkeley
91: *> \author Univ. of Colorado Denver
92: *> \author NAG Ltd.
1.8 bertrand 93: *
94: *> \ingroup complex16_blas_level1
95: *
96: * =====================================================================
1.15 ! bertrand 97: SUBROUTINE ZDROT( N, ZX, INCX, ZY, INCY, C, S )
1.1 bertrand 98: *
1.15 ! bertrand 99: * -- Reference BLAS level1 routine --
1.8 bertrand 100: * -- Reference BLAS is a software package provided by Univ. of Tennessee, --
101: * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
102: *
1.1 bertrand 103: * .. Scalar Arguments ..
104: INTEGER INCX, INCY, N
105: DOUBLE PRECISION C, S
106: * ..
107: * .. Array Arguments ..
1.15 ! bertrand 108: COMPLEX*16 ZX( * ), ZY( * )
1.1 bertrand 109: * ..
110: *
111: * =====================================================================
112: *
113: * .. Local Scalars ..
114: INTEGER I, IX, IY
115: COMPLEX*16 CTEMP
116: * ..
117: * .. Executable Statements ..
118: *
119: IF( N.LE.0 )
120: $ RETURN
1.7 bertrand 121: IF( INCX.EQ.1 .AND. INCY.EQ.1 ) THEN
122: *
123: * code for both increments equal to 1
124: *
125: DO I = 1, N
1.15 ! bertrand 126: CTEMP = C*ZX( I ) + S*ZY( I )
! 127: ZY( I ) = C*ZY( I ) - S*ZX( I )
! 128: ZX( I ) = CTEMP
1.7 bertrand 129: END DO
130: ELSE
1.1 bertrand 131: *
132: * code for unequal increments or equal increments not equal
133: * to 1
134: *
1.7 bertrand 135: IX = 1
136: IY = 1
137: IF( INCX.LT.0 )
138: $ IX = ( -N+1 )*INCX + 1
139: IF( INCY.LT.0 )
140: $ IY = ( -N+1 )*INCY + 1
141: DO I = 1, N
1.15 ! bertrand 142: CTEMP = C*ZX( IX ) + S*ZY( IY )
! 143: ZY( IY ) = C*ZY( IY ) - S*ZX( IX )
! 144: ZX( IX ) = CTEMP
1.7 bertrand 145: IX = IX + INCX
146: IY = IY + INCY
147: END DO
148: END IF
1.1 bertrand 149: RETURN
1.15 ! bertrand 150: *
! 151: * End of ZDROT
! 152: *
1.1 bertrand 153: END
CVSweb interface <joel.bertrand@systella.fr>