186 SUBROUTINE cla_gbamv( TRANS, M, N, KL, KU, ALPHA, AB, LDAB, X,
187 $ incx, beta, y, incy )
196 INTEGER incx, incy, ldab, m, n, kl, ku, trans
199 COMPLEX ab( ldab, * ), x( * )
207 parameter( one = 1.0e+0, zero = 0.0e+0 )
212 INTEGER i, info, iy, j, jx, kx, ky, lenx, leny, kd, ke
224 INTRINSIC max, abs,
REAL, aimag, sign
230 cabs1( cdum ) = abs(
REAL( CDUM ) ) + abs( aimag( cdum ) )
237 IF ( .NOT.( ( trans.EQ.
ilatrans(
'N' ) )
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(
'CLA_GBAMV ', info )
263 IF( ( m.EQ.0 ).OR.( n.EQ.0 ).OR.
264 $ ( ( alpha.EQ.zero ).AND.( beta.EQ.one ) ) )
280 kx = 1 - ( lenx - 1 )*incx
285 ky = 1 - ( leny - 1 )*incy
291 safe1 =
slamch(
'Safe minimum' )
303 IF ( incx.EQ.1 )
THEN
306 IF ( beta .EQ. 0.0 )
THEN
309 ELSE IF ( y( iy ) .EQ. 0.0 )
THEN
313 y( iy ) = beta * abs( y( iy ) )
315 IF ( alpha .NE. 0.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.0 )
THEN
335 ELSE IF ( y( iy ) .EQ. 0.0 )
THEN
339 y( iy ) = beta * abs( y( iy ) )
341 IF ( alpha .NE. 0.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 ) )
360 IF ( beta .EQ. 0.0 )
THEN
363 ELSE IF ( y( iy ) .EQ. 0.0 )
THEN
367 y( iy ) = beta * abs( y( iy ) )
369 IF ( alpha .NE. 0.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.0 )
THEN
391 ELSE IF ( y( iy ) .EQ. 0.0 )
THEN
395 y( iy ) = beta * abs( y( iy ) )
397 IF ( alpha .NE. 0.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 ) )