177 SUBROUTINE sla_syamv( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y,
187 INTEGER INCX, INCY, LDA, N, UPLO
190 REAL A( lda, * ), X( * ), Y( * )
197 parameter ( one = 1.0e+0, zero = 0.0e+0 )
202 INTEGER I, INFO, IY, J, JX, KX, KY
213 INTRINSIC max, abs, sign
220 IF ( uplo.NE.ilauplo(
'U' ) .AND.
221 $ uplo.NE.ilauplo(
'L' ) )
THEN
223 ELSE IF( n.LT.0 )
THEN
225 ELSE IF( lda.LT.max( 1, n ) )
THEN
227 ELSE IF( incx.EQ.0 )
THEN
229 ELSE IF( incy.EQ.0 )
THEN
233 CALL xerbla(
'SSYMV ', info )
239 IF( ( n.EQ.0 ).OR.( ( alpha.EQ.zero ).AND.( beta.EQ.one ) ) )
247 kx = 1 - ( n - 1 )*incx
252 ky = 1 - ( n - 1 )*incy
258 safe1 = slamch(
'Safe minimum' )
268 IF ( incx.EQ.1 )
THEN
269 IF ( uplo .EQ. ilauplo(
'U' ) )
THEN
271 IF ( beta .EQ. zero )
THEN
274 ELSE IF ( y( iy ) .EQ. zero )
THEN
278 y( iy ) = beta * abs( y( iy ) )
280 IF ( alpha .NE. zero )
THEN
282 temp = abs( a( j, i ) )
283 symb_zero = symb_zero .AND.
284 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
286 y( iy ) = y( iy ) + alpha*abs( x( j ) )*temp
289 temp = abs( a( i, j ) )
290 symb_zero = symb_zero .AND.
291 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
293 y( iy ) = y( iy ) + alpha*abs( x( j ) )*temp
297 IF ( .NOT.symb_zero )
298 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
304 IF ( beta .EQ. zero )
THEN
307 ELSE IF ( y( iy ) .EQ. zero )
THEN
311 y( iy ) = beta * abs( y( iy ) )
313 IF ( alpha .NE. zero )
THEN
315 temp = abs( a( i, j ) )
316 symb_zero = symb_zero .AND.
317 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
319 y( iy ) = y( iy ) + alpha*abs( x( j ) )*temp
322 temp = abs( a( j, i ) )
323 symb_zero = symb_zero .AND.
324 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
326 y( iy ) = y( iy ) + alpha*abs( x( j ) )*temp
330 IF ( .NOT.symb_zero )
331 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
337 IF ( uplo .EQ. ilauplo(
'U' ) )
THEN
339 IF ( beta .EQ. zero )
THEN
342 ELSE IF ( y( iy ) .EQ. zero )
THEN
346 y( iy ) = beta * abs( y( iy ) )
349 IF ( alpha .NE. zero )
THEN
351 temp = abs( a( j, i ) )
352 symb_zero = symb_zero .AND.
353 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
355 y( iy ) = y( iy ) + alpha*abs( x( jx ) )*temp
359 temp = abs( a( i, j ) )
360 symb_zero = symb_zero .AND.
361 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
363 y( iy ) = y( iy ) + alpha*abs( x( jx ) )*temp
368 IF ( .NOT.symb_zero )
369 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
375 IF ( beta .EQ. zero )
THEN
378 ELSE IF ( y( iy ) .EQ. zero )
THEN
382 y( iy ) = beta * abs( y( iy ) )
385 IF ( alpha .NE. zero )
THEN
387 temp = abs( a( i, j ) )
388 symb_zero = symb_zero .AND.
389 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
391 y( iy ) = y( iy ) + alpha*abs( x( jx ) )*temp
395 temp = abs( a( j, i ) )
396 symb_zero = symb_zero .AND.
397 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
399 y( iy ) = y( iy ) + alpha*abs( x( jx ) )*temp
404 IF ( .NOT.symb_zero )
405 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
subroutine sla_syamv(UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y, INCY)
SLA_SYAMV computes a matrix-vector product using a symmetric indefinite matrix to calculate error bou...
subroutine xerbla(SRNAME, INFO)
XERBLA
real function slamch(CMACH)
SLAMCH
integer function ilauplo(UPLO)
ILAUPLO