185 SUBROUTINE sla_gbamv( TRANS, M, N, KL, KU, ALPHA, AB, LDAB, X,
186 $ INCX, BETA, Y, INCY )
194 INTEGER INCX, INCY, LDAB, M, N, KL, KU, TRANS
197 REAL AB( LDAB, * ), X( * ), Y( * )
203 parameter( one = 1.0e+0, zero = 0.0e+0 )
208 INTEGER I, INFO, IY, J, JX, KX, KY, LENX, LENY, KD, KE
219 INTRINSIC max, abs, sign
226 IF ( .NOT.( ( trans.EQ.ilatrans(
'N' ) )
227 $ .OR. ( trans.EQ.ilatrans(
'T' ) )
228 $ .OR. ( trans.EQ.ilatrans(
'C' ) ) ) )
THEN
230 ELSE IF( m.LT.0 )
THEN
232 ELSE IF( n.LT.0 )
THEN
234 ELSE IF( kl.LT.0 .OR. kl.GT.m-1 )
THEN
236 ELSE IF( ku.LT.0 .OR. ku.GT.n-1 )
THEN
238 ELSE IF( ldab.LT.kl+ku+1 )
THEN
240 ELSE IF( incx.EQ.0 )
THEN
242 ELSE IF( incy.EQ.0 )
THEN
246 CALL xerbla(
'SLA_GBAMV ', info )
252 IF( ( m.EQ.0 ).OR.( n.EQ.0 ).OR.
253 $ ( ( alpha.EQ.zero ).AND.( beta.EQ.one ) ) )
259 IF( trans.EQ.ilatrans(
'N' ) )
THEN
269 kx = 1 - ( lenx - 1 )*incx
274 ky = 1 - ( leny - 1 )*incy
280 safe1 = slamch(
'Safe minimum' )
292 IF ( incx.EQ.1 )
THEN
293 IF( trans.EQ.ilatrans(
'N' ) )
THEN
295 IF ( beta .EQ. zero )
THEN
298 ELSE IF ( y( iy ) .EQ. zero )
THEN
302 y( iy ) = beta * abs( y( iy ) )
304 IF ( alpha .NE. zero )
THEN
305 DO j = max( i-kl, 1 ), min( i+ku, lenx )
306 temp = abs( ab( kd+i-j, j ) )
307 symb_zero = symb_zero .AND.
308 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
310 y( iy ) = y( iy ) + alpha*abs( x( j ) )*temp
314 IF ( .NOT.symb_zero )
315 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
320 IF ( beta .EQ. zero )
THEN
323 ELSE IF ( y( iy ) .EQ. zero )
THEN
327 y( iy ) = beta * abs( y( iy ) )
329 IF ( alpha .NE. zero )
THEN
330 DO j = max( i-kl, 1 ), min( i+ku, lenx )
331 temp = abs( ab( ke-i+j, i ) )
332 symb_zero = symb_zero .AND.
333 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
335 y( iy ) = y( iy ) + alpha*abs( x( j ) )*temp
339 IF ( .NOT.symb_zero )
340 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
345 IF( trans.EQ.ilatrans(
'N' ) )
THEN
347 IF ( beta .EQ. zero )
THEN
350 ELSE IF ( y( iy ) .EQ. zero )
THEN
354 y( iy ) = beta * abs( y( iy ) )
356 IF ( alpha .NE. zero )
THEN
358 DO j = max( i-kl, 1 ), min( i+ku, lenx )
359 temp = abs( ab( kd+i-j, j ) )
360 symb_zero = symb_zero .AND.
361 $ ( x( jx ) .EQ. zero .OR. temp .EQ. zero )
363 y( iy ) = y( iy ) + alpha*abs( x( jx ) )*temp
368 IF ( .NOT.symb_zero )
369 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
375 IF ( beta .EQ. zero )
THEN
378 ELSE IF ( y( iy ) .EQ. zero )
THEN
382 y( iy ) = beta * abs( y( iy ) )
384 IF ( alpha .NE. zero )
THEN
386 DO j = max( i-kl, 1 ), min( i+ku, lenx )
387 temp = abs( ab( ke-i+j, i ) )
388 symb_zero = symb_zero .AND.
389 $ ( x( jx ) .EQ. zero .OR. temp .EQ. zero )
391 y( iy ) = y( iy ) + alpha*abs( x( jx ) )*temp
396 IF ( .NOT.symb_zero )
397 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
subroutine xerbla(srname, info)
integer function ilatrans(trans)
ILATRANS
subroutine sla_gbamv(trans, m, n, kl, ku, alpha, ab, ldab, x, incx, beta, y, incy)
SLA_GBAMV performs a matrix-vector operation to calculate error bounds.
real function slamch(cmach)
SLAMCH