177 SUBROUTINE zla_syamv( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y,
185 DOUBLE PRECISION ALPHA, BETA
186 INTEGER INCX, INCY, LDA, N
190 COMPLEX*16 A( LDA, * ), X( * )
191 DOUBLE PRECISION Y( * )
197 DOUBLE PRECISION ONE, ZERO
198 parameter( one = 1.0d+0, zero = 0.0d+0 )
202 DOUBLE PRECISION TEMP, SAFE1
203 INTEGER I, INFO, IY, J, JX, KX, KY
208 DOUBLE PRECISION DLAMCH
215 INTRINSIC max, abs, sign, real, dimag
218 DOUBLE PRECISION CABS1
221 cabs1( zdum ) = abs( dble( zdum ) ) + abs( dimag( zdum ) )
228 IF ( uplo.NE.ilauplo(
'U' ) .AND.
229 $ uplo.NE.ilauplo(
'L' ) )
THEN
231 ELSE IF( n.LT.0 )
THEN
233 ELSE IF( lda.LT.max( 1, n ) )
THEN
235 ELSE IF( incx.EQ.0 )
THEN
237 ELSE IF( incy.EQ.0 )
THEN
241 CALL xerbla(
'ZLA_SYAMV', info )
247 IF( ( n.EQ.0 ).OR.( ( alpha.EQ.zero ).AND.( beta.EQ.one ) ) )
255 kx = 1 - ( n - 1 )*incx
260 ky = 1 - ( n - 1 )*incy
266 safe1 = dlamch(
'Safe minimum' )
276 IF ( incx.EQ.1 )
THEN
277 IF ( uplo .EQ. ilauplo(
'U' ) )
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 = cabs1( a( j, i ) )
291 symb_zero = symb_zero .AND.
292 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
294 y( iy ) = y( iy ) + alpha*cabs1( x( j ) )*temp
297 temp = cabs1( a( i, j ) )
298 symb_zero = symb_zero .AND.
299 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
301 y( iy ) = y( iy ) + alpha*cabs1( x( j ) )*temp
305 IF ( .NOT.symb_zero )
306 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
312 IF ( beta .EQ. zero )
THEN
315 ELSE IF ( y( iy ) .EQ. zero )
THEN
319 y( iy ) = beta * abs( y( iy ) )
321 IF ( alpha .NE. zero )
THEN
323 temp = cabs1( a( i, j ) )
324 symb_zero = symb_zero .AND.
325 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
327 y( iy ) = y( iy ) + alpha*cabs1( x( j ) )*temp
330 temp = cabs1( a( j, i ) )
331 symb_zero = symb_zero .AND.
332 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
334 y( iy ) = y( iy ) + alpha*cabs1( x( j ) )*temp
338 IF ( .NOT.symb_zero )
339 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
345 IF ( uplo .EQ. ilauplo(
'U' ) )
THEN
347 IF ( beta .EQ. zero )
THEN
350 ELSE IF ( y( iy ) .EQ. zero )
THEN
354 y( iy ) = beta * abs( y( iy ) )
357 IF ( alpha .NE. zero )
THEN
359 temp = cabs1( a( j, i ) )
360 symb_zero = symb_zero .AND.
361 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
363 y( iy ) = y( iy ) + alpha*cabs1( x( jx ) )*temp
367 temp = cabs1( a( i, j ) )
368 symb_zero = symb_zero .AND.
369 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
371 y( iy ) = y( iy ) + alpha*cabs1( x( jx ) )*temp
376 IF ( .NOT.symb_zero )
377 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
383 IF ( beta .EQ. zero )
THEN
386 ELSE IF ( y( iy ) .EQ. zero )
THEN
390 y( iy ) = beta * abs( y( iy ) )
393 IF ( alpha .NE. zero )
THEN
395 temp = cabs1( a( i, j ) )
396 symb_zero = symb_zero .AND.
397 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
399 y( iy ) = y( iy ) + alpha*cabs1( x( jx ) )*temp
403 temp = cabs1( a( j, i ) )
404 symb_zero = symb_zero .AND.
405 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
407 y( iy ) = y( iy ) + alpha*cabs1( x( jx ) )*temp
412 IF ( .NOT.symb_zero )
413 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
subroutine xerbla(srname, info)
integer function ilauplo(uplo)
ILAUPLO
subroutine zla_syamv(uplo, n, alpha, a, lda, x, incx, beta, y, incy)
ZLA_SYAMV computes a matrix-vector product using a symmetric indefinite matrix to calculate error bou...
double precision function dlamch(cmach)
DLAMCH