 LAPACK 3.11.0 LAPACK: Linear Algebra PACKage
Searching...
No Matches

## ◆ drot()

 subroutine drot ( integer N, double precision, dimension(*) DX, integer INCX, double precision, dimension(*) DY, integer INCY, double precision C, double precision S )

DROT

Purpose:
`    DROT applies a plane rotation.`
Parameters
 [in] N ``` N is INTEGER number of elements in input vector(s)``` [in,out] DX ` DX is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCX ) )` [in] INCX ``` INCX is INTEGER storage spacing between elements of DX``` [in,out] DY ` DY is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCY ) )` [in] INCY ``` INCY is INTEGER storage spacing between elements of DY``` [in] C ` C is DOUBLE PRECISION` [in] S ` S is DOUBLE PRECISION`
Further Details:
```     jack dongarra, linpack, 3/11/78.
modified 12/3/93, array(1) declarations changed to array(*)```

Definition at line 91 of file drot.f.

92*
93* -- Reference BLAS level1 routine --
94* -- Reference BLAS is a software package provided by Univ. of Tennessee, --
95* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
96*
97* .. Scalar Arguments ..
98 DOUBLE PRECISION C,S
99 INTEGER INCX,INCY,N
100* ..
101* .. Array Arguments ..
102 DOUBLE PRECISION DX(*),DY(*)
103* ..
104*
105* =====================================================================
106*
107* .. Local Scalars ..
108 DOUBLE PRECISION DTEMP
109 INTEGER I,IX,IY
110* ..
111 IF (n.LE.0) RETURN
112 IF (incx.EQ.1 .AND. incy.EQ.1) THEN
113*
114* code for both increments equal to 1
115*
116 DO i = 1,n
117 dtemp = c*dx(i) + s*dy(i)
118 dy(i) = c*dy(i) - s*dx(i)
119 dx(i) = dtemp
120 END DO
121 ELSE
122*
123* code for unequal increments or equal increments not equal
124* to 1
125*
126 ix = 1
127 iy = 1
128 IF (incx.LT.0) ix = (-n+1)*incx + 1
129 IF (incy.LT.0) iy = (-n+1)*incy + 1
130 DO i = 1,n
131 dtemp = c*dx(ix) + s*dy(iy)
132 dy(iy) = c*dy(iy) - s*dx(ix)
133 dx(ix) = dtemp
134 ix = ix + incx
135 iy = iy + incy
136 END DO
137 END IF
138 RETURN
139*
140* End of DROT
141*
Here is the caller graph for this function: