ScaLAPACK  2.0.2 ScaLAPACK: Scalable Linear Algebra PACKage
dtrmvt.f
Go to the documentation of this file.
```00001       SUBROUTINE DTRMVT( UPLO, N, T, LDT, X, INCX, Y, INCY, W, INCW, Z,
00002      \$                   INCZ )
00003 *
00004 *  -- ScaLAPACK routine (version 1.7) --
00005 *     University of Tennessee, Knoxville, Oak Ridge National Laboratory,
00006 *     and University of California, Berkeley.
00007 *     March 13, 2000
00008 *
00009 *     .. Scalar Arguments ..
00010       CHARACTER          UPLO
00011       INTEGER            INCW, INCX, INCY, INCZ, LDT, N
00012 *     ..
00013 *     .. Array Arguments ..
00014       DOUBLE PRECISION   T( LDT, * ), W( * ), X( * ), Y( * ), Z( * )
00015 *     ..
00016 *
00017 *  Purpose
00018 *  =======
00019 *
00020 *  DTRMVT  performs the matrix-vector operations
00021 *
00022 *     x := T' *y, and w := T *z,
00023 *
00024 *  where x is an n element vector and  T is an n by n
00025 *  upper or lower triangular matrix.
00026 *
00027 *  Arguments
00028 *  =========
00029 *
00030 *  UPLO   - CHARACTER*1.
00031 *           On entry, UPLO specifies whether the matrix is an upper or
00032 *           lower triangular matrix as follows:
00033 *
00034 *              UPLO = 'U' or 'u'   A is an upper triangular matrix.
00035 *
00036 *              UPLO = 'L' or 'l'   A is a lower triangular matrix.
00037 *
00038 *           Unchanged on exit.
00039 *
00040 *  N      - INTEGER.
00041 *           On entry, N specifies the order of the matrix A.
00042 *           N must be at least zero.
00043 *           Unchanged on exit.
00044 *
00045 *  T      - DOUBLE PRECISION array of DIMENSION ( LDT, n ).
00046 *           Before entry with  UPLO = 'U' or 'u', the leading n by n
00047 *           upper triangular part of the array T must contain the upper
00048 *           triangular matrix and the strictly lower triangular part of
00049 *           T is not referenced.
00050 *           Before entry with UPLO = 'L' or 'l', the leading n by n
00051 *           lower triangular part of the array T must contain the lower
00052 *           triangular matrix and the strictly upper triangular part of
00053 *           T is not referenced.
00054 *
00055 *  LDT    - INTEGER.
00056 *           On entry, LDA specifies the first dimension of A as declared
00057 *           in the calling (sub) program. LDA must be at least
00058 *           max( 1, n ).
00059 *           Unchanged on exit.
00060 *
00061 *  X      - DOUBLE PRECISION array of dimension at least
00062 *           ( 1 + ( n - 1 )*abs( INCX ) ).
00063 *           On exit, X = T' * y
00064 *
00065 *  INCX   - INTEGER.
00066 *           On entry, INCX specifies the increment for the elements of
00067 *           X. INCX must not be zero.
00068 *           Unchanged on exit.
00069 *
00070 *  Y      - DOUBLE PRECISION array of dimension at least
00071 *           ( 1 + ( n - 1 )*abs( INCY ) ).
00072 *           Before entry, the incremented array Y must contain the n
00073 *           element vector y.  Unchanged on exit.
00074 *
00075 *  INCY   - INTEGER.
00076 *           On entry, INCY specifies the increment for the elements of
00077 *           Y. INCY must not be zero.
00078 *           Unchanged on exit.
00079 *
00080 *  W      - DOUBLE PRECISION array of dimension at least
00081 *           ( 1 + ( n - 1 )*abs( INCW ) ).
00082 *           On exit, W = T * z
00083 *
00084 *  INCW   - INTEGER.
00085 *           On entry, INCW specifies the increment for the elements of
00086 *           W. INCW must not be zero.
00087 *           Unchanged on exit.
00088 *
00089 *  Z      - DOUBLE PRECISION array of dimension at least
00090 *           ( 1 + ( n - 1 )*abs( INCZ ) ).
00091 *           Before entry, the incremented array Z must contain the n
00092 *           element vector z.  Unchanged on exit.
00093 *
00094 *  INCY   - INTEGER.
00095 *           On entrz, INCY specifies the increment for the elements of
00096 *           Y. INCY must not be zero.
00097 *           Unchanged on exit.
00098 *
00099 *
00100 *  Level 2 Blas routine.
00101 *
00102 *
00103 *     .. Local Scalars ..
00104       INTEGER            INFO
00105 *     ..
00106 *     .. External Functions ..
00107       LOGICAL            LSAME
00108       EXTERNAL           LSAME
00109 *     ..
00110 *     .. External Subroutines ..
00111       EXTERNAL           DCOPY, DTRMV, XERBLA
00112 *     ..
00113 *     .. Intrinsic Functions ..
00114       INTRINSIC          MAX
00115 *     ..
00116 *     .. Executable Statements ..
00117 *
00118 *     Test the input parameters.
00119 *
00120       INFO = 0
00121       IF( .NOT.LSAME( UPLO, 'U' ) .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
00122          INFO = 1
00123       ELSE IF( N.LT.0 ) THEN
00124          INFO = 2
00125       ELSE IF( LDT.LT.MAX( 1, N ) ) THEN
00126          INFO = 4
00127       ELSE IF( INCW.EQ.0 ) THEN
00128          INFO = 6
00129       ELSE IF( INCX.EQ.0 ) THEN
00130          INFO = 8
00131       ELSE IF( INCY.EQ.0 ) THEN
00132          INFO = 10
00133       ELSE IF( INCZ.EQ.0 ) THEN
00134          INFO = 12
00135       END IF
00136       IF( INFO.NE.0 ) THEN
00137          CALL XERBLA( 'DTRMVT', INFO )
00138          RETURN
00139       END IF
00140 *
00141 *     Quick return if possible.
00142 *
00143       IF( N.EQ.0 )
00144      \$   RETURN
00145 *
00146 *
00147 *
00148       IF( INCX.NE.1 .OR. INCY.NE.1 .OR. INCW.NE.1 .OR. INCZ.NE.1 .OR.
00149      \$    .TRUE. ) THEN
00150          CALL DCOPY( N, Y, INCY, X, INCX )
00151          CALL DTRMV( UPLO, 'C', 'N', N, T, LDT, X, INCX )
00152          CALL DCOPY( N, Z, INCZ, W, INCW )
00153          CALL DTRMV( UPLO, 'N', 'N', N, T, LDT, W, INCW )
00154          RETURN
00155       END IF
00156 *
00157       RETURN
00158 *
00159 *     End of DTRMVT.
00160 *
00161       END
```