178 SUBROUTINE cla_heamv( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y,
188 INTEGER INCX, INCY, LDA, N, UPLO
191 COMPLEX A( lda, * ), X( * )
199 parameter ( one = 1.0e+0, zero = 0.0e+0 )
204 INTEGER I, INFO, IY, J, JX, KX, KY
216 INTRINSIC max, abs, sign,
REAL, AIMAG
222 cabs1( zdum ) = abs(
REAL ( ZDUM ) ) + abs( AIMAG ( zdum ) )
229 IF ( uplo.NE.ilauplo(
'U' ) .AND.
230 $ uplo.NE.ilauplo(
'L' ) )
THEN
232 ELSE IF( n.LT.0 )
THEN
234 ELSE IF( lda.LT.max( 1, n ) )
THEN
236 ELSE IF( incx.EQ.0 )
THEN
238 ELSE IF( incy.EQ.0 )
THEN
242 CALL xerbla(
'CHEMV ', info )
248 IF( ( n.EQ.0 ).OR.( ( alpha.EQ.zero ).AND.( beta.EQ.one ) ) )
256 kx = 1 - ( n - 1 )*incx
261 ky = 1 - ( n - 1 )*incy
267 safe1 = slamch(
'Safe minimum' )
277 IF ( incx.EQ.1 )
THEN
278 IF ( uplo .EQ. ilauplo(
'U' ) )
THEN
280 IF ( beta .EQ. zero )
THEN
283 ELSE IF ( y( iy ) .EQ. zero )
THEN
287 y( iy ) = beta * abs( y( iy ) )
289 IF ( alpha .NE. zero )
THEN
291 temp = cabs1( a( j, i ) )
292 symb_zero = symb_zero .AND.
293 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
295 y( iy ) = y( iy ) + alpha*cabs1( x( j ) )*temp
298 temp = cabs1( a( i, j ) )
299 symb_zero = symb_zero .AND.
300 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
302 y( iy ) = y( iy ) + alpha*cabs1( x( j ) )*temp
307 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
313 IF ( beta .EQ. zero )
THEN
316 ELSE IF ( y( iy ) .EQ. zero )
THEN
320 y( iy ) = beta * abs( y( iy ) )
322 IF ( alpha .NE. zero )
THEN
324 temp = cabs1( a( i, j ) )
325 symb_zero = symb_zero .AND.
326 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
328 y( iy ) = y( iy ) + alpha*cabs1( x( j ) )*temp
331 temp = cabs1( a( j, i ) )
332 symb_zero = symb_zero .AND.
333 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
335 y( iy ) = y( iy ) + alpha*cabs1( x( j ) )*temp
340 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
346 IF ( uplo .EQ. ilauplo(
'U' ) )
THEN
348 IF ( beta .EQ. zero )
THEN
351 ELSE IF ( y( iy ) .EQ. zero )
THEN
355 y( iy ) = beta * abs( y( iy ) )
358 IF ( alpha .NE. zero )
THEN
360 temp = cabs1( a( j, i ) )
361 symb_zero = symb_zero .AND.
362 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
364 y( iy ) = y( iy ) + alpha*cabs1( x( jx ) )*temp
368 temp = cabs1( a( i, j ) )
369 symb_zero = symb_zero .AND.
370 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
372 y( iy ) = y( iy ) + alpha*cabs1( x( jx ) )*temp
377 IF ( .NOT.symb_zero )
378 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
384 IF ( beta .EQ. zero )
THEN
387 ELSE IF ( y( iy ) .EQ. zero )
THEN
391 y( iy ) = beta * abs( y( iy ) )
394 IF ( alpha .NE. zero )
THEN
396 temp = cabs1( a( i, j ) )
397 symb_zero = symb_zero .AND.
398 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
400 y( iy ) = y( iy ) + alpha*cabs1( x( jx ) )*temp
404 temp = cabs1( a( j, i ) )
405 symb_zero = symb_zero .AND.
406 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
408 y( iy ) = y( iy ) + alpha*cabs1( x( jx ) )*temp
413 IF ( .NOT.symb_zero )
414 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
subroutine xerbla(SRNAME, INFO)
XERBLA
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...
integer function ilauplo(UPLO)
ILAUPLO
real function slamch(CMACH)
SLAMCH