1
SUBROUTINE ZTPMV( UPLO, TRANS, DIAG, N, A, X, INCX )
3
* -- Automatically Tuned Linear Algebra Software (ATLAS)
4
* (C) Copyright 2000 All Rights Reserved
6
* -- ATLAS routine -- F77 Interface -- Version 3.2 -- December 15, 2000
8
* -- Suggestions, comments, bugs reports should be sent to the follo-
9
* wing e-mail address: atlas@cs.utk.edu
11
* Author : Antoine P. Petitet
12
* University of Tennessee - Innovative Computing Laboratory
13
* Knoxville TN, 37996-1301, USA.
15
* ---------------------------------------------------------------------
17
* -- Copyright notice and Licensing terms:
19
* Redistribution and use in source and binary forms, with or without
20
* modification, are permitted provided that the following conditions
23
* 1. Redistributions of source code must retain the above copyright
24
* notice, this list of conditions and the following disclaimer.
25
* 2. Redistributions in binary form must reproduce the above copyright
26
* notice, this list of conditions, and the following disclaimer in
27
* the documentation and/or other materials provided with the distri-
29
* 3. The name of the University, the ATLAS group, or the names of its
30
* contributors may not be used to endorse or promote products deri-
31
* ved from this software without specific written permission.
35
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
36
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
37
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
38
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY
39
* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE-
40
* CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
41
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
42
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEO-
43
* RY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (IN-
44
* CLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
45
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
47
* ---------------------------------------------------------------------
49
* .. Scalar Arguments ..
50
CHARACTER*1 DIAG, TRANS, UPLO
53
* .. Array Arguments ..
54
COMPLEX*16 A( * ), X( * )
60
* ZTPMV performs one of the matrix-vector operations
62
* x := A*x, or x := A'*x, or x := conjg( A' )*x,
64
* where x is an n-element vector and A is an n by n unit, or non-unit,
65
* upper or lower triangular matrix, supplied in packed form.
70
* UPLO (input) CHARACTER*1
71
* On entry, UPLO specifies whether the matrix is an upper or
72
* lower triangular matrix as follows:
74
* UPLO = 'U' or 'u' A is an upper triangular matrix.
76
* UPLO = 'L' or 'l' A is a lower triangular matrix.
80
* TRANS (input) CHARACTER*1
81
* On entry, TRANS specifies the operation to be performed as
84
* TRANS = 'N' or 'n' x := A *x,
86
* TRANS = 'T' or 't' x := A'*x,
88
* TRANS = 'C' or 'c' x := conjg( A' )*x.
92
* DIAG (input) CHARACTER*1
93
* On entry, DIAG specifies whether or not A is unit triangu-
96
* DIAG = 'U' or 'u' A is assumed to be unit triangular.
98
* DIAG = 'N' or 'n' A is not assumed to be unit
104
* On entry, N specifies the order of the matrix A. N must be at
105
* least zero. Unchanged on exit.
107
* A (input) COMPLEX*16 array
108
* On entry, A is an array of DIMENSION ( ( n*( n + 1 ) )/2 ).
109
* Before entry with UPLO = 'U' or 'u', the array A must contain
110
* the upper triangular matrix packed sequentially, column by
111
* column, so that A( 1 ) contains a( 1, 1 ), A( 2 ) and A( 3 )
112
* contain a( 1, 2 ) and a( 2, 2 ) respectively, and so on. Be-
113
* fore entry with UPLO = 'L' or 'l', the array A must contain
114
* the lower triangular matrix packed sequentially, column by
115
* column, so that A( 1 ) contains a( 1, 1 ), A( 2 ) and A( 3 )
116
* contain a( 2, 1 ) and a( 3, 1 ) respectively, and so on. Note
117
* that when DIAG = 'U' or 'u', the diagonal elements of A are
118
* not referenced, but are assumed to be unity. Unchanged on
121
* X (input/output) COMPLEX*16 array
122
* On entry, X is an incremented array of dimension at least
123
* ( 1 + ( n - 1 ) * abs( INCX ) ). Before entry, the incremen-
124
* ted array X must contain the vector x. On exit, X is overwri-
125
* tten with the tranformed vector x.
127
* INCX (input) INTEGER
128
* On entry, INCX specifies the increment for the elements of X.
129
* INCX must not be zero. Unchanged on exit.
134
* For further information on the Level 1 BLAS specification, see:
136
* ``A Proposal for Standard Linear Algebra Subprograms'' by R. Hanson,
137
* F. Krogh and C. Lawson, ACM SIGNUM Newsl., 8(16), 1973,
139
* ``Basic Linear Algebra Subprograms for Fortran Usage'' by C. Lawson,
140
* R. Hanson, D. Kincaid and F. Krogh, ACM Transactions on Mathematical
141
* Software, 5(3) pp 308-323, 1979.
143
* For further information on the Level 2 BLAS specification, see:
145
* ``An Extended Set of FORTRAN Basic Linear Algebra Subprograms'' by
146
* J. Dongarra, J. Du Croz, S. Hammarling and R. Hanson, ACM Transac-
147
* tions on Mathematical Software, 14(1) pp 1-17, 1988.
149
* ``Algorithm 656: An extended Set of Basic Linear Algebra Subprograms:
150
* Model Implementation and Test Programs'' by J. Dongarra, J. Du Croz,
151
* S. Hammarling and R. Hanson, ACM Transactions on Mathematical Soft-
152
* ware, 14(1) pp 18-32, 1988.
154
* For further information on the Level 3 BLAS specification, see:
156
* ``A Set of Level 3 Basic Linear Algebra Subprograms'' by J. Dongarra,
157
* J. Du Croz, I. Duff and S. Hammarling, ACM Transactions on Mathemati-
158
* cal Software, 16(1), pp 1-17, 1990.
160
* =====================================================================
163
INTEGER ILOWER, IUPPER
164
PARAMETER ( IUPPER = 121, ILOWER = 122 )
165
INTEGER ICOTRAN, INOTRAN, ITRAN
166
PARAMETER ( INOTRAN = 111, ITRAN = 112, ICOTRAN = 113 )
167
INTEGER INONUNIT, IUNIT
168
PARAMETER ( INONUNIT = 131, IUNIT = 132 )
170
* .. Local Scalars ..
171
INTEGER IDIAG, INFO, ITRANS, IUPLO
173
* .. External Subroutines ..
174
EXTERNAL ATL_F77WRAP_ZTPMV, XERBLA
176
* .. External Functions ..
180
* .. Executable Statements ..
184
IF( LSAME( UPLO , 'U' ) ) THEN
186
ELSE IF( LSAME( UPLO , 'L' ) ) THEN
188
ELSE IF( INFO.EQ.0 ) THEN
192
IF( LSAME( TRANS, 'N' ) ) THEN
194
ELSE IF( LSAME( TRANS, 'T' ) ) THEN
196
ELSE IF( LSAME( TRANS, 'C' ) ) THEN
198
ELSE IF( INFO.EQ.0 ) THEN
202
IF( LSAME( DIAG , 'N' ) ) THEN
204
ELSE IF( LSAME( DIAG , 'U' ) ) THEN
206
ELSE IF( INFO.EQ.0 ) THEN
213
ELSE IF( INCX.EQ.0 ) THEN
219
CALL XERBLA( 'ZTPMV ', INFO )
223
CALL ATL_F77WRAP_ZTPMV( IUPLO, ITRANS, IDIAG, N, A, X, INCX )