175 SUBROUTINE cla_geamv ( TRANS, M, N, ALPHA, A, LDA, X, INCX, BETA,
185 INTEGER INCX, INCY, LDA, M, N
189 COMPLEX A( lda, * ), X( * )
197 parameter ( one = 1.0e+0, zero = 0.0e+0 )
202 INTEGER I, INFO, IY, J, JX, KX, KY, LENX, LENY
214 INTRINSIC max, abs,
REAL, AIMAG, SIGN
220 cabs1( cdum ) = abs(
REAL( CDUM ) ) + abs( AIMAG( cdum ) )
227 IF ( .NOT.( ( trans.EQ.ilatrans(
'N' ) )
228 $ .OR. ( trans.EQ.ilatrans(
'T' ) )
229 $ .OR. ( trans.EQ.ilatrans(
'C' ) ) ) )
THEN
231 ELSE IF( m.LT.0 )
THEN
233 ELSE IF( n.LT.0 )
THEN
235 ELSE IF( lda.LT.max( 1, m ) )
THEN
237 ELSE IF( incx.EQ.0 )
THEN
239 ELSE IF( incy.EQ.0 )
THEN
243 CALL xerbla(
'CLA_GEAMV ', info )
249 IF( ( m.EQ.0 ).OR.( n.EQ.0 ).OR.
250 $ ( ( alpha.EQ.zero ).AND.( beta.EQ.one ) ) )
256 IF( trans.EQ.ilatrans(
'N' ) )
THEN
266 kx = 1 - ( lenx - 1 )*incx
271 ky = 1 - ( leny - 1 )*incy
277 safe1 = slamch(
'Safe minimum' )
287 IF ( incx.EQ.1 )
THEN
288 IF( trans.EQ.ilatrans(
'N' ) )
THEN
290 IF ( beta .EQ. 0.0 )
THEN
293 ELSE IF ( y( iy ) .EQ. 0.0 )
THEN
297 y( iy ) = beta * abs( y( iy ) )
299 IF ( alpha .NE. 0.0 )
THEN
301 temp = cabs1( a( i, j ) )
302 symb_zero = symb_zero .AND.
303 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
305 y( iy ) = y( iy ) + alpha*cabs1( x( j ) )*temp
309 IF ( .NOT.symb_zero ) y( iy ) =
310 $ y( iy ) + sign( safe1, y( iy ) )
316 IF ( beta .EQ. 0.0 )
THEN
319 ELSE IF ( y( iy ) .EQ. 0.0 )
THEN
323 y( iy ) = beta * abs( y( iy ) )
325 IF ( alpha .NE. 0.0 )
THEN
327 temp = cabs1( a( j, i ) )
328 symb_zero = symb_zero .AND.
329 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
331 y( iy ) = y( iy ) + alpha*cabs1( x( j ) )*temp
335 IF ( .NOT.symb_zero ) y( iy ) =
336 $ y( iy ) + sign( safe1, y( iy ) )
342 IF( trans.EQ.ilatrans(
'N' ) )
THEN
344 IF ( beta .EQ. 0.0 )
THEN
347 ELSE IF ( y( iy ) .EQ. 0.0 )
THEN
351 y( iy ) = beta * abs( y( iy ) )
353 IF ( alpha .NE. 0.0 )
THEN
356 temp = cabs1( a( i, j ) )
357 symb_zero = symb_zero .AND.
358 $ ( x( jx ) .EQ. zero .OR. temp .EQ. zero )
360 y( iy ) = y( iy ) + alpha*cabs1( x( jx ) )*temp
365 IF ( .NOT.symb_zero ) y( iy ) =
366 $ y( iy ) + sign( safe1, y( iy ) )
372 IF ( beta .EQ. 0.0 )
THEN
375 ELSE IF ( y( iy ) .EQ. 0.0 )
THEN
379 y( iy ) = beta * abs( y( iy ) )
381 IF ( alpha .NE. 0.0 )
THEN
384 temp = cabs1( a( j, i ) )
385 symb_zero = symb_zero .AND.
386 $ ( x( jx ) .EQ. zero .OR. temp .EQ. zero )
388 y( iy ) = y( iy ) + alpha*cabs1( x( jx ) )*temp
393 IF ( .NOT.symb_zero ) y( iy ) =
394 $ y( iy ) + sign( safe1, y( iy ) )
integer function ilatrans(TRANS)
ILATRANS
subroutine cla_geamv(TRANS, M, N, ALPHA, A, LDA, X, INCX, BETA, Y, INCY)
CLA_GEAMV computes a matrix-vector product using a general matrix to calculate error bounds...
subroutine xerbla(SRNAME, INFO)
XERBLA
real function slamch(CMACH)
SLAMCH