srotm(3S)

SROTM, DROTM - Applies a modified Givens plane rotation

Showing IRIX 6.5.30 (default release). Added in IRIX 6.5.15.

NAME
     SROTM, DROTM - Applies a modified Givens plane rotation

SYNOPSIS
     Single precision

          Fortran:
               CALL SROTM (n, x, incx, y, incy, rparam)

          C/C++:
               #include <scsl_blas.h>
               void srotm (int n, float *x, int incx, float *y, int incy,
               float *rparam);

     Double precision

          Fortran:
               CALL DROTM (n, x, incx, y, incy, rparam)

          C/C++:
               #include <scsl_blas.h>
               void drotm (int n, double *x, int incx, double *y, int incy,
               double *rparam);

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
     These routines apply the modified Givens plane rotation constructed by
     SROTMG/DROTMG.

     See the NOTES section of this man page for information about the
     interpretation of the data types described in the following arguments.

     These routines have the following arguments:
     n         Integer.  (input)
               Number of planar points to be rotated.  If n <= 0, these
               routines return without any computation.

     x         Array of dimension (n-1) * |incx| + 1.  (input and output)
               SROTM: Single precision array.
               DROTM: Double precision 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)
               SROTM: Single precision array.
               DROTM: Double precision 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 incx = 0, the results will
               be unpredictable.

     rparam    Array of dimension 5.  (input)
               SROTM: Single precision array.
               DROTM: Double precision array.
               Contains rotation matrix information.

     These routines compute a planar rotation, with possible scaling or
     reflection, as follows:

          _      _     _               _  _      _
          | x(i) |     | h(1,1) h(1,2) |  | x(i) |
          | y(i) | <-- | h(2,1) h(2,2) |  | y(i) |
          -      -     -               -  -      -

          for i=1 ,  , n


     where the matrix that contains the elements h(1,1), h(2,1), h(1,2), and
     h(2,2) is called a rotation matrix.

     The rparam array determines the contents of the rotation matrix, as
     follows:

     The key parameter, rparam(1), may have one of four values:

          1.0,  0.0,  -1.0,  or -2.0

     If rparam(1) = 1.0:

          _               _   _                      _
          | h(1,1) h(1,2) | = | rparam(2)      1.0   |
          | h(2,1) h(2,2) |   |    -1.0    rparam(5) |
          -               -   -                      -


     and rparam(3) and rparam(4) are ignored.

     If rparam(1) = 0.0:

          _               _   _                      _
          | h(1,1) h(1,2) | = |       1.0  rparam(4) |
          | h(2,1) h(2,2) |   | rparam(3)        1.0 |
          -               -   -                      -



     and rparam(2) and rparam(5) are ignored.

     If rparam(1)=-1.0 (rescaling case):

     _               _   _                      _
     | h(1,1) h(1,2) | = | rparam(2)  rparam(4) |
     | h(2,1) h(2,2) |   | rparam(3)  rparam(5) |
     -               -   -                      -


     This is a full matrix multiplication.

     If rparam(1) = -2.0:

               _               _   _          _
               | h(1,1) h(1,2) | = | 1.0  0.0 | = I
               | h(2,1) h(2,2) |   | 0.0  1.0 |
               -               -   -          -


     where I is the identity matrix.  In this case, rparam(2), rparam(3),
     rparam(4), and rparam(5) are ignored.

     If n <=  0, or if the rotation matrix is the identity matrix (for
     example, when rparam(1) = -2.0), these routines return with no operation
     on input arrays x and y.

NOTES
     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

     C/C++:

          Array dimensioned n           x[n]

          Integer                       int (long long for -lscs_i8[_mp])

          Single precision              float

          Double precision              double

SEE ALSO
     INTRO_SCSL(3S), INTRO_BLAS1(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.

     SROTMG(3S) for further details about the modified Givens transformation
     and array rparam