184 SUBROUTINE cla_gbamv( TRANS, M, N, KL, KU, ALPHA, AB, LDAB, X,
185 $ INCX, BETA, Y, INCY )
193 INTEGER INCX, INCY, LDAB, M, N, KL, KU, TRANS
196 COMPLEX AB( LDAB, * ), X( * )
204 parameter( one = 1.0e+0, zero = 0.0e+0 )
209 INTEGER I, INFO, IY, J, JX, KX, KY, LENX, LENY, KD, KE
221 INTRINSIC max, abs, real, aimag, sign
227 cabs1( cdum ) = abs( real( cdum ) ) + abs( aimag( cdum ) )
234 IF ( .NOT.( ( trans.EQ.ilatrans(
'N' ) )
235 $ .OR. ( trans.EQ.ilatrans(
'T' ) )
236 $ .OR. ( trans.EQ.ilatrans(
'C' ) ) ) )
THEN
238 ELSE IF( m.LT.0 )
THEN
240 ELSE IF( n.LT.0 )
THEN
242 ELSE IF( kl.LT.0 .OR. kl.GT.m-1 )
THEN
244 ELSE IF( ku.LT.0 .OR. ku.GT.n-1 )
THEN
246 ELSE IF( ldab.LT.kl+ku+1 )
THEN
248 ELSE IF( incx.EQ.0 )
THEN
250 ELSE IF( incy.EQ.0 )
THEN
254 CALL xerbla(
'CLA_GBAMV ', info )
260 IF( ( m.EQ.0 ).OR.( n.EQ.0 ).OR.
261 $ ( ( alpha.EQ.zero ).AND.( beta.EQ.one ) ) )
267 IF( trans.EQ.ilatrans(
'N' ) )
THEN
277 kx = 1 - ( lenx - 1 )*incx
282 ky = 1 - ( leny - 1 )*incy
288 safe1 = slamch(
'Safe minimum' )
300 IF ( incx.EQ.1 )
THEN
301 IF( trans.EQ.ilatrans(
'N' ) )
THEN
303 IF ( beta .EQ. 0.0 )
THEN
306 ELSE IF ( y( iy ) .EQ. 0.0 )
THEN
310 y( iy ) = beta * abs( y( iy ) )
312 IF ( alpha .NE. 0.0 )
THEN
313 DO j = max( i-kl, 1 ), min( i+ku, lenx )
314 temp = cabs1( ab( kd+i-j, j ) )
315 symb_zero = symb_zero .AND.
316 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
318 y( iy ) = y( iy ) + alpha*cabs1( x( j ) )*temp
323 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
329 IF ( beta .EQ. 0.0 )
THEN
332 ELSE IF ( y( iy ) .EQ. 0.0 )
THEN
336 y( iy ) = beta * abs( y( iy ) )
338 IF ( alpha .NE. 0.0 )
THEN
339 DO j = max( i-kl, 1 ), min( i+ku, lenx )
340 temp = cabs1( ab( ke-i+j, i ) )
341 symb_zero = symb_zero .AND.
342 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
344 y( iy ) = y( iy ) + alpha*cabs1( x( j ) )*temp
349 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
355 IF( trans.EQ.ilatrans(
'N' ) )
THEN
357 IF ( beta .EQ. 0.0 )
THEN
360 ELSE IF ( y( iy ) .EQ. 0.0 )
THEN
364 y( iy ) = beta * abs( y( iy ) )
366 IF ( alpha .NE. 0.0 )
THEN
368 DO j = max( i-kl, 1 ), min( i+ku, lenx )
369 temp = cabs1( ab( kd+i-j, j ) )
370 symb_zero = symb_zero .AND.
371 $ ( x( jx ) .EQ. zero .OR. temp .EQ. zero )
373 y( iy ) = y( iy ) + alpha*cabs1( x( jx ) )*temp
378 IF ( .NOT.symb_zero )
379 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
385 IF ( beta .EQ. 0.0 )
THEN
388 ELSE IF ( y( iy ) .EQ. 0.0 )
THEN
392 y( iy ) = beta * abs( y( iy ) )
394 IF ( alpha .NE. 0.0 )
THEN
396 DO j = max( i-kl, 1 ), min( i+ku, lenx )
397 temp = cabs1( ab( ke-i+j, i ) )
398 symb_zero = symb_zero .AND.
399 $ ( x( jx ) .EQ. zero .OR. temp .EQ. zero )
401 y( iy ) = y( iy ) + alpha*cabs1( x( jx ) )*temp
406 IF ( .NOT.symb_zero )
407 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
subroutine cla_gbamv(trans, m, n, kl, ku, alpha, ab, ldab, x, incx, beta, y, incy)
CLA_GBAMV performs a matrix-vector operation to calculate error bounds.