Annotation of rpl/lapack/lapack/zlacrt.f, revision 1.7

1.1       bertrand    1:       SUBROUTINE ZLACRT( N, CX, INCX, CY, INCY, C, S )
                      2: *
                      3: *  -- LAPACK auxiliary routine (version 3.2) --
                      4: *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
                      5: *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
                      6: *     November 2006
                      7: *
                      8: *     .. Scalar Arguments ..
                      9:       INTEGER            INCX, INCY, N
                     10:       COMPLEX*16         C, S
                     11: *     ..
                     12: *     .. Array Arguments ..
                     13:       COMPLEX*16         CX( * ), CY( * )
                     14: *     ..
                     15: *
                     16: *  Purpose
                     17: *  =======
                     18: *
                     19: *  ZLACRT performs the operation
                     20: *
                     21: *     (  c  s )( x )  ==> ( x )
                     22: *     ( -s  c )( y )      ( y )
                     23: *
                     24: *  where c and s are complex and the vectors x and y are complex.
                     25: *
                     26: *  Arguments
                     27: *  =========
                     28: *
                     29: *  N       (input) INTEGER
                     30: *          The number of elements in the vectors CX and CY.
                     31: *
                     32: *  CX      (input/output) COMPLEX*16 array, dimension (N)
                     33: *          On input, the vector x.
                     34: *          On output, CX is overwritten with c*x + s*y.
                     35: *
                     36: *  INCX    (input) INTEGER
                     37: *          The increment between successive values of CX.  INCX <> 0.
                     38: *
                     39: *  CY      (input/output) COMPLEX*16 array, dimension (N)
                     40: *          On input, the vector y.
                     41: *          On output, CY is overwritten with -s*x + c*y.
                     42: *
                     43: *  INCY    (input) INTEGER
                     44: *          The increment between successive values of CY.  INCY <> 0.
                     45: *
                     46: *  C       (input) COMPLEX*16
                     47: *  S       (input) COMPLEX*16
                     48: *          C and S define the matrix
                     49: *             [  C   S  ].
                     50: *             [ -S   C  ]
                     51: *
                     52: * =====================================================================
                     53: *
                     54: *     .. Local Scalars ..
                     55:       INTEGER            I, IX, IY
                     56:       COMPLEX*16         CTEMP
                     57: *     ..
                     58: *     .. Executable Statements ..
                     59: *
                     60:       IF( N.LE.0 )
                     61:      $   RETURN
                     62:       IF( INCX.EQ.1 .AND. INCY.EQ.1 )
                     63:      $   GO TO 20
                     64: *
                     65: *     Code for unequal increments or equal increments not equal to 1
                     66: *
                     67:       IX = 1
                     68:       IY = 1
                     69:       IF( INCX.LT.0 )
                     70:      $   IX = ( -N+1 )*INCX + 1
                     71:       IF( INCY.LT.0 )
                     72:      $   IY = ( -N+1 )*INCY + 1
                     73:       DO 10 I = 1, N
                     74:          CTEMP = C*CX( IX ) + S*CY( IY )
                     75:          CY( IY ) = C*CY( IY ) - S*CX( IX )
                     76:          CX( IX ) = CTEMP
                     77:          IX = IX + INCX
                     78:          IY = IY + INCY
                     79:    10 CONTINUE
                     80:       RETURN
                     81: *
                     82: *     Code for both increments equal to 1
                     83: *
                     84:    20 CONTINUE
                     85:       DO 30 I = 1, N
                     86:          CTEMP = C*CX( I ) + S*CY( I )
                     87:          CY( I ) = C*CY( I ) - S*CX( I )
                     88:          CX( I ) = CTEMP
                     89:    30 CONTINUE
                     90:       RETURN
                     91:       END

CVSweb interface <joel.bertrand@systella.fr>