183 SUBROUTINE dla_gbamv( TRANS, M, N, KL, KU, ALPHA, AB, LDAB, X,
184 $ INCX, BETA, Y, INCY )
191 DOUBLE PRECISION ALPHA, BETA
192 INTEGER INCX, INCY, LDAB, M, N, KL, KU, TRANS
195 DOUBLE PRECISION AB( LDAB, * ), X( * ), Y( * )
201 DOUBLE PRECISION ONE, ZERO
202 parameter( one = 1.0d+0, zero = 0.0d+0 )
206 DOUBLE PRECISION TEMP, SAFE1
207 INTEGER I, INFO, IY, J, JX, KX, KY, LENX, LENY, KD, KE
211 DOUBLE PRECISION DLAMCH
218 INTRINSIC max, abs, sign
225 IF ( .NOT.( ( trans.EQ.ilatrans(
'N' ) )
226 $ .OR. ( trans.EQ.ilatrans(
'T' ) )
227 $ .OR. ( trans.EQ.ilatrans(
'C' ) ) ) )
THEN
229 ELSE IF( m.LT.0 )
THEN
231 ELSE IF( n.LT.0 )
THEN
233 ELSE IF( kl.LT.0 .OR. kl.GT.m-1 )
THEN
235 ELSE IF( ku.LT.0 .OR. ku.GT.n-1 )
THEN
237 ELSE IF( ldab.LT.kl+ku+1 )
THEN
239 ELSE IF( incx.EQ.0 )
THEN
241 ELSE IF( incy.EQ.0 )
THEN
245 CALL xerbla(
'DLA_GBAMV ', info )
251 IF( ( m.EQ.0 ).OR.( n.EQ.0 ).OR.
252 $ ( ( alpha.EQ.zero ).AND.( beta.EQ.one ) ) )
258 IF( trans.EQ.ilatrans(
'N' ) )
THEN
268 kx = 1 - ( lenx - 1 )*incx
273 ky = 1 - ( leny - 1 )*incy
279 safe1 = dlamch(
'Safe minimum' )
291 IF ( incx.EQ.1 )
THEN
292 IF( trans.EQ.ilatrans(
'N' ) )
THEN
294 IF ( beta .EQ. zero )
THEN
297 ELSE IF ( y( iy ) .EQ. zero )
THEN
301 y( iy ) = beta * abs( y( iy ) )
303 IF ( alpha .NE. zero )
THEN
304 DO j = max( i-kl, 1 ), min( i+ku, lenx )
305 temp = abs( ab( kd+i-j, j ) )
306 symb_zero = symb_zero .AND.
307 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
309 y( iy ) = y( iy ) + alpha*abs( x( j ) )*temp
313 IF ( .NOT.symb_zero )
314 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
319 IF ( beta .EQ. zero )
THEN
322 ELSE IF ( y( iy ) .EQ. zero )
THEN
326 y( iy ) = beta * abs( y( iy ) )
328 IF ( alpha .NE. zero )
THEN
329 DO j = max( i-kl, 1 ), min( i+ku, lenx )
330 temp = abs( ab( ke-i+j, i ) )
331 symb_zero = symb_zero .AND.
332 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
334 y( iy ) = y( iy ) + alpha*abs( x( j ) )*temp
338 IF ( .NOT.symb_zero )
339 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
344 IF( trans.EQ.ilatrans(
'N' ) )
THEN
346 IF ( beta .EQ. zero )
THEN
349 ELSE IF ( y( iy ) .EQ. zero )
THEN
353 y( iy ) = beta * abs( y( iy ) )
355 IF ( alpha .NE. zero )
THEN
357 DO j = max( i-kl, 1 ), min( i+ku, lenx )
358 temp = abs( ab( kd+i-j, j ) )
359 symb_zero = symb_zero .AND.
360 $ ( x( jx ) .EQ. zero .OR. temp .EQ. zero )
362 y( iy ) = y( iy ) + alpha*abs( x( jx ) )*temp
367 IF ( .NOT.symb_zero )
368 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
374 IF ( beta .EQ. zero )
THEN
377 ELSE IF ( y( iy ) .EQ. zero )
THEN
381 y( iy ) = beta * abs( y( iy ) )
383 IF ( alpha .NE. zero )
THEN
385 DO j = max( i-kl, 1 ), min( i+ku, lenx )
386 temp = abs( ab( ke-i+j, i ) )
387 symb_zero = symb_zero .AND.
388 $ ( x( jx ) .EQ. zero .OR. temp .EQ. zero )
390 y( iy ) = y( iy ) + alpha*abs( x( jx ) )*temp
395 IF ( .NOT.symb_zero )
396 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
subroutine dla_gbamv(trans, m, n, kl, ku, alpha, ab, ldab, x, incx, beta, y, incy)
DLA_GBAMV performs a matrix-vector operation to calculate error bounds.