175 SUBROUTINE zla_geamv ( TRANS, M, N, ALPHA, A, LDA, X, INCX, BETA,
184 DOUBLE PRECISION alpha, beta
185 INTEGER incx, incy, lda, m, n
189 COMPLEX*16 a( lda, * ), x( * )
190 DOUBLE PRECISION y( * )
197 parameter( one = 1.0d+0, zero = 0.0d+0 )
201 DOUBLE PRECISION temp, safe1
202 INTEGER i, info, iy, j, jx, kx, ky, lenx, leny
214 INTRINSIC max, abs,
REAL, dimag, sign
217 DOUBLE PRECISION cabs1
220 cabs1( cdum ) = abs( dble( cdum ) ) + abs( dimag( cdum ) )
227 IF ( .NOT.( ( trans.EQ.
ilatrans(
'N' ) )
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(
'ZLA_GEAMV ', info )
249 IF( ( m.EQ.0 ).OR.( n.EQ.0 ).OR.
250 $ ( ( alpha.EQ.zero ).AND.( beta.EQ.one ) ) )
266 kx = 1 - ( lenx - 1 )*incx
271 ky = 1 - ( leny - 1 )*incy
277 safe1 =
dlamch(
'Safe minimum' )
287 IF ( incx.EQ.1 )
THEN
290 IF ( beta .EQ. 0.0d+0 )
THEN
293 ELSE IF ( y( iy ) .EQ. 0.0d+0 )
THEN
297 y( iy ) = beta * abs( y( iy ) )
299 IF ( alpha .NE. 0.0d+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.0d+0 )
THEN
319 ELSE IF ( y( iy ) .EQ. 0.0d+0 )
THEN
323 y( iy ) = beta * abs( y( iy ) )
325 IF ( alpha .NE. 0.0d+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 ) )
344 IF ( beta .EQ. 0.0d+0 )
THEN
347 ELSE IF ( y( iy ) .EQ. 0.0d+0 )
THEN
351 y( iy ) = beta * abs( y( iy ) )
353 IF ( alpha .NE. 0.0d+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.0d+0 )
THEN
375 ELSE IF ( y( iy ) .EQ. 0.0d+0 )
THEN
379 y( iy ) = beta * abs( y( iy ) )
381 IF ( alpha .NE. 0.0d+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 ) )