SROTI(3)     SPARSE BLAS routine of NEC Numeric Library Collection    SROTI(3)



NAME
       SROTI - Apply a Sparse Plane Rotation

SYNOPSIS
       SUBROUTINE SROTI( NZ, X, INDX, Y, C, S )

           INTEGER        NZ, INDX, C, S

           REAL           X, Y

PURPOSE
       SROTI applies a Givens rotation to a sparse vector stored in compressed
       form and another vector stored in full-storage  form.  If  all  nonzero
       components of Y appear in INDX, then SROTI computes
            _      _       _      _     _      _
            | x(i) |  <--  | c  s |  .  | x(i) |
            | y(i) |       |-s  c |     | y(i) |
            -      -       -      -     -      -

                for i = 1, ..., n.

       Whether  or  not all nonzero components of Y appear in INDX, the opera-
       tion is described by the follow FORTRAN:

                     TEMP = X(I)

                     X(I) = C * TEMP + S * Y( INDX(I) )

             Y( INDX(I) ) = - S * TEMP + C * Y( INDX(I) )

                       for I = 1, ..., NZ.

       The value in INDX must be distinct to allow consistent vector or paral-
       lel execution.

ARGUMENTS
       NZ      (input) INTEGER
               Number of elements in the compressed form.

       INDX    (input) INTEGER
               Array  containing  the  indices  of  the compressed form. It is
               assumed that the elements in INDX are distinct.

       C,S     (input) REAL
               The two scalars defining the givens rotation.

       X       (input, output) REAL
               Array containing the values of the compressed form.

       Y       (input, output) REAL
               Array, on input, which contains the vector Y  in  full  storage
               form.  Only  the  elements corresponding to the indices in INDX
               have been modified.


FURTHER DETAILS
       Sparse BLAS algorithm is from  ACM  algorithm  692  by  D.  Dodson,  R.
       Grimes, and J. Lewis.




SPARSE BLAS routine             31 October 2017                       SROTI(3)