LAPACK  3.8.0
LAPACK: Linear Algebra PACKage

◆ 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
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2017
Further Details:
     jack dongarra, linpack, 3/11/78.
     modified 12/3/93, array(1) declarations changed to array(*)

Definition at line 94 of file drot.f.

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