DROTI(3) SPARSE BLAS routine of NEC Numeric Library Collection DROTI(3)
NAME
DROTI - Apply a Sparse Plane Rotation
SYNOPSIS
SUBROUTINE DROTI( NZ, X, INDX, Y, C, S )
INTEGER NZ, INDX, C, S
DOUBLE PRECISION
X, Y
PURPOSE
DROTI 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 DROTI 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) DOUBLE PRECISION
The two scalars defining the givens rotation.
X (input, output) DOUBLE PRECISION
Array containing the values of the compressed form.
Y (input, output) DOUBLE PRECISION
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 DROTI(3)