LAPACK  3.6.1 LAPACK: Linear Algebra PACKage
 subroutine dla_gbamv ( integer TRANS, integer M, integer N, integer KL, integer KU, double precision ALPHA, double precision, dimension( ldab, * ) AB, integer LDAB, double precision, dimension( * ) X, integer INCX, double precision BETA, double precision, dimension( * ) Y, integer INCY )

DLA_GBAMV performs a matrix-vector operation to calculate error bounds.

Purpose:
``` DLA_GBAMV  performs one of the matrix-vector operations

y := alpha*abs(A)*abs(x) + beta*abs(y),
or   y := alpha*abs(A)**T*abs(x) + beta*abs(y),

where alpha and beta are scalars, x and y are vectors and A is an
m by n matrix.

This function is primarily used in calculating error bounds.
To protect against underflow during evaluation, components in
the resulting vector are perturbed away from zero by (N+1)
times the underflow threshold.  To prevent unnecessarily large
errors for block-structure embedded in general matrices,
"symbolically" zero components are not perturbed.  A zero
entry is considered "symbolic" if all multiplications involved
in computing that entry have at least one zero multiplicand.```
Parameters
 [in] TRANS ``` TRANS is INTEGER On entry, TRANS specifies the operation to be performed as follows: BLAS_NO_TRANS y := alpha*abs(A)*abs(x) + beta*abs(y) BLAS_TRANS y := alpha*abs(A**T)*abs(x) + beta*abs(y) BLAS_CONJ_TRANS y := alpha*abs(A**T)*abs(x) + beta*abs(y) Unchanged on exit.``` [in] M ``` M is INTEGER On entry, M specifies the number of rows of the matrix A. M must be at least zero. Unchanged on exit.``` [in] N ``` N is INTEGER On entry, N specifies the number of columns of the matrix A. N must be at least zero. Unchanged on exit.``` [in] KL ``` KL is INTEGER The number of subdiagonals within the band of A. KL >= 0.``` [in] KU ``` KU is INTEGER The number of superdiagonals within the band of A. KU >= 0.``` [in] ALPHA ``` ALPHA is DOUBLE PRECISION On entry, ALPHA specifies the scalar alpha. Unchanged on exit.``` [in] AB ``` AB is DOUBLE PRECISION array of DIMENSION ( LDAB, n ) Before entry, the leading m by n part of the array AB must contain the matrix of coefficients. Unchanged on exit.``` [in] LDAB ``` LDAB is INTEGER On entry, LDA specifies the first dimension of AB as declared in the calling (sub) program. LDAB must be at least max( 1, m ). Unchanged on exit.``` [in] X ``` X is DOUBLE PRECISION array, dimension ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n' and at least ( 1 + ( m - 1 )*abs( INCX ) ) otherwise. Before entry, the incremented array X must contain the vector x. Unchanged on exit.``` [in] INCX ``` INCX is INTEGER On entry, INCX specifies the increment for the elements of X. INCX must not be zero. Unchanged on exit.``` [in] BETA ``` BETA is DOUBLE PRECISION On entry, BETA specifies the scalar beta. When BETA is supplied as zero then Y need not be set on input. Unchanged on exit.``` [in,out] Y ``` Y is DOUBLE PRECISION array, dimension ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n' and at least ( 1 + ( n - 1 )*abs( INCY ) ) otherwise. Before entry with BETA non-zero, the incremented array Y must contain the vector y. On exit, Y is overwritten by the updated vector y.``` [in] INCY ``` INCY is INTEGER On entry, INCY specifies the increment for the elements of Y. INCY must not be zero. Unchanged on exit. Level 2 Blas routine.```
Date
September 2012

Definition at line 187 of file dla_gbamv.f.

187 *
188 * -- LAPACK computational routine (version 3.4.2) --
189 * -- LAPACK is a software package provided by Univ. of Tennessee, --
190 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
191 * September 2012
192 *
193 * .. Scalar Arguments ..
194  DOUBLE PRECISION alpha, beta
195  INTEGER incx, incy, ldab, m, n, kl, ku, trans
196 * ..
197 * .. Array Arguments ..
198  DOUBLE PRECISION ab( ldab, * ), x( * ), y( * )
199 * ..
200 *
201 * =====================================================================
202 *
203 * .. Parameters ..
204  DOUBLE PRECISION one, zero
205  parameter ( one = 1.0d+0, zero = 0.0d+0 )
206 * ..
207 * .. Local Scalars ..
208  LOGICAL symb_zero
209  DOUBLE PRECISION temp, safe1
210  INTEGER i, info, iy, j, jx, kx, ky, lenx, leny, kd, ke
211 * ..
212 * .. External Subroutines ..
213  EXTERNAL xerbla, dlamch
214  DOUBLE PRECISION dlamch
215 * ..
216 * .. External Functions ..
217  EXTERNAL ilatrans
218  INTEGER ilatrans
219 * ..
220 * .. Intrinsic Functions ..
221  INTRINSIC max, abs, sign
222 * ..
223 * .. Executable Statements ..
224 *
225 * Test the input parameters.
226 *
227  info = 0
228  IF ( .NOT.( ( trans.EQ.ilatrans( 'N' ) )
229  \$ .OR. ( trans.EQ.ilatrans( 'T' ) )
230  \$ .OR. ( trans.EQ.ilatrans( 'C' ) ) ) ) THEN
231  info = 1
232  ELSE IF( m.LT.0 )THEN
233  info = 2
234  ELSE IF( n.LT.0 )THEN
235  info = 3
236  ELSE IF( kl.LT.0 .OR. kl.GT.m-1 ) THEN
237  info = 4
238  ELSE IF( ku.LT.0 .OR. ku.GT.n-1 ) THEN
239  info = 5
240  ELSE IF( ldab.LT.kl+ku+1 )THEN
241  info = 6
242  ELSE IF( incx.EQ.0 )THEN
243  info = 8
244  ELSE IF( incy.EQ.0 )THEN
245  info = 11
246  END IF
247  IF( info.NE.0 )THEN
248  CALL xerbla( 'DLA_GBAMV ', info )
249  RETURN
250  END IF
251 *
252 * Quick return if possible.
253 *
254  IF( ( m.EQ.0 ).OR.( n.EQ.0 ).OR.
255  \$ ( ( alpha.EQ.zero ).AND.( beta.EQ.one ) ) )
256  \$ RETURN
257 *
258 * Set LENX and LENY, the lengths of the vectors x and y, and set
259 * up the start points in X and Y.
260 *
261  IF( trans.EQ.ilatrans( 'N' ) )THEN
262  lenx = n
263  leny = m
264  ELSE
265  lenx = m
266  leny = n
267  END IF
268  IF( incx.GT.0 )THEN
269  kx = 1
270  ELSE
271  kx = 1 - ( lenx - 1 )*incx
272  END IF
273  IF( incy.GT.0 )THEN
274  ky = 1
275  ELSE
276  ky = 1 - ( leny - 1 )*incy
277  END IF
278 *
279 * Set SAFE1 essentially to be the underflow threshold times the
280 * number of additions in each row.
281 *
282  safe1 = dlamch( 'Safe minimum' )
283  safe1 = (n+1)*safe1
284 *
285 * Form y := alpha*abs(A)*abs(x) + beta*abs(y).
286 *
287 * The O(M*N) SYMB_ZERO tests could be replaced by O(N) queries to
288 * the inexact flag. Still doesn't help change the iteration order
289 * to per-column.
290 *
291  kd = ku + 1
292  ke = kl + 1
293  iy = ky
294  IF ( incx.EQ.1 ) THEN
295  IF( trans.EQ.ilatrans( 'N' ) )THEN
296  DO i = 1, leny
297  IF ( beta .EQ. zero ) THEN
298  symb_zero = .true.
299  y( iy ) = 0.0d+0
300  ELSE IF ( y( iy ) .EQ. zero ) THEN
301  symb_zero = .true.
302  ELSE
303  symb_zero = .false.
304  y( iy ) = beta * abs( y( iy ) )
305  END IF
306  IF ( alpha .NE. zero ) THEN
307  DO j = max( i-kl, 1 ), min( i+ku, lenx )
308  temp = abs( ab( kd+i-j, j ) )
309  symb_zero = symb_zero .AND.
310  \$ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
311
312  y( iy ) = y( iy ) + alpha*abs( x( j ) )*temp
313  END DO
314  END IF
315
316  IF ( .NOT.symb_zero )
317  \$ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
318  iy = iy + incy
319  END DO
320  ELSE
321  DO i = 1, leny
322  IF ( beta .EQ. zero ) THEN
323  symb_zero = .true.
324  y( iy ) = 0.0d+0
325  ELSE IF ( y( iy ) .EQ. zero ) THEN
326  symb_zero = .true.
327  ELSE
328  symb_zero = .false.
329  y( iy ) = beta * abs( y( iy ) )
330  END IF
331  IF ( alpha .NE. zero ) THEN
332  DO j = max( i-kl, 1 ), min( i+ku, lenx )
333  temp = abs( ab( ke-i+j, i ) )
334  symb_zero = symb_zero .AND.
335  \$ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
336
337  y( iy ) = y( iy ) + alpha*abs( x( j ) )*temp
338  END DO
339  END IF
340
341  IF ( .NOT.symb_zero )
342  \$ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
343  iy = iy + incy
344  END DO
345  END IF
346  ELSE
347  IF( trans.EQ.ilatrans( 'N' ) )THEN
348  DO i = 1, leny
349  IF ( beta .EQ. zero ) THEN
350  symb_zero = .true.
351  y( iy ) = 0.0d+0
352  ELSE IF ( y( iy ) .EQ. zero ) THEN
353  symb_zero = .true.
354  ELSE
355  symb_zero = .false.
356  y( iy ) = beta * abs( y( iy ) )
357  END IF
358  IF ( alpha .NE. zero ) THEN
359  jx = kx
360  DO j = max( i-kl, 1 ), min( i+ku, lenx )
361  temp = abs( ab( kd+i-j, j ) )
362  symb_zero = symb_zero .AND.
363  \$ ( x( jx ) .EQ. zero .OR. temp .EQ. zero )
364
365  y( iy ) = y( iy ) + alpha*abs( x( jx ) )*temp
366  jx = jx + incx
367  END DO
368  END IF
369
370  IF ( .NOT.symb_zero )
371  \$ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
372
373  iy = iy + incy
374  END DO
375  ELSE
376  DO i = 1, leny
377  IF ( beta .EQ. zero ) THEN
378  symb_zero = .true.
379  y( iy ) = 0.0d+0
380  ELSE IF ( y( iy ) .EQ. zero ) THEN
381  symb_zero = .true.
382  ELSE
383  symb_zero = .false.
384  y( iy ) = beta * abs( y( iy ) )
385  END IF
386  IF ( alpha .NE. zero ) THEN
387  jx = kx
388  DO j = max( i-kl, 1 ), min( i+ku, lenx )
389  temp = abs( ab( ke-i+j, i ) )
390  symb_zero = symb_zero .AND.
391  \$ ( x( jx ) .EQ. zero .OR. temp .EQ. zero )
392
393  y( iy ) = y( iy ) + alpha*abs( x( jx ) )*temp
394  jx = jx + incx
395  END DO
396  END IF
397
398  IF ( .NOT.symb_zero )
399  \$ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
400
401  iy = iy + incy
402  END DO
403  END IF
404
405  END IF
406 *
407  RETURN
408 *
409 * End of DLA_GBAMV
410 *
integer function ilatrans(TRANS)
ILATRANS
Definition: ilatrans.f:60
double precision function dlamch(CMACH)
DLAMCH
Definition: dlamch.f:65
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62

Here is the call graph for this function:

Here is the caller graph for this function: