CSROT(3S)CSROT(3S)NAME
CSROT, ZDROT - Applies a real plane rotation to a pair of complex vectors
SYNOPSIS
Single precision complex
Fortran:
CALL CSROT (n, x, incx, y, incy, c, s)
C/C++:
#include <scsl_blas.h>
void csrot (int n, scsl_complex *x, int incx, scsl_complex *y,
int incy, float c, float s);
C++ STL:
#include <complex.h>
#include <scsl_blas.h>
void csrot (int n, complex<float> *x, int incx, complex<float>
*y, int incy, float c, float s);
Double precision complex
Fortran:
CALL ZDROT (n, x, incx, y, incy, c, s)
C/C++:
#include <scsl_blas.h>
void zdrot (int n, scsl_zomplex *x, int incx, scsl_zomplex *y,
int incy, double c, double s);
C++ STL:
#include <complex.h>
#include <scsl_blas.h>
void zdrot (int n, complex<double> *x, int incx,
complex<double> *y, int incy, double c, double s);
IMPLEMENTATION
These routines are part of the SCSL Scientific Library and can be loaded
using either the -lscs or the -lscs_mp option. The -lscs_mp option
directs the linker to use the multi-processor version of the library.
When linking to SCSL with -lscs or -lscs_mp, the default integer size is
4 bytes (32 bits). Another version of SCSL is available in which integers
are 8 bytes (64 bits). This version allows the user access to larger
memory sizes and helps when porting legacy Cray codes. It can be loaded
by using the -lscs_i8 option or the -lscs_i8_mp option. A program may use
only one of the two versions; 4-byte integer and 8-byte integer library
calls cannot be mixed.
The C and C++ prototypes shown above are appropriate for the 4-byte
integer version of SCSL. When using the 8-byte integer version, the
variables of type int become long long and the <scsl_blas_i8.h> header
Page 1
CSROT(3S)CSROT(3S)
file should be included.
DESCRIPTION
These routines apply a real plane rotation to a pair of complex vectors.
The form of the operation is the following:
_ _ _ _ _ _
| x | | c s | | x |
| i | | | | i |
| | | | | |
| y |:= | -s c | | y |
| i | | | | i |
- - - - - -
for each pair of values (x(i), y(i)), i=1,..., n
See the NOTES section of this man page for information about the
interpretation of the data types described in the following arguments.
This routine has the following arguments:
n Integer. (input)
Number of pairs of elements of x and y to be rotated.
x Array of dimension (n-1) * |incx| + 1. (input and output)
CSROT: Single precision complex array.
ZDROT: Double precision complex array.
On input, array x. If incx > 0, x(i) is stored in x(1+(i-1) *
incx); if incx < 0, x(i) is stored in x(1-(n-i) * incx). On
output, the rotated vector x.
incx Integer. (input)
Increment between elements of x. incx should not be 0.
y Array of dimension 1+(n-1) * |incy|). (input and output)
CSROT: Single precision complex array.
ZDROT: Double precision complex array.
On input, array y. If incy > 0, y(i) is stored in y(1+(i-1) *
incy); if incy < 0, y(i) is stored in y(1-(n-i) * incy). On
output, the rotated vector y.
incy Integer. (input)
Increment between elements of y. incy should not be 0.
c Cosine of the angle of rotation. (input)
CSROT: Single precision.
ZDROT: Double precision.
Page 2
CSROT(3S)CSROT(3S)
s Sine of the angle of rotation. (input)
CSROT: Single precision.
ZDROT: Double precision.
NOTES
These routines are extensions to the Level 1 BLAS.
Data Types
The following data types are described in this documentation:
Term Used Data type
Fortran:
Array dimensioned n x(n)
Integer INTEGER (INTEGER*8 for -lscs_i8[_mp])
Single precision REAL
Double precision DOUBLE PRECISION
Single precision complex COMPLEX
Double precision complex DOUBLE COMPLEX
C/C++:
Array dimensioned n x[n]
Integer int (long long for -lscs_i8[_mp])
Single precision float
Double precision double
Single precision complex scsl_complex
Double precision complex scsl_zomplex
C++ STL:
Array dimensioned n x[n]
Integer int (long long for -lscs_i8[_mp])
Single precision float
Double precision double
Page 3
CSROT(3S)CSROT(3S)
Single precision complex complex<float>
Double precision complex complex<double>
SEE ALSOINTRO_SCSL(3S), INTRO_BLAS1(3S), SROT(3S), SROTG(3S), SROTM(3S)INTRO_CBLAS(3S) for information about using the C interface to Fortran 77
Basic Linear Algebra Subprograms (legacy BLAS) set forth by the Basic
Linear Algebra Subprograms Technical Forum.
Page 4