--- 
:name: slasr
:md5sum: ff809128ca416b4d7f92c1ccd028ba23
:category: :subroutine
:arguments: 
- side: 
    :type: char
    :intent: input
- pivot: 
    :type: char
    :intent: input
- direct: 
    :type: char
    :intent: input
- m: 
    :type: integer
    :intent: input
- n: 
    :type: integer
    :intent: input
- c: 
    :type: real
    :intent: input
    :dims: 
    - m-1
- s: 
    :type: real
    :intent: input
    :dims: 
    - m-1
- a: 
    :type: real
    :intent: input/output
    :dims: 
    - lda
    - n
- lda: 
    :type: integer
    :intent: input
:substitutions: {}

:fortran_help: "      SUBROUTINE SLASR( SIDE, PIVOT, DIRECT, M, N, C, S, A, LDA )\n\n\
  *  Purpose\n\
  *  =======\n\
  *\n\
  *  SLASR applies a sequence of plane rotations to a real matrix A,\n\
  *  from either the left or the right.\n\
  *  \n\
  *  When SIDE = 'L', the transformation takes the form\n\
  *  \n\
  *     A := P*A\n\
  *  \n\
  *  and when SIDE = 'R', the transformation takes the form\n\
  *  \n\
  *     A := A*P**T\n\
  *  \n\
  *  where P is an orthogonal matrix consisting of a sequence of z plane\n\
  *  rotations, with z = M when SIDE = 'L' and z = N when SIDE = 'R',\n\
  *  and P**T is the transpose of P.\n\
  *  \n\
  *  When DIRECT = 'F' (Forward sequence), then\n\
  *  \n\
  *     P = P(z-1) * ... * P(2) * P(1)\n\
  *  \n\
  *  and when DIRECT = 'B' (Backward sequence), then\n\
  *  \n\
  *     P = P(1) * P(2) * ... * P(z-1)\n\
  *  \n\
  *  where P(k) is a plane rotation matrix defined by the 2-by-2 rotation\n\
  *  \n\
  *     R(k) = (  c(k)  s(k) )\n\
  *          = ( -s(k)  c(k) ).\n\
  *  \n\
  *  When PIVOT = 'V' (Variable pivot), the rotation is performed\n\
  *  for the plane (k,k+1), i.e., P(k) has the form\n\
  *  \n\
  *     P(k) = (  1                                            )\n\
  *            (       ...                                     )\n\
  *            (              1                                )\n\
  *            (                   c(k)  s(k)                  )\n\
  *            (                  -s(k)  c(k)                  )\n\
  *            (                                1              )\n\
  *            (                                     ...       )\n\
  *            (                                            1  )\n\
  *  \n\
  *  where R(k) appears as a rank-2 modification to the identity matrix in\n\
  *  rows and columns k and k+1.\n\
  *  \n\
  *  When PIVOT = 'T' (Top pivot), the rotation is performed for the\n\
  *  plane (1,k+1), so P(k) has the form\n\
  *  \n\
  *     P(k) = (  c(k)                    s(k)                 )\n\
  *            (         1                                     )\n\
  *            (              ...                              )\n\
  *            (                     1                         )\n\
  *            ( -s(k)                    c(k)                 )\n\
  *            (                                 1             )\n\
  *            (                                      ...      )\n\
  *            (                                             1 )\n\
  *  \n\
  *  where R(k) appears in rows and columns 1 and k+1.\n\
  *  \n\
  *  Similarly, when PIVOT = 'B' (Bottom pivot), the rotation is\n\
  *  performed for the plane (k,z), giving P(k) the form\n\
  *  \n\
  *     P(k) = ( 1                                             )\n\
  *            (      ...                                      )\n\
  *            (             1                                 )\n\
  *            (                  c(k)                    s(k) )\n\
  *            (                         1                     )\n\
  *            (                              ...              )\n\
  *            (                                     1         )\n\
  *            (                 -s(k)                    c(k) )\n\
  *  \n\
  *  where R(k) appears in rows and columns k and z.  The rotations are\n\
  *  performed without ever forming P(k) explicitly.\n\
  *\n\n\
  *  Arguments\n\
  *  =========\n\
  *\n\
  *  SIDE    (input) CHARACTER*1\n\
  *          Specifies whether the plane rotation matrix P is applied to\n\
  *          A on the left or the right.\n\
  *          = 'L':  Left, compute A := P*A\n\
  *          = 'R':  Right, compute A:= A*P**T\n\
  *\n\
  *  PIVOT   (input) CHARACTER*1\n\
  *          Specifies the plane for which P(k) is a plane rotation\n\
  *          matrix.\n\
  *          = 'V':  Variable pivot, the plane (k,k+1)\n\
  *          = 'T':  Top pivot, the plane (1,k+1)\n\
  *          = 'B':  Bottom pivot, the plane (k,z)\n\
  *\n\
  *  DIRECT  (input) CHARACTER*1\n\
  *          Specifies whether P is a forward or backward sequence of\n\
  *          plane rotations.\n\
  *          = 'F':  Forward, P = P(z-1)*...*P(2)*P(1)\n\
  *          = 'B':  Backward, P = P(1)*P(2)*...*P(z-1)\n\
  *\n\
  *  M       (input) INTEGER\n\
  *          The number of rows of the matrix A.  If m <= 1, an immediate\n\
  *          return is effected.\n\
  *\n\
  *  N       (input) INTEGER\n\
  *          The number of columns of the matrix A.  If n <= 1, an\n\
  *          immediate return is effected.\n\
  *\n\
  *  C       (input) REAL array, dimension\n\
  *                  (M-1) if SIDE = 'L'\n\
  *                  (N-1) if SIDE = 'R'\n\
  *          The cosines c(k) of the plane rotations.\n\
  *\n\
  *  S       (input) REAL array, dimension\n\
  *                  (M-1) if SIDE = 'L'\n\
  *                  (N-1) if SIDE = 'R'\n\
  *          The sines s(k) of the plane rotations.  The 2-by-2 plane\n\
  *          rotation part of the matrix P(k), R(k), has the form\n\
  *          R(k) = (  c(k)  s(k) )\n\
  *                 ( -s(k)  c(k) ).\n\
  *\n\
  *  A       (input/output) REAL array, dimension (LDA,N)\n\
  *          The M-by-N matrix A.  On exit, A is overwritten by P*A if\n\
  *          SIDE = 'R' or by A*P**T if SIDE = 'L'.\n\
  *\n\
  *  LDA     (input) INTEGER\n\
  *          The leading dimension of the array A.  LDA >= max(1,M).\n\
  *\n\n\
  *  =====================================================================\n\
  *\n"
