148 SUBROUTINE cspmv( UPLO, N, ALPHA, AP, X, INCX, BETA, Y, INCY )
156 INTEGER INCX, INCY, N
160 COMPLEX AP( * ), X( * ), Y( * )
167 parameter( one = ( 1.0e+0, 0.0e+0 ) )
169 parameter( zero = ( 0.0e+0, 0.0e+0 ) )
172 INTEGER I, INFO, IX, IY, J, JX, JY, K, KK, KX, KY
187 IF( .NOT.lsame( uplo,
'U' ) .AND.
188 $ .NOT.lsame( uplo,
'L' ) )
THEN
190 ELSE IF( n.LT.0 )
THEN
192 ELSE IF( incx.EQ.0 )
THEN
194 ELSE IF( incy.EQ.0 )
THEN
198 CALL xerbla(
'CSPMV ', info )
204 IF( ( n.EQ.0 ) .OR. ( ( alpha.EQ.zero ) .AND. ( beta.EQ.one ) ) )
212 kx = 1 - ( n-1 )*incx
217 ky = 1 - ( n-1 )*incy
225 IF( beta.NE.one )
THEN
227 IF( beta.EQ.zero )
THEN
238 IF( beta.EQ.zero )
THEN
245 y( iy ) = beta*y( iy )
254 IF( lsame( uplo,
'U' ) )
THEN
258 IF( ( incx.EQ.1 ) .AND. ( incy.EQ.1 ) )
THEN
264 y( i ) = y( i ) + temp1*ap( k )
265 temp2 = temp2 + ap( k )*x( i )
268 y( j ) = y( j ) + temp1*ap( kk+j-1 ) + alpha*temp2
275 temp1 = alpha*x( jx )
279 DO 70 k = kk, kk + j - 2
280 y( iy ) = y( iy ) + temp1*ap( k )
281 temp2 = temp2 + ap( k )*x( ix )
285 y( jy ) = y( jy ) + temp1*ap( kk+j-1 ) + alpha*temp2
295 IF( ( incx.EQ.1 ) .AND. ( incy.EQ.1 ) )
THEN
299 y( j ) = y( j ) + temp1*ap( kk )
302 y( i ) = y( i ) + temp1*ap( k )
303 temp2 = temp2 + ap( k )*x( i )
306 y( j ) = y( j ) + alpha*temp2
313 temp1 = alpha*x( jx )
315 y( jy ) = y( jy ) + temp1*ap( kk )
318 DO 110 k = kk + 1, kk + n - j
321 y( iy ) = y( iy ) + temp1*ap( k )
322 temp2 = temp2 + ap( k )*x( ix )
324 y( jy ) = y( jy ) + alpha*temp2
subroutine cspmv(uplo, n, alpha, ap, x, incx, beta, y, incy)
CSPMV computes a matrix-vector product for complex vectors using a complex symmetric packed matrix