1
SUBROUTINE ZGBMV( TRANS, M, N, KL, KU, ALPHA, A, LDA, X, INCX,
4
* -- Automatically Tuned Linear Algebra Software (ATLAS)
5
* (C) Copyright 2000 All Rights Reserved
7
* -- ATLAS routine -- F77 Interface -- Version 3.2 -- December 15, 2000
9
* -- Suggestions, comments, bugs reports should be sent to the follo-
10
* wing e-mail address: atlas@cs.utk.edu
12
* Author : Antoine P. Petitet
13
* University of Tennessee - Innovative Computing Laboratory
14
* Knoxville TN, 37996-1301, USA.
16
* ---------------------------------------------------------------------
18
* -- Copyright notice and Licensing terms:
20
* Redistribution and use in source and binary forms, with or without
21
* modification, are permitted provided that the following conditions
24
* 1. Redistributions of source code must retain the above copyright
25
* notice, this list of conditions and the following disclaimer.
26
* 2. Redistributions in binary form must reproduce the above copyright
27
* notice, this list of conditions, and the following disclaimer in
28
* the documentation and/or other materials provided with the distri-
30
* 3. The name of the University, the ATLAS group, or the names of its
31
* contributors may not be used to endorse or promote products deri-
32
* ved from this software without specific written permission.
36
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
37
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
38
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
39
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY
40
* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE-
41
* CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
42
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
43
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEO-
44
* RY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (IN-
45
* CLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
46
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
48
* ---------------------------------------------------------------------
50
* .. Scalar Arguments ..
52
INTEGER INCX, INCY, KL, KU, LDA, M, N
53
COMPLEX*16 ALPHA, BETA
55
* .. Array Arguments ..
56
COMPLEX*16 A( LDA, * ), X( * ), Y( * )
62
* ZGBMV performs one of the matrix-vector operations
64
* y := alpha*A*x + beta*y, or y := alpha*A'*x + beta*y, or
66
* y := alpha*conjg( A' )*x + beta*y,
68
* where alpha and beta are scalars, x and y are vectors and A is an m
69
* by n band matrix, with kl sub-diagonals and ku super-diagonals.
74
* TRANS (input) CHARACTER*1
75
* On entry, TRANS specifies the operation to be performed as
78
* TRANS = 'N' or 'n', y := alpha*A *x + beta*y,
80
* TRANS = 'T' or 't', y := alpha*A'*x + beta*y,
82
* TRANS = 'C' or 'c', y := alpha*conjg( A' )*x + beta*y.
87
* On entry, M specifies the number of rows of the matrix A.
88
* M must be at least zero. Unchanged on exit.
91
* On entry, N specifies the number of columns of the matrix A.
92
* N must be at least zero. Unchanged on exit.
95
* On entry, KL specifies the number of sub-diagonals of the ma-
96
* trix A. KL must satisfy 0 .le. KL. Unchanged on exit.
99
* On entry, KU specifies the number of super-diagonals of the
100
* matrix A. KU must satisfy 0 .le. KU. Unchanged on exit.
102
* ALPHA (input) COMPLEX*16
103
* On entry, ALPHA specifies the scalar alpha. When ALPHA is
104
* supplied as zero then A and X need not be set on input. Un-
107
* A (input) COMPLEX*16 array
108
* On entry, A is an array of DIMENSION ( LDA, n ). Before en-
109
* try, the leading (kl+ku+1) by n part of the array A must con-
110
* tain the matrix of coefficients, supplied column by column,
111
* with the leading diagonal of the matrix in row (ku+1) of the
112
* array, the first super-diagonal starting at position 2 in row
113
* ku, the first sub-diagonal starting at position 1 in row
114
* (ku+2), and so on. Elements in the array A that do not cor-
115
* respond to elements in the band matrix (such as the top left
116
* ku by ku triangle) are not referenced.
117
* The following program segment will transfer a band matrix
118
* from conventional full matrix storage to band storage:
122
* DO 10, I = MAX( 1, J - KU ), MIN( M, J + KL )
123
* A( K + I, J ) = matrix( I, J )
129
* LDA (input) INTEGER
130
* On entry, LDA specifies the first dimension of A as declared
131
* in the calling (sub) program. LDA must be at least (kl+ku+1).
134
* X (input) COMPLEX*16 array
135
* On entry, X is an incremented array of dimension at least
136
* ( 1 + ( n - 1 ) * abs( INCX ) ) when TRANS = 'N' or 'n' and
137
* at least ( 1 + ( m - 1 ) * abs( INCX ) ) otherwise. Before
138
* entry, the incremented array X must contain the vector x. Un-
141
* INCX (input) INTEGER
142
* On entry, INCX specifies the increment for the elements of X.
143
* INCX must not be zero. Unchanged on exit.
145
* BETA (input) COMPLEX*16
146
* On entry, BETA specifies the scalar beta. When BETA is
147
* supplied as zero then Y need not be set on input. Unchanged
150
* Y (input/output) COMPLEX*16 array
151
* On entry, Y is an incremented array of dimension at least
152
* ( 1 + ( m - 1 ) * abs( INCY ) ) when TRANS = 'N' or 'n' and
153
* at least ( 1 + ( n - 1 ) * abs( INCY ) ) otherwise. Before
154
* entry with BETA non-zero, the incremented array Y must con-
155
* tain the vector y. On exit, Y is overwritten by the updated
158
* INCY (input) INTEGER
159
* On entry, INCY specifies the increment for the elements of Y.
160
* INCY must not be zero. Unchanged on exit.
165
* For further information on the Level 1 BLAS specification, see:
167
* ``A Proposal for Standard Linear Algebra Subprograms'' by R. Hanson,
168
* F. Krogh and C. Lawson, ACM SIGNUM Newsl., 8(16), 1973,
170
* ``Basic Linear Algebra Subprograms for Fortran Usage'' by C. Lawson,
171
* R. Hanson, D. Kincaid and F. Krogh, ACM Transactions on Mathematical
172
* Software, 5(3) pp 308-323, 1979.
174
* For further information on the Level 2 BLAS specification, see:
176
* ``An Extended Set of FORTRAN Basic Linear Algebra Subprograms'' by
177
* J. Dongarra, J. Du Croz, S. Hammarling and R. Hanson, ACM Transac-
178
* tions on Mathematical Software, 14(1) pp 1-17, 1988.
180
* ``Algorithm 656: An extended Set of Basic Linear Algebra Subprograms:
181
* Model Implementation and Test Programs'' by J. Dongarra, J. Du Croz,
182
* S. Hammarling and R. Hanson, ACM Transactions on Mathematical Soft-
183
* ware, 14(1) pp 18-32, 1988.
185
* For further information on the Level 3 BLAS specification, see:
187
* ``A Set of Level 3 Basic Linear Algebra Subprograms'' by J. Dongarra,
188
* J. Du Croz, I. Duff and S. Hammarling, ACM Transactions on Mathemati-
189
* cal Software, 16(1), pp 1-17, 1990.
191
* =====================================================================
194
INTEGER ICOTRAN, INOTRAN, ITRAN
195
PARAMETER ( INOTRAN = 111, ITRAN = 112, ICOTRAN = 113 )
197
* .. Local Scalars ..
200
* .. External Subroutines ..
201
EXTERNAL ATL_F77WRAP_ZGBMV, XERBLA
203
* .. External Functions ..
207
* .. Executable Statements ..
211
IF( LSAME( TRANS, 'N' ) ) THEN
213
ELSE IF( LSAME( TRANS, 'T' ) ) THEN
215
ELSE IF( LSAME( TRANS, 'C' ) ) THEN
217
ELSE IF( INFO.EQ.0 ) THEN
224
ELSE IF( N.LT.0 ) THEN
226
ELSE IF( KL.LT.0 ) THEN
228
ELSE IF( KU.LT.0 ) THEN
230
ELSE IF( LDA.LT.( KL + KU + 1 ) ) THEN
232
ELSE IF( INCX.EQ.0 ) THEN
234
ELSE IF( INCY.EQ.0 ) THEN
240
CALL XERBLA( 'ZGBMV ', INFO )
244
CALL ATL_F77WRAP_ZGBMV( ITRANS, M, N, KL, KU, ALPHA, A, LDA,
245
$ X, INCX, BETA, Y, INCY )