174 SUBROUTINE dla_geamv ( TRANS, M, N, ALPHA, A, LDA, X, INCX, BETA,
182 DOUBLE PRECISION ALPHA, BETA
183 INTEGER INCX, INCY, LDA, M, N, TRANS
186 DOUBLE PRECISION A( LDA, * ), X( * ), Y( * )
192 DOUBLE PRECISION ONE, ZERO
193 parameter( one = 1.0d+0, zero = 0.0d+0 )
197 DOUBLE PRECISION TEMP, SAFE1
198 INTEGER I, INFO, IY, J, JX, KX, KY, LENX, LENY
202 DOUBLE PRECISION DLAMCH
209 INTRINSIC max, abs, sign
216 IF ( .NOT.( ( trans.EQ.ilatrans(
'N' ) )
217 $ .OR. ( trans.EQ.ilatrans(
'T' ) )
218 $ .OR. ( trans.EQ.ilatrans(
'C' )) ) )
THEN
220 ELSE IF( m.LT.0 )
THEN
222 ELSE IF( n.LT.0 )
THEN
224 ELSE IF( lda.LT.max( 1, m ) )
THEN
226 ELSE IF( incx.EQ.0 )
THEN
228 ELSE IF( incy.EQ.0 )
THEN
232 CALL xerbla(
'DLA_GEAMV ', info )
238 IF( ( m.EQ.0 ).OR.( n.EQ.0 ).OR.
239 $ ( ( alpha.EQ.zero ).AND.( beta.EQ.one ) ) )
245 IF( trans.EQ.ilatrans(
'N' ) )
THEN
255 kx = 1 - ( lenx - 1 )*incx
260 ky = 1 - ( leny - 1 )*incy
266 safe1 = dlamch(
'Safe minimum' )
276 IF ( incx.EQ.1 )
THEN
277 IF( trans.EQ.ilatrans(
'N' ) )
THEN
279 IF ( beta .EQ. zero )
THEN
282 ELSE IF ( y( iy ) .EQ. zero )
THEN
286 y( iy ) = beta * abs( y( iy ) )
288 IF ( alpha .NE. zero )
THEN
290 temp = abs( a( i, j ) )
291 symb_zero = symb_zero .AND.
292 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
294 y( iy ) = y( iy ) + alpha*abs( x( j ) )*temp
298 IF ( .NOT.symb_zero )
299 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
305 IF ( beta .EQ. zero )
THEN
308 ELSE IF ( y( iy ) .EQ. zero )
THEN
312 y( iy ) = beta * abs( y( iy ) )
314 IF ( alpha .NE. zero )
THEN
316 temp = abs( a( j, i ) )
317 symb_zero = symb_zero .AND.
318 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
320 y( iy ) = y( iy ) + alpha*abs( x( j ) )*temp
324 IF ( .NOT.symb_zero )
325 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
331 IF( trans.EQ.ilatrans(
'N' ) )
THEN
333 IF ( beta .EQ. zero )
THEN
336 ELSE IF ( y( iy ) .EQ. zero )
THEN
340 y( iy ) = beta * abs( y( iy ) )
342 IF ( alpha .NE. zero )
THEN
345 temp = abs( a( i, j ) )
346 symb_zero = symb_zero .AND.
347 $ ( x( jx ) .EQ. zero .OR. temp .EQ. zero )
349 y( iy ) = y( iy ) + alpha*abs( x( jx ) )*temp
355 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
361 IF ( beta .EQ. zero )
THEN
364 ELSE IF ( y( iy ) .EQ. zero )
THEN
368 y( iy ) = beta * abs( y( iy ) )
370 IF ( alpha .NE. zero )
THEN
373 temp = abs( a( j, i ) )
374 symb_zero = symb_zero .AND.
375 $ ( x( jx ) .EQ. zero .OR. temp .EQ. zero )
377 y( iy ) = y( iy ) + alpha*abs( x( jx ) )*temp
383 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
subroutine xerbla(srname, info)
integer function ilatrans(trans)
ILATRANS
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.
double precision function dlamch(cmach)
DLAMCH