174 SUBROUTINE cla_heamv( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y,
183 INTEGER INCX, INCY, LDA, N, UPLO
186 COMPLEX A( LDA, * ), X( * )
194 parameter( one = 1.0e+0, zero = 0.0e+0 )
199 INTEGER I, INFO, IY, J, JX, KX, KY
211 INTRINSIC max, abs, sign, real, aimag
217 cabs1( zdum ) = abs( real( zdum ) ) + abs( aimag( zdum ) )
224 IF ( uplo.NE.ilauplo(
'U' ) .AND.
225 $ uplo.NE.ilauplo(
'L' ) )
THEN
227 ELSE IF( n.LT.0 )
THEN
229 ELSE IF( lda.LT.max( 1, n ) )
THEN
231 ELSE IF( incx.EQ.0 )
THEN
233 ELSE IF( incy.EQ.0 )
THEN
237 CALL xerbla(
'CHEMV ', info )
243 IF( ( n.EQ.0 ).OR.( ( alpha.EQ.zero ).AND.( beta.EQ.one ) ) )
251 kx = 1 - ( n - 1 )*incx
256 ky = 1 - ( n - 1 )*incy
262 safe1 = slamch(
'Safe minimum' )
272 IF ( incx.EQ.1 )
THEN
273 IF ( uplo .EQ. ilauplo(
'U' ) )
THEN
275 IF ( beta .EQ. zero )
THEN
278 ELSE IF ( y( iy ) .EQ. zero )
THEN
282 y( iy ) = beta * abs( y( iy ) )
284 IF ( alpha .NE. zero )
THEN
286 temp = cabs1( a( j, i ) )
287 symb_zero = symb_zero .AND.
288 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
290 y( iy ) = y( iy ) + alpha*cabs1( x( j ) )*temp
293 temp = cabs1( a( i, j ) )
294 symb_zero = symb_zero .AND.
295 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
297 y( iy ) = y( iy ) + alpha*cabs1( x( j ) )*temp
302 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
308 IF ( beta .EQ. zero )
THEN
311 ELSE IF ( y( iy ) .EQ. zero )
THEN
315 y( iy ) = beta * abs( y( iy ) )
317 IF ( alpha .NE. zero )
THEN
319 temp = cabs1( a( i, j ) )
320 symb_zero = symb_zero .AND.
321 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
323 y( iy ) = y( iy ) + alpha*cabs1( x( j ) )*temp
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
335 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
341 IF ( uplo .EQ. ilauplo(
'U' ) )
THEN
343 IF ( beta .EQ. zero )
THEN
346 ELSE IF ( y( iy ) .EQ. zero )
THEN
350 y( iy ) = beta * abs( y( iy ) )
353 IF ( alpha .NE. zero )
THEN
355 temp = cabs1( a( j, i ) )
356 symb_zero = symb_zero .AND.
357 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
359 y( iy ) = y( iy ) + alpha*cabs1( x( jx ) )*temp
363 temp = cabs1( a( i, j ) )
364 symb_zero = symb_zero .AND.
365 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
367 y( iy ) = y( iy ) + alpha*cabs1( x( jx ) )*temp
372 IF ( .NOT.symb_zero )
373 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
379 IF ( beta .EQ. zero )
THEN
382 ELSE IF ( y( iy ) .EQ. zero )
THEN
386 y( iy ) = beta * abs( y( iy ) )
389 IF ( alpha .NE. zero )
THEN
391 temp = cabs1( a( i, j ) )
392 symb_zero = symb_zero .AND.
393 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
395 y( iy ) = y( iy ) + alpha*cabs1( x( jx ) )*temp
399 temp = cabs1( a( j, i ) )
400 symb_zero = symb_zero .AND.
401 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
403 y( iy ) = y( iy ) + alpha*cabs1( x( jx ) )*temp
408 IF ( .NOT.symb_zero )
409 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
subroutine cla_heamv(uplo, n, alpha, a, lda, x, incx, beta, y, incy)
CLA_HEAMV computes a matrix-vector product using a Hermitian indefinite matrix to calculate error bou...