177 SUBROUTINE cla_syamv( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y,
186 INTEGER INCX, INCY, LDA, N
190 COMPLEX A( LDA, * ), X( * )
198 parameter( one = 1.0e+0, zero = 0.0e+0 )
203 INTEGER I, INFO, IY, J, JX, KX, KY
215 INTRINSIC max, abs, sign, real, aimag
221 cabs1( zdum ) = abs( real( zdum ) ) + abs( aimag( 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(
'CLA_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 = slamch(
'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 cla_syamv(uplo, n, alpha, a, lda, x, incx, beta, y, incy)
CLA_SYAMV computes a matrix-vector product using a symmetric indefinite matrix to calculate error bou...
real function slamch(cmach)
SLAMCH