186 SUBROUTINE zla_gbamv( TRANS, M, N, KL, KU, ALPHA, AB, LDAB, X,
187 $ incx, beta, y, incy )
195 DOUBLE PRECISION ALPHA, BETA
196 INTEGER INCX, INCY, LDAB, M, N, KL, KU, TRANS
199 COMPLEX*16 AB( ldab, * ), X( * )
200 DOUBLE PRECISION Y( * )
207 parameter ( one = 1.0d+0, zero = 0.0d+0 )
211 DOUBLE PRECISION TEMP, SAFE1
212 INTEGER I, INFO, IY, J, JX, KX, KY, LENX, LENY, KD, KE
217 DOUBLE PRECISION DLAMCH
224 INTRINSIC max, abs,
REAL, DIMAG, SIGN
227 DOUBLE PRECISION CABS1
230 cabs1( cdum ) = abs( dble( cdum ) ) + abs( dimag( cdum ) )
237 IF ( .NOT.( ( trans.EQ.ilatrans(
'N' ) )
238 $ .OR. ( trans.EQ.ilatrans(
'T' ) )
239 $ .OR. ( trans.EQ.ilatrans(
'C' ) ) ) )
THEN
241 ELSE IF( m.LT.0 )
THEN
243 ELSE IF( n.LT.0 )
THEN
245 ELSE IF( kl.LT.0 .OR. kl.GT.m-1 )
THEN
247 ELSE IF( ku.LT.0 .OR. ku.GT.n-1 )
THEN
249 ELSE IF( ldab.LT.kl+ku+1 )
THEN
251 ELSE IF( incx.EQ.0 )
THEN
253 ELSE IF( incy.EQ.0 )
THEN
257 CALL xerbla(
'ZLA_GBAMV ', info )
263 IF( ( m.EQ.0 ).OR.( n.EQ.0 ).OR.
264 $ ( ( alpha.EQ.zero ).AND.( beta.EQ.one ) ) )
270 IF( trans.EQ.ilatrans(
'N' ) )
THEN
280 kx = 1 - ( lenx - 1 )*incx
285 ky = 1 - ( leny - 1 )*incy
291 safe1 = dlamch(
'Safe minimum' )
303 IF ( incx.EQ.1 )
THEN
304 IF( trans.EQ.ilatrans(
'N' ) )
THEN
306 IF ( beta .EQ. 0.0d+0 )
THEN
309 ELSE IF ( y( iy ) .EQ. 0.0d+0 )
THEN
313 y( iy ) = beta * abs( y( iy ) )
315 IF ( alpha .NE. 0.0d+0 )
THEN
316 DO j = max( i-kl, 1 ), min( i+ku, lenx )
317 temp = cabs1( ab( kd+i-j, j ) )
318 symb_zero = symb_zero .AND.
319 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
321 y( iy ) = y( iy ) + alpha*cabs1( x( j ) )*temp
326 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
332 IF ( beta .EQ. 0.0d+0 )
THEN
335 ELSE IF ( y( iy ) .EQ. 0.0d+0 )
THEN
339 y( iy ) = beta * abs( y( iy ) )
341 IF ( alpha .NE. 0.0d+0 )
THEN
342 DO j = max( i-kl, 1 ), min( i+ku, lenx )
343 temp = cabs1( ab( ke-i+j, i ) )
344 symb_zero = symb_zero .AND.
345 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
347 y( iy ) = y( iy ) + alpha*cabs1( x( j ) )*temp
352 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
358 IF( trans.EQ.ilatrans(
'N' ) )
THEN
360 IF ( beta .EQ. 0.0d+0 )
THEN
363 ELSE IF ( y( iy ) .EQ. 0.0d+0 )
THEN
367 y( iy ) = beta * abs( y( iy ) )
369 IF ( alpha .NE. 0.0d+0 )
THEN
371 DO j = max( i-kl, 1 ), min( i+ku, lenx )
372 temp = cabs1( ab( kd+i-j, j ) )
373 symb_zero = symb_zero .AND.
374 $ ( x( jx ) .EQ. zero .OR. temp .EQ. zero )
376 y( iy ) = y( iy ) + alpha*cabs1( x( jx ) )*temp
381 IF ( .NOT.symb_zero )
382 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
388 IF ( beta .EQ. 0.0d+0 )
THEN
391 ELSE IF ( y( iy ) .EQ. 0.0d+0 )
THEN
395 y( iy ) = beta * abs( y( iy ) )
397 IF ( alpha .NE. 0.0d+0 )
THEN
399 DO j = max( i-kl, 1 ), min( i+ku, lenx )
400 temp = cabs1( ab( ke-i+j, i ) )
401 symb_zero = symb_zero .AND.
402 $ ( x( jx ) .EQ. zero .OR. temp .EQ. zero )
404 y( iy ) = y( iy ) + alpha*cabs1( x( jx ) )*temp
409 IF ( .NOT.symb_zero )
410 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
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
subroutine xerbla(SRNAME, INFO)
XERBLA