172 SUBROUTINE dla_geamv ( TRANS, M, N, ALPHA, A, LDA, X, INCX, BETA,
180 DOUBLE PRECISION ALPHA, BETA
181 INTEGER INCX, INCY, LDA, M, N, TRANS
184 DOUBLE PRECISION A( LDA, * ), X( * ), Y( * )
190 DOUBLE PRECISION ONE, ZERO
191 parameter( one = 1.0d+0, zero = 0.0d+0 )
195 DOUBLE PRECISION TEMP, SAFE1
196 INTEGER I, INFO, IY, J, JX, KX, KY, LENX, LENY
200 DOUBLE PRECISION DLAMCH
207 INTRINSIC max, abs, sign
214 IF ( .NOT.( ( trans.EQ.ilatrans(
'N' ) )
215 $ .OR. ( trans.EQ.ilatrans(
'T' ) )
216 $ .OR. ( trans.EQ.ilatrans(
'C' )) ) )
THEN
218 ELSE IF( m.LT.0 )
THEN
220 ELSE IF( n.LT.0 )
THEN
222 ELSE IF( lda.LT.max( 1, m ) )
THEN
224 ELSE IF( incx.EQ.0 )
THEN
226 ELSE IF( incy.EQ.0 )
THEN
230 CALL xerbla(
'DLA_GEAMV ', info )
236 IF( ( m.EQ.0 ).OR.( n.EQ.0 ).OR.
237 $ ( ( alpha.EQ.zero ).AND.( beta.EQ.one ) ) )
243 IF( trans.EQ.ilatrans(
'N' ) )
THEN
253 kx = 1 - ( lenx - 1 )*incx
258 ky = 1 - ( leny - 1 )*incy
264 safe1 = dlamch(
'Safe minimum' )
274 IF ( incx.EQ.1 )
THEN
275 IF( trans.EQ.ilatrans(
'N' ) )
THEN
277 IF ( beta .EQ. zero )
THEN
280 ELSE IF ( y( iy ) .EQ. zero )
THEN
284 y( iy ) = beta * abs( y( iy ) )
286 IF ( alpha .NE. zero )
THEN
288 temp = abs( a( i, j ) )
289 symb_zero = symb_zero .AND.
290 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
292 y( iy ) = y( iy ) + alpha*abs( x( j ) )*temp
296 IF ( .NOT.symb_zero )
297 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
303 IF ( beta .EQ. zero )
THEN
306 ELSE IF ( y( iy ) .EQ. zero )
THEN
310 y( iy ) = beta * abs( y( iy ) )
312 IF ( alpha .NE. zero )
THEN
314 temp = abs( a( j, i ) )
315 symb_zero = symb_zero .AND.
316 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
318 y( iy ) = y( iy ) + alpha*abs( x( j ) )*temp
322 IF ( .NOT.symb_zero )
323 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
329 IF( trans.EQ.ilatrans(
'N' ) )
THEN
331 IF ( beta .EQ. zero )
THEN
334 ELSE IF ( y( iy ) .EQ. zero )
THEN
338 y( iy ) = beta * abs( y( iy ) )
340 IF ( alpha .NE. zero )
THEN
343 temp = abs( a( i, j ) )
344 symb_zero = symb_zero .AND.
345 $ ( x( jx ) .EQ. zero .OR. temp .EQ. zero )
347 y( iy ) = y( iy ) + alpha*abs( x( jx ) )*temp
353 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
359 IF ( beta .EQ. zero )
THEN
362 ELSE IF ( y( iy ) .EQ. zero )
THEN
366 y( iy ) = beta * abs( y( iy ) )
368 IF ( alpha .NE. zero )
THEN
371 temp = abs( a( j, i ) )
372 symb_zero = symb_zero .AND.
373 $ ( x( jx ) .EQ. zero .OR. temp .EQ. zero )
375 y( iy ) = y( iy ) + alpha*abs( x( jx ) )*temp
381 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
subroutine dla_geamv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
DLA_GEAMV computes a matrix-vector product using a general matrix to calculate error bounds.