srot(3S)
SROT, DROT, CROT, ZROT - Applies a real plane rotation or complex coordinate rotation
As shipped in IRIX 6.5.22. Added in IRIX 6.5.15.
NAME SROT, DROT, CROT, ZROT - Applies a real plane rotation or complex coordinate rotation SYNOPSIS Single precision Fortran: CALL SROT (n, x, incx, y, incy, c, s) C/C++: #include <scsl_blas.h> void srotm (int n, float *x, int incx, float *y, int incy, float c, float s); Double precision Fortran: CALL DROT x, incx, y, incy, c, s) C/C++: #include <scsl_blas.h> void drot (int n, double *x, int incx, double *y, int incy, double c, double s); Single precision complex Fortran: CALL CROT (n, x, incx, y, incy, c, s) C/C++: #include <scsl_blas.h> void crot (int n, scsl_complex *x, int incx, scsl_complex *y, int incy, float c, scsl_complex *s); C/C++ STL: #include <complex.h> #include <scsl_blas.h> void crot (int n, complex<float> *x, int incx, complex<float> *y, int incy, float c, complex<float> *s); Double precision complex Fortran: CALL ZROT n, x, incx, y, incy, c, s) C/C++: #include <scsl_blas.h> void zrot (int n, scsl_zomplex *x, int incx, scsl_zomplex *y, int incy, double c, scsl_zomplex *s); C/C++ STL: #include <complex.h> #include <scsl_blas.h> void zrot (int n, complex<double> *x, int incx, complex<double> *y, int incy, double c, complex<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 file should be included. DESCRIPTION SROT/DROT applies a plane rotation matrix to a real sequence of ordered pairs: (xi, yi), for all i = 1, 2, ..., n. CROT/ZROT applies a complex coordinate rotation to a complex sequence of ordered pairs. These routines have the following arguments: n Integer. (input) Number of ordered pairs (planar points in SROT) to be rotated. If n <= 0, these routines return without computation. x Array of dimension (n-1) * |incx| + 1. (input and output) SROT: Single precision array. DROT: Double precision array. CROT: Single precision complex array. ZROT: Double precision complex array. On input, array x contains the x-coordinate of each planar point to be rotated. On output, array x contains the x-coordinate of each rotated planar point. incx Integer. (input) Increment between elements of x. If incx = 0, the results will be unpredictable. y Array of dimension (n-1) * |incy| + 1. (input and output) SROT: Single precision array. DROT: Double precision array. CROT: Single precision complex array. ZROT: Double precision complex array. On input, array y contains the y-coordinate of each planar point to be rotated. On output, array y contains the y-coordinate of each rotated planar point. incy Integer. (input) Increment between elements of y. If incy = 0, the results will be unpredictable. c Cosine of the angle of rotation, usually calculated using SROTG(3S) or CROTG(3S). (input) SROT: Single precision. DROT: Double precision. CROT: Single precision. ZROT: Double precision. s Sine of the angle of rotation, usually calculated using SROTG. (input) SROT: Single precision. DROT: Double precision. CROT: Single precision complex. ZROT: Double precision complex. NOTES SROT/DROT are Level 1 Basic Linear Algebra Subprograms (Level 1 BLAS). CROT/ZROT are extensions to level 1 BLAS. SROT/DROT applies the following plane rotation to each pair of elements (xi, yi): _ _ _ _ _ _ | x | | c s | | x | | i | <- | | * | i | | y | |-s c | | y | | i | | | | i | - - - - - - for i = 1,...,n CROT/ZROT applies a complex coordinate rotation to each pair of elements (xi, yi): _ _ _ _ _ _ | x | | c s | | x | | i | <- | _ | * | i | | y | |-s c | | y | | i | | | | i | - - - - - - _ where s represents the complex conjugate of s. If coefficients c and s satisfy c2 + |s|2 = 1.0, the rotation matrix is orthogonal, and the transformation is called a Givens plane rotation. To calculate the Givens coefficients c and s from a two-element vector to determine the angle of rotation, use SROTG(3S) or CROTG(3S). When working backward (incx < 0 or incy < 0), each routine starts at the end of the vector and moves backward, as follows: Fortran: x(1-incx * (n-1)), x(1-incx * (n-2)), ..., x(1) y(1-incy * (n-1)), y(1-incy * (n-2)), ..., y(1) C/C++: x[-incx * (n-1)], x[-incx * (n-2)], ..., x[0] y[-incy * (n-1)], x[-incy * (n-2)], ..., y[0] 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 Single precision complex complex<float> Double precision complex complex<double> SEE ALSO INTRO_SCSL(3S), INTRO_BLAS1(3S), SROTG(3S), SROTM(3S), SROTMG(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.