~ubuntu-branches/ubuntu/vivid/atlas/vivid

« back to all changes in this revision

Viewing changes to interfaces/blas/F77/src/ztpmv.f

  • Committer: Bazaar Package Importer
  • Author(s): Camm Maguire
  • Date: 2002-04-13 10:07:52 UTC
  • Revision ID: james.westby@ubuntu.com-20020413100752-va9zm0rd4gpurdkq
Tags: upstream-3.2.1ln
ImportĀ upstreamĀ versionĀ 3.2.1ln

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
      SUBROUTINE ZTPMV( UPLO, TRANS, DIAG, N, A, X, INCX )
 
2
*
 
3
*  -- Automatically Tuned Linear Algebra Software (ATLAS)
 
4
*     (C) Copyright 2000 All Rights Reserved
 
5
*
 
6
*  -- ATLAS routine -- F77 Interface -- Version 3.2 -- December 15, 2000
 
7
*
 
8
*  -- Suggestions,  comments,  bugs reports should be sent to the follo-
 
9
*     wing e-mail address: atlas@cs.utk.edu
 
10
*
 
11
*  Author         : Antoine P. Petitet
 
12
*  University of Tennessee - Innovative Computing Laboratory
 
13
*  Knoxville TN, 37996-1301, USA.
 
14
*
 
15
*  ---------------------------------------------------------------------
 
16
*
 
17
*  -- Copyright notice and Licensing terms:
 
18
*
 
19
*  Redistribution  and  use in  source and binary forms, with or without
 
20
*  modification, are  permitted provided  that the following  conditions
 
21
*  are met:
 
22
*
 
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-
 
28
*     bution.
 
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.
 
32
*
 
33
*  -- Disclaimer:
 
34
*
 
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.
 
46
*
 
47
*  ---------------------------------------------------------------------
 
48
*
 
49
*     .. Scalar Arguments ..
 
50
      CHARACTER*1        DIAG, TRANS, UPLO
 
51
      INTEGER            INCX, N
 
52
*     ..
 
53
*     .. Array Arguments ..
 
54
      COMPLEX*16         A( * ), X( * )
 
55
*     ..
 
56
*
 
57
*  Purpose
 
58
*  =======
 
59
*
 
60
*  ZTPMV performs one of the matrix-vector operations
 
61
*
 
62
*     x := A*x,   or   x := A'*x,   or   x := conjg( A' )*x,
 
63
*
 
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.
 
66
*
 
67
*  Arguments
 
68
*  =========
 
69
*
 
70
*  UPLO    (input)                       CHARACTER*1
 
71
*          On entry, UPLO  specifies whether  the  matrix is an upper or
 
72
*          lower triangular matrix as follows:
 
73
*
 
74
*              UPLO = 'U' or 'u'   A is an upper triangular matrix.
 
75
*
 
76
*              UPLO = 'L' or 'l'   A is a lower triangular matrix.
 
77
*
 
78
*          Unchanged on exit.
 
79
*
 
80
*  TRANS   (input)                       CHARACTER*1
 
81
*          On entry,  TRANS  specifies the  operation to be performed as
 
82
*          follows:
 
83
*
 
84
*             TRANS = 'N' or 'n'   x := A *x,
 
85
*
 
86
*             TRANS = 'T' or 't'   x := A'*x,
 
87
*
 
88
*             TRANS = 'C' or 'c'   x := conjg( A' )*x.
 
89
*
 
90
*          Unchanged on exit.
 
91
*
 
92
*  DIAG    (input)                       CHARACTER*1
 
93
*          On entry, DIAG specifies whether or not A is unit triangu-
 
94
*          lar as follows:
 
95
*
 
96
*             DIAG = 'U' or 'u'   A is assumed to be unit triangular.
 
97
*
 
98
*             DIAG = 'N' or 'n'   A is not assumed to be unit
 
99
*                                 triangular.
 
100
*
 
101
*          Unchanged on exit.
 
102
*
 
103
*  N       (input)                       INTEGER
 
104
*          On entry, N specifies the order of the matrix A. N must be at
 
105
*          least zero. Unchanged on exit.
 
106
*
 
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
 
119
*          exit.
 
120
*
 
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.
 
126
*
 
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.
 
130
*
 
131
*  Further Details
 
132
*  ===============
 
133
*
 
134
*  For further information on the Level 1 BLAS specification, see:
 
135
*
 
136
*  ``A Proposal for Standard Linear Algebra Subprograms''  by R. Hanson,
 
137
*  F. Krogh and C. Lawson, ACM SIGNUM Newsl., 8(16), 1973,
 
138
*
 
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.
 
142
*
 
143
*  For further information on the Level 2 BLAS specification, see:
 
144
*
 
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.
 
148
*
 
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.
 
153
*
 
154
*  For further information on the Level 3 BLAS specification, see:
 
155
*
 
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.
 
159
*
 
160
*  =====================================================================
 
161
*
 
162
*     .. Parameters ..
 
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 )
 
169
*     ..
 
170
*     .. Local Scalars ..
 
171
      INTEGER            IDIAG, INFO, ITRANS, IUPLO
 
172
*     ..
 
173
*     .. External Subroutines ..
 
174
      EXTERNAL           ATL_F77WRAP_ZTPMV, XERBLA
 
175
*     ..
 
176
*     .. External Functions ..
 
177
      EXTERNAL           LSAME
 
178
      LOGICAL            LSAME
 
179
*     ..
 
180
*     .. Executable Statements ..
 
181
*
 
182
      INFO = 0
 
183
*
 
184
      IF(      LSAME( UPLO , 'U' ) ) THEN
 
185
         IUPLO = IUPPER
 
186
      ELSE IF( LSAME( UPLO , 'L' ) ) THEN
 
187
         IUPLO = ILOWER
 
188
      ELSE IF( INFO.EQ.0 ) THEN
 
189
         INFO  = 1
 
190
      END IF
 
191
*
 
192
      IF(      LSAME( TRANS, 'N' ) ) THEN
 
193
         ITRANS = INOTRAN
 
194
      ELSE IF( LSAME( TRANS, 'T' ) ) THEN
 
195
         ITRANS = ITRAN
 
196
      ELSE IF( LSAME( TRANS, 'C' ) ) THEN
 
197
         ITRANS = ICOTRAN
 
198
      ELSE IF( INFO.EQ.0 ) THEN
 
199
         INFO   = 2
 
200
      END IF
 
201
*
 
202
      IF(      LSAME( DIAG , 'N' ) ) THEN
 
203
         IDIAG = INONUNIT
 
204
      ELSE IF( LSAME( DIAG , 'U' ) ) THEN
 
205
         IDIAG = IUNIT
 
206
      ELSE IF( INFO.EQ.0 ) THEN
 
207
         INFO  = 3
 
208
      END IF
 
209
*
 
210
      IF( INFO.EQ.0 ) THEN
 
211
         IF( N.LT.0 ) THEN
 
212
            INFO = 4
 
213
         ELSE IF( INCX.EQ.0 ) THEN
 
214
            INFO = 7
 
215
         END IF
 
216
      END IF
 
217
*
 
218
      IF( INFO.NE.0 ) THEN
 
219
         CALL XERBLA( 'ZTPMV ', INFO )
 
220
         RETURN
 
221
      END IF
 
222
*
 
223
      CALL ATL_F77WRAP_ZTPMV( IUPLO, ITRANS, IDIAG, N, A, X, INCX )
 
224
*
 
225
      RETURN
 
226
*
 
227
*     End of ZTPMV
 
228
*
 
229
      END