srot(3f) - [BLAS:SINGLE_BLAS_LEVEL1] Apply Given's rotation.
 subroutine srot(n,sx,incx,sy,incy,c,s)
   .. Scalar Arguments ..
   real,intent(in)    :: c,s
   integer,intent(in) :: incx,incy,n
   ..
   .. Array Arguments ..
   real,intent(inout) :: sx(*),sy(*)
   ..
 applies a plane rotation.
N
       N is INTEGER
      number of elements in input vector(s)
SX
       SX is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) )
INCX
       INCX is INTEGER
      storage spacing between elements of SX
SY
       SY is REAL array, dimension ( 1 + ( N - 1 )*abs( INCY ) )
INCY
       INCY is INTEGER
      storage spacing between elements of SY
C
       C is REAL
S
       S is REAL
date:November 2017
FURTHER DETAILS
  jack dongarra, linpack, 3/11/78.
  modified 12/3/93, array(1) declarations changed to array(*)
Online html documentation available at
http://www.netlib.org/lapack/explore-html/
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | n | |||
| real, | intent(inout) | :: | sx(*) | |||
| integer, | intent(in) | :: | incx | |||
| real, | intent(inout) | :: | sy(*) | |||
| integer, | intent(in) | :: | incy | |||
| real, | intent(in) | :: | c | |||
| real, | intent(in) | :: | s | 
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | i | ||||
| integer, | public | :: | ix | ||||
| integer, | public | :: | iy | ||||
| real, | public | :: | stemp | 
       subroutine srot(n,sx,incx,sy,incy,c,s)
      implicit none
!
!  -- Reference BLAS level1 routine (version 3.8.0) --
!  -- Reference BLAS is a software package provided by Univ. of Tennessee,    --
!  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
!     November 2017
!
!     .. Scalar Arguments ..
      real,intent(in)    :: c,s
      integer,intent(in) :: incx,incy,n
!     ..
!     .. Array Arguments ..
      real,intent(inout) :: sx(*),sy(*)
!     ..
!
!  =====================================================================
!
!     .. Local Scalars ..
      real stemp
      integer i,ix,iy
!     ..
      if (n.le.0) return
      if (incx.eq.1 .and. incy.eq.1) then
!
!       code for both increments equal to 1
!
         do i = 1,n
            stemp = c*sx(i) + s*sy(i)
            sy(i) = c*sy(i) - s*sx(i)
            sx(i) = stemp
         enddo
      else
!
!       code for unequal increments or equal increments not equal
!         to 1
!
         ix = 1
         iy = 1
         if (incx.lt.0) ix = (-n+1)*incx + 1
         if (incy.lt.0) iy = (-n+1)*incy + 1
         do i = 1,n
            stemp = c*sx(ix) + s*sy(iy)
            sy(iy) = c*sy(iy) - s*sx(ix)
            sx(ix) = stemp
            ix = ix + incx
            iy = iy + incy
         enddo
      endif
      end subroutine srot