186 SUBROUTINE zla_gbamv( TRANS, M, N, KL, KU, ALPHA, AB, LDAB, X,
187 $ INCX, BETA, Y, INCY )
194 DOUBLE PRECISION ALPHA, BETA
195 INTEGER INCX, INCY, LDAB, M, N, KL, KU, TRANS
198 COMPLEX*16 AB( LDAB, * ), X( * )
199 DOUBLE PRECISION Y( * )
206 parameter( one = 1.0d+0, zero = 0.0d+0 )
210 DOUBLE PRECISION TEMP, SAFE1
211 INTEGER I, INFO, IY, J, JX, KX, KY, LENX, LENY, KD, KE
216 DOUBLE PRECISION DLAMCH
223 INTRINSIC max, abs, real, dimag, sign
226 DOUBLE PRECISION CABS1
229 cabs1( cdum ) = abs( dble( cdum ) ) + abs( dimag( cdum ) )
236 IF ( .NOT.( ( trans.EQ.ilatrans(
'N' ) )
237 $ .OR. ( trans.EQ.ilatrans(
'T' ) )
238 $ .OR. ( trans.EQ.ilatrans(
'C' ) ) ) )
THEN
240 ELSE IF( m.LT.0 )
THEN
242 ELSE IF( n.LT.0 )
THEN
244 ELSE IF( kl.LT.0 .OR. kl.GT.m-1 )
THEN
246 ELSE IF( ku.LT.0 .OR. ku.GT.n-1 )
THEN
248 ELSE IF( ldab.LT.kl+ku+1 )
THEN
250 ELSE IF( incx.EQ.0 )
THEN
252 ELSE IF( incy.EQ.0 )
THEN
256 CALL xerbla(
'ZLA_GBAMV ', info )
262 IF( ( m.EQ.0 ).OR.( n.EQ.0 ).OR.
263 $ ( ( alpha.EQ.zero ).AND.( beta.EQ.one ) ) )
269 IF( trans.EQ.ilatrans(
'N' ) )
THEN
279 kx = 1 - ( lenx - 1 )*incx
284 ky = 1 - ( leny - 1 )*incy
290 safe1 = dlamch(
'Safe minimum' )
302 IF ( incx.EQ.1 )
THEN
303 IF( trans.EQ.ilatrans(
'N' ) )
THEN
305 IF ( beta .EQ. 0.0d+0 )
THEN
308 ELSE IF ( y( iy ) .EQ. 0.0d+0 )
THEN
312 y( iy ) = beta * abs( y( iy ) )
314 IF ( alpha .NE. 0.0d+0 )
THEN
315 DO j = max( i-kl, 1 ), min( i+ku, lenx )
316 temp = cabs1( ab( kd+i-j, j ) )
317 symb_zero = symb_zero .AND.
318 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
320 y( iy ) = y( iy ) + alpha*cabs1( x( j ) )*temp
325 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
331 IF ( beta .EQ. 0.0d+0 )
THEN
334 ELSE IF ( y( iy ) .EQ. 0.0d+0 )
THEN
338 y( iy ) = beta * abs( y( iy ) )
340 IF ( alpha .NE. 0.0d+0 )
THEN
341 DO j = max( i-kl, 1 ), min( i+ku, lenx )
342 temp = cabs1( ab( ke-i+j, i ) )
343 symb_zero = symb_zero .AND.
344 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
346 y( iy ) = y( iy ) + alpha*cabs1( x( j ) )*temp
351 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
357 IF( trans.EQ.ilatrans(
'N' ) )
THEN
359 IF ( beta .EQ. 0.0d+0 )
THEN
362 ELSE IF ( y( iy ) .EQ. 0.0d+0 )
THEN
366 y( iy ) = beta * abs( y( iy ) )
368 IF ( alpha .NE. 0.0d+0 )
THEN
370 DO j = max( i-kl, 1 ), min( i+ku, lenx )
371 temp = cabs1( ab( kd+i-j, j ) )
372 symb_zero = symb_zero .AND.
373 $ ( x( jx ) .EQ. zero .OR. temp .EQ. zero )
375 y( iy ) = y( iy ) + alpha*cabs1( x( jx ) )*temp
380 IF ( .NOT.symb_zero )
381 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
387 IF ( beta .EQ. 0.0d+0 )
THEN
390 ELSE IF ( y( iy ) .EQ. 0.0d+0 )
THEN
394 y( iy ) = beta * abs( y( iy ) )
396 IF ( alpha .NE. 0.0d+0 )
THEN
398 DO j = max( i-kl, 1 ), min( i+ku, lenx )
399 temp = cabs1( ab( ke-i+j, i ) )
400 symb_zero = symb_zero .AND.
401 $ ( x( jx ) .EQ. zero .OR. temp .EQ. zero )
403 y( iy ) = y( iy ) + alpha*cabs1( x( jx ) )*temp
408 IF ( .NOT.symb_zero )
409 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
subroutine xerbla(srname, info)
integer function ilatrans(trans)
ILATRANS
subroutine zla_gbamv(trans, m, n, kl, ku, alpha, ab, ldab, x, incx, beta, y, incy)
ZLA_GBAMV performs a matrix-vector operation to calculate error bounds.
double precision function dlamch(cmach)
DLAMCH