175 SUBROUTINE zla_geamv( TRANS, M, N, ALPHA, A, LDA, X, INCX, BETA,
183 DOUBLE PRECISION ALPHA, BETA
184 INTEGER INCX, INCY, LDA, M, N
188 COMPLEX*16 A( LDA, * ), X( * )
189 DOUBLE PRECISION Y( * )
196 parameter( one = 1.0d+0, zero = 0.0d+0 )
200 DOUBLE PRECISION TEMP, SAFE1
201 INTEGER I, INFO, IY, J, JX, KX, KY, LENX, LENY
206 DOUBLE PRECISION DLAMCH
213 INTRINSIC max, abs, real, dimag, sign
216 DOUBLE PRECISION CABS1
219 cabs1( cdum ) = abs( dble( cdum ) ) + abs( dimag( cdum ) )
226 IF ( .NOT.( ( trans.EQ.ilatrans(
'N' ) )
227 $ .OR. ( trans.EQ.ilatrans(
'T' ) )
228 $ .OR. ( trans.EQ.ilatrans(
'C' ) ) ) )
THEN
230 ELSE IF( m.LT.0 )
THEN
232 ELSE IF( n.LT.0 )
THEN
234 ELSE IF( lda.LT.max( 1, m ) )
THEN
236 ELSE IF( incx.EQ.0 )
THEN
238 ELSE IF( incy.EQ.0 )
THEN
242 CALL xerbla(
'ZLA_GEAMV ', info )
248 IF( ( m.EQ.0 ).OR.( n.EQ.0 ).OR.
249 $ ( ( alpha.EQ.zero ).AND.( beta.EQ.one ) ) )
255 IF( trans.EQ.ilatrans(
'N' ) )
THEN
265 kx = 1 - ( lenx - 1 )*incx
270 ky = 1 - ( leny - 1 )*incy
276 safe1 = dlamch(
'Safe minimum' )
286 IF ( incx.EQ.1 )
THEN
287 IF( trans.EQ.ilatrans(
'N' ) )
THEN
289 IF ( beta .EQ. 0.0d+0 )
THEN
292 ELSE IF ( y( iy ) .EQ. 0.0d+0 )
THEN
296 y( iy ) = beta * abs( y( iy ) )
298 IF ( alpha .NE. 0.0d+0 )
THEN
300 temp = cabs1( a( i, j ) )
301 symb_zero = symb_zero .AND.
302 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
304 y( iy ) = y( iy ) + alpha*cabs1( x( j ) )*temp
308 IF ( .NOT.symb_zero ) y( iy ) =
309 $ y( iy ) + sign( safe1, y( iy ) )
315 IF ( beta .EQ. 0.0d+0 )
THEN
318 ELSE IF ( y( iy ) .EQ. 0.0d+0 )
THEN
322 y( iy ) = beta * abs( y( iy ) )
324 IF ( alpha .NE. 0.0d+0 )
THEN
326 temp = cabs1( a( j, i ) )
327 symb_zero = symb_zero .AND.
328 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
330 y( iy ) = y( iy ) + alpha*cabs1( x( j ) )*temp
334 IF ( .NOT.symb_zero ) y( iy ) =
335 $ y( iy ) + sign( safe1, y( iy ) )
341 IF( trans.EQ.ilatrans(
'N' ) )
THEN
343 IF ( beta .EQ. 0.0d+0 )
THEN
346 ELSE IF ( y( iy ) .EQ. 0.0d+0 )
THEN
350 y( iy ) = beta * abs( y( iy ) )
352 IF ( alpha .NE. 0.0d+0 )
THEN
355 temp = cabs1( a( i, j ) )
356 symb_zero = symb_zero .AND.
357 $ ( x( jx ) .EQ. zero .OR. temp .EQ. zero )
359 y( iy ) = y( iy ) + alpha*cabs1( x( jx ) )*temp
364 IF ( .NOT.symb_zero ) y( iy ) =
365 $ y( iy ) + sign( safe1, y( iy ) )
371 IF ( beta .EQ. 0.0d+0 )
THEN
374 ELSE IF ( y( iy ) .EQ. 0.0d+0 )
THEN
378 y( iy ) = beta * abs( y( iy ) )
380 IF ( alpha .NE. 0.0d+0 )
THEN
383 temp = cabs1( a( j, i ) )
384 symb_zero = symb_zero .AND.
385 $ ( x( jx ) .EQ. zero .OR. temp .EQ. zero )
387 y( iy ) = y( iy ) + alpha*cabs1( x( jx ) )*temp
392 IF ( .NOT.symb_zero ) y( iy ) =
393 $ y( iy ) + sign( safe1, y( iy ) )
subroutine xerbla(srname, info)
integer function ilatrans(trans)
ILATRANS
subroutine zla_geamv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
ZLA_GEAMV computes a matrix-vector product using a general matrix to calculate error bounds.
double precision function dlamch(cmach)
DLAMCH