1 SUBROUTINE catrmv( UPLO, TRANS, DIAG, N, ALPHA, A, LDA, X, INCX,
10 CHARACTER*1 DIAG, TRANS, UPLO
11 INTEGER INCX, INCY, LDA, N
16 COMPLEX A( LDA, * ), X( * )
122 parameter( one = 1.0e+0, zero = 0.0e+0 )
125 INTEGER I, INFO, IX, IY, J, JX, JY, KX, KY
127 REAL ABSX, TALPHA, TEMP
138 INTRINSIC abs, aimag,
max, real
142 cabs1( zdum ) = abs( real( zdum ) ) + abs( aimag( zdum ) )
149 IF ( .NOT.lsame( uplo ,
'U' ).AND.
150 $ .NOT.lsame( uplo ,
'L' ) )
THEN
152 ELSE IF( .NOT.lsame( trans,
'N' ).AND.
153 $ .NOT.lsame( trans,
'T' ).AND.
154 $ .NOT.lsame( trans,
'C' ) )
THEN
156 ELSE IF( .NOT.lsame( diag ,
'U' ).AND.
157 $ .NOT.lsame( diag ,
'N' ) )
THEN
159 ELSE IF( n.LT.0 )
THEN
161 ELSE IF( lda.LT.
max( 1, n ) )
THEN
163 ELSE IF( incx.EQ.0 )
THEN
165 ELSE IF( incy.EQ.0 )
THEN
169 CALL xerbla(
'CATRMV', info )
176 $ ( ( alpha.EQ.zero ).AND.( beta.EQ.one ) ) )
179 nounit = lsame( diag ,
'N' )
186 kx = 1 - ( n - 1 ) * incx
191 ky = 1 - ( n - 1 ) * incy
200 IF( beta.EQ.zero )
THEN
204 ELSE IF( beta.EQ.one )
THEN
206 y( i ) = abs( y( i ) )
210 y( i ) = abs( beta * y( i ) )
215 IF( beta.EQ.zero )
THEN
220 ELSE IF( beta.EQ.one )
THEN
222 y( iy ) = abs( y( iy ) )
227 y( iy ) = abs( beta * y( iy ) )
236 talpha = abs( alpha )
238 IF( lsame( trans,
'N' ) )
THEN
242 IF( lsame( uplo,
'U' ) )
THEN
246 absx = cabs1( x( jx ) )
247 IF( absx.NE.zero )
THEN
250 y( i ) = y( i ) + temp * cabs1( a( i, j ) )
254 y( j ) = y( j ) + temp * cabs1( a( j, j ) )
256 y( j ) = y( j ) + temp
265 absx = cabs1( x( jx ) )
266 IF( absx.NE.zero )
THEN
270 y( iy ) = y( iy ) + temp * cabs1( a( i, j ) )
275 y( iy ) = y( iy ) + temp * cabs1( a( j, j ) )
277 y( iy ) = y( iy ) + temp
290 absx = cabs1( x( jx ) )
291 IF( absx.NE.zero )
THEN
296 y( j ) = y( j ) + temp * cabs1( a( j, j ) )
298 y( j ) = y( j ) + temp
302 y( i ) = y( i ) + temp * cabs1( a( i, j ) )
311 absx = cabs1( x( jx ) )
312 IF( absx.NE.zero )
THEN
314 iy = ky + ( j - 1 ) * incy
317 y( iy ) = y( iy ) + temp * cabs1( a( j, j ) )
319 y( iy ) = y( iy ) + temp
324 y( iy ) = y( iy ) + temp * cabs1( a( i, j ) )
338 IF( lsame( uplo,
'U' ) )
THEN
346 temp = temp + cabs1( a( i, j ) ) * cabs1( x( i ) )
350 temp = temp + cabs1( a( j, j ) ) * cabs1( x( j ) )
352 temp = temp + cabs1( x( j ) )
355 y( jy ) = y( jy ) + talpha * temp
366 temp = temp + cabs1( a( i, j ) ) * cabs1( x( ix ) )
371 temp = temp + cabs1( a( j, j ) ) * cabs1( x( ix ) )
373 temp = temp + cabs1( x( ix ) )
376 y( jy ) = y( jy ) + talpha * temp
391 temp = cabs1( a( j, j ) ) * cabs1( x( j ) )
393 temp = cabs1( x( j ) )
397 temp = temp + cabs1( a( i, j ) ) * cabs1( x( i ) )
400 y( jy ) = y( jy ) + talpha * temp
409 ix = kx + ( j - 1 ) * incx
412 temp = cabs1( a( j, j ) ) * cabs1( x( ix ) )
414 temp = cabs1( x( ix ) )
419 temp = temp + cabs1( a( i, j ) ) * cabs1( x( ix ) )
421 y( jy ) = y( jy ) + talpha * temp