174 SUBROUTINE dla_geamv ( TRANS, M, N, ALPHA, A, LDA, X, INCX, BETA,
183 DOUBLE PRECISION ALPHA, BETA
184 INTEGER INCX, INCY, LDA, M, N, TRANS
187 DOUBLE PRECISION A( lda, * ), X( * ), Y( * )
193 DOUBLE PRECISION ONE, ZERO
194 parameter ( one = 1.0d+0, zero = 0.0d+0 )
198 DOUBLE PRECISION TEMP, SAFE1
199 INTEGER I, INFO, IY, J, JX, KX, KY, LENX, LENY
203 DOUBLE PRECISION DLAMCH
210 INTRINSIC max, abs, sign
217 IF ( .NOT.( ( trans.EQ.ilatrans(
'N' ) )
218 $ .OR. ( trans.EQ.ilatrans(
'T' ) )
219 $ .OR. ( trans.EQ.ilatrans(
'C' )) ) )
THEN
221 ELSE IF( m.LT.0 )
THEN
223 ELSE IF( n.LT.0 )
THEN
225 ELSE IF( lda.LT.max( 1, m ) )
THEN
227 ELSE IF( incx.EQ.0 )
THEN
229 ELSE IF( incy.EQ.0 )
THEN
233 CALL xerbla(
'DLA_GEAMV ', info )
239 IF( ( m.EQ.0 ).OR.( n.EQ.0 ).OR.
240 $ ( ( alpha.EQ.zero ).AND.( beta.EQ.one ) ) )
246 IF( trans.EQ.ilatrans(
'N' ) )
THEN
256 kx = 1 - ( lenx - 1 )*incx
261 ky = 1 - ( leny - 1 )*incy
267 safe1 = dlamch(
'Safe minimum' )
277 IF ( incx.EQ.1 )
THEN
278 IF( trans.EQ.ilatrans(
'N' ) )
THEN
280 IF ( beta .EQ. zero )
THEN
283 ELSE IF ( y( iy ) .EQ. zero )
THEN
287 y( iy ) = beta * abs( y( iy ) )
289 IF ( alpha .NE. zero )
THEN
291 temp = abs( a( i, j ) )
292 symb_zero = symb_zero .AND.
293 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
295 y( iy ) = y( iy ) + alpha*abs( x( j ) )*temp
299 IF ( .NOT.symb_zero )
300 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
306 IF ( beta .EQ. zero )
THEN
309 ELSE IF ( y( iy ) .EQ. zero )
THEN
313 y( iy ) = beta * abs( y( iy ) )
315 IF ( alpha .NE. zero )
THEN
317 temp = abs( a( j, i ) )
318 symb_zero = symb_zero .AND.
319 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
321 y( iy ) = y( iy ) + alpha*abs( x( j ) )*temp
325 IF ( .NOT.symb_zero )
326 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
332 IF( trans.EQ.ilatrans(
'N' ) )
THEN
334 IF ( beta .EQ. zero )
THEN
337 ELSE IF ( y( iy ) .EQ. zero )
THEN
341 y( iy ) = beta * abs( y( iy ) )
343 IF ( alpha .NE. zero )
THEN
346 temp = abs( a( i, j ) )
347 symb_zero = symb_zero .AND.
348 $ ( x( jx ) .EQ. zero .OR. temp .EQ. zero )
350 y( iy ) = y( iy ) + alpha*abs( x( jx ) )*temp
356 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
362 IF ( beta .EQ. zero )
THEN
365 ELSE IF ( y( iy ) .EQ. zero )
THEN
369 y( iy ) = beta * abs( y( iy ) )
371 IF ( alpha .NE. zero )
THEN
374 temp = abs( a( j, i ) )
375 symb_zero = symb_zero .AND.
376 $ ( x( jx ) .EQ. zero .OR. temp .EQ. zero )
378 y( iy ) = y( iy ) + alpha*abs( x( jx ) )*temp
384 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
integer function ilatrans(TRANS)
ILATRANS
double precision function dlamch(CMACH)
DLAMCH
subroutine xerbla(SRNAME, INFO)
XERBLA
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...