Routine: STRMVT()  File: SRC\strmvt.f

 
 
# lines: 161
  # code: 161
  # comment: 0
  # blank:0
# Variables:9
# Callers:1
# Callings:0
# Words:80
# Keywords:57
 

 

..
     .. Array Arguments ..
     ..
  Purpose
  =======
  STRMVT  performs the matrix-vector operations
     x := T' *y, and w := T *z,
  where x is an n element vector and  T is an n by n
  upper or lower triangular matrix.
  Arguments
  =========
  UPLO   - CHARACTER*1.
           On entry, UPLO specifies whether the matrix is an upper or
           lower triangular matrix as follows:
              UPLO = 'U' or 'u'   A is an upper triangular matrix.
              UPLO = 'L' or 'l'   A is a lower triangular matrix.
           Unchanged on exit.
  N      - INTEGER.
           On entry, N specifies the order of the matrix A.
           N must be at least zero.
           Unchanged on exit.
  T      - REAL array of DIMENSION ( LDT, n ).
           Before entry with  UPLO = 'U' or 'u', the leading n by n
           upper triangular part of the array T must contain the upper
           triangular matrix and the strictly lower triangular part of
           T is not referenced.
           Before entry with UPLO = 'L' or 'l', the leading n by n
           lower triangular part of the array T must contain the lower
           triangular matrix and the strictly upper triangular part of
           T is not referenced.
  LDT    - INTEGER.
           On entry, LDA specifies the first dimension of A as declared
           in the calling (sub) program. LDA must be at least
           max( 1, n ).
           Unchanged on exit.
  X      - REAL array of dimension at least
           ( 1 + ( n - 1 )*abs( INCX ) ).
           On exit, X = T' * y
  INCX   - INTEGER.
           On entry, INCX specifies the increment for the elements of
           X. INCX must not be zero.
           Unchanged on exit.
  Y      - REAL array of dimension at least
           ( 1 + ( n - 1 )*abs( INCY ) ).
           Before entry, the incremented array Y must contain the n
           element vector y.  Unchanged on exit.
  INCY   - INTEGER.
           On entry, INCY specifies the increment for the elements of
           Y. INCY must not be zero.
           Unchanged on exit.
  W      - REAL array of dimension at least
           ( 1 + ( n - 1 )*abs( INCW ) ).
           On exit, W = T * z
  INCW   - INTEGER.
           On entry, INCW specifies the increment for the elements of
           W. INCW must not be zero.
           Unchanged on exit.
  Z      - REAL array of dimension at least
           ( 1 + ( n - 1 )*abs( INCZ ) ).
           Before entry, the incremented array Z must contain the n
           element vector z.  Unchanged on exit.
  INCY   - INTEGER.
           On entrz, INCY specifies the increment for the elements of
           Y. INCY must not be zero.
           Unchanged on exit.
  Level 2 Blas routine.
     .. Local Scalars ..

 
Display dynamic version Find AutoScroll Reload FontSize: - + Hide Comments Hide Blanks Frame FullScreen MailPrint

 
01        SUBROUTINE STRMVT( UPLO , N , T , LDT , X , INCX , Y , INCY , W , INCW , Z ,
02       $INCZ )
03  
04  *     -- ScaLAPACK routine(version 1.7) --
05  *     University of Tennessee , Knoxville , Oak Ridge National Laboratory ,
06  *     and University of California , Berkeley.
07  *     March 13 , 2000
08  
09  *     .. Scalar Arguments ..
10        CHARACTER UPLO
11        INTEGER INCW , INCX , INCY , INCZ , LDT , N
12        INTEGER INFO
13  *     ..
14  *     .. External Functions ..
15        LOGICAL LSAME
16        EXTERNAL LSAME
17  *     ..
18  *     .. External Subroutines ..
19        EXTERNAL SCOPY , STRMV , XERBLA
20  *     ..
21  *     .. Intrinsic Functions ..
22        INTRINSIC MAX
23  *     ..
24  *     .. Executable Statements ..
25  
26  *     Test the input parameters.
27  
28        INFO = 0
29        IF( .NOT.LSAME( UPLO , 'U' ) .AND. .NOT.LSAME( UPLO , 'L' ) ) THEN
30            INFO = 1
31        ELSE IF( N.LT.0 ) THEN
32            INFO = 2
33        ELSE IF( LDT.LT.MAX( 1 , N ) ) THEN
34            INFO = 4
35        ELSE IF( INCW.EQ.0 ) THEN
36            INFO = 6
37        ELSE IF( INCX.EQ.0 ) THEN
38            INFO = 8
39        ELSE IF( INCY.EQ.0 ) THEN
40            INFO = 10
41        ELSE IF( INCZ.EQ.0 ) THEN
42            INFO = 12
43        END IF
44        IF( INFO.NE.0 ) THEN
45            CALL XERBLA( 'STRMVT' , INFO )
46            RETURN
47        END IF
48  
49  *     Quick return if possible.
50  
51        IF( N.EQ.0 )
52       $    RETURN
53  
54            IF( INCX.NE.1 .OR. INCY.NE.1 .OR. INCW.NE.1 .OR. INCZ.NE.1 .OR.
55       $        .TRUE. ) THEN
56                CALL SCOPY( N , Y , INCY , X , INCX )
57                CALL STRMV( UPLO , 'C' , 'N' , N , T , LDT , X , INCX )
58                CALL SCOPY( N , Z , INCZ , W , INCW )
59                CALL STRMV( UPLO , 'N' , 'N' , N , T , LDT , W , INCW )
60                RETURN
61            END IF
62  
63            RETURN
64  
65  *         End of STRMVT.
66  
67        END