173 SUBROUTINE sla_syamv( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y,
182 INTEGER INCX, INCY, LDA, N, UPLO
185 REAL A( LDA, * ), X( * ), Y( * )
192 parameter( one = 1.0e+0, zero = 0.0e+0 )
197 INTEGER I, INFO, IY, J, JX, KX, KY
208 INTRINSIC max, abs, sign
215 IF ( uplo.NE.ilauplo(
'U' ) .AND.
216 $ uplo.NE.ilauplo(
'L' ) )
THEN
218 ELSE IF( n.LT.0 )
THEN
220 ELSE IF( lda.LT.max( 1, n ) )
THEN
222 ELSE IF( incx.EQ.0 )
THEN
224 ELSE IF( incy.EQ.0 )
THEN
228 CALL xerbla(
'SLA_SYAMV', info )
234 IF( ( n.EQ.0 ).OR.( ( alpha.EQ.zero ).AND.( beta.EQ.one ) ) )
242 kx = 1 - ( n - 1 )*incx
247 ky = 1 - ( n - 1 )*incy
253 safe1 = slamch(
'Safe minimum' )
263 IF ( incx.EQ.1 )
THEN
264 IF ( uplo .EQ. ilauplo(
'U' ) )
THEN
266 IF ( beta .EQ. zero )
THEN
269 ELSE IF ( y( iy ) .EQ. zero )
THEN
273 y( iy ) = beta * abs( y( iy ) )
275 IF ( alpha .NE. zero )
THEN
277 temp = abs( a( j, i ) )
278 symb_zero = symb_zero .AND.
279 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
281 y( iy ) = y( iy ) + alpha*abs( x( j ) )*temp
284 temp = abs( a( i, j ) )
285 symb_zero = symb_zero .AND.
286 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
288 y( iy ) = y( iy ) + alpha*abs( x( j ) )*temp
292 IF ( .NOT.symb_zero )
293 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
299 IF ( beta .EQ. zero )
THEN
302 ELSE IF ( y( iy ) .EQ. zero )
THEN
306 y( iy ) = beta * abs( y( iy ) )
308 IF ( alpha .NE. zero )
THEN
310 temp = abs( a( i, j ) )
311 symb_zero = symb_zero .AND.
312 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
314 y( iy ) = y( iy ) + alpha*abs( x( j ) )*temp
317 temp = abs( a( j, i ) )
318 symb_zero = symb_zero .AND.
319 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
321 y( iy ) = y( iy ) + alpha*abs( x( j ) )*temp
325 IF ( .NOT.symb_zero )
326 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
332 IF ( uplo .EQ. ilauplo(
'U' ) )
THEN
334 IF ( beta .EQ. zero )
THEN
337 ELSE IF ( y( iy ) .EQ. zero )
THEN
341 y( iy ) = beta * abs( y( iy ) )
344 IF ( alpha .NE. zero )
THEN
346 temp = abs( a( j, i ) )
347 symb_zero = symb_zero .AND.
348 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
350 y( iy ) = y( iy ) + alpha*abs( x( jx ) )*temp
354 temp = abs( a( i, j ) )
355 symb_zero = symb_zero .AND.
356 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
358 y( iy ) = y( iy ) + alpha*abs( x( jx ) )*temp
363 IF ( .NOT.symb_zero )
364 $ y( iy ) = y( iy ) + sign( safe1, y( iy ) )
370 IF ( beta .EQ. zero )
THEN
373 ELSE IF ( y( iy ) .EQ. zero )
THEN
377 y( iy ) = beta * abs( y( iy ) )
380 IF ( alpha .NE. zero )
THEN
382 temp = abs( a( i, j ) )
383 symb_zero = symb_zero .AND.
384 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
386 y( iy ) = y( iy ) + alpha*abs( x( jx ) )*temp
390 temp = abs( a( j, i ) )
391 symb_zero = symb_zero .AND.
392 $ ( x( j ) .EQ. zero .OR. temp .EQ. zero )
394 y( iy ) = y( iy ) + alpha*abs( x( jx ) )*temp
399 IF ( .NOT.symb_zero )
400 $ 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...