1 SUBROUTINE pbzvecadd( ICONTXT, MODE, N, ALPHA, X, INCX, BETA, Y,
10 INTEGER ICONTXT, INCX, INCY, N
11 COMPLEX*16 ALPHA, BETA
14 COMPLEX*16 X( * ), Y( * )
77 parameter( zero = ( 0.0d+0, 0.0d+0 ) )
78 parameter( one = ( 1.0d+0, 0.0d+0 ) )
88 EXTERNAL zscal, zcopy, zaxpy
95 IF( n.LE.0 .OR. ( alpha.EQ.zero .AND. beta.EQ.one ) )
RETURN
97 IF( alpha.EQ.zero )
THEN
98 IF( beta.EQ.zero )
THEN
112 IF( lsame( mode,
'V' ) )
THEN
113 CALL zscal( n, beta, y, incy )
114 ELSE IF( incy.EQ.1 )
THEN
116 y( i ) = beta * y( i )
121 y( iy ) = beta * y( iy )
127 ELSE IF( .NOT.lsame( mode,
'C' ) )
THEN
128 IF( alpha.EQ.one )
THEN
129 IF( beta.EQ.zero )
THEN
130 IF( lsame( mode,
'V' ) )
THEN
131 CALL zcopy( n, x, incx, y, incy )
132 ELSE IF( incx.EQ.1 .AND. incy.EQ.1 )
THEN
146 ELSE IF( beta.EQ.one )
THEN
147 IF( incx.EQ.1 .AND. incy.EQ.1 )
THEN
149 y( i ) = x( i ) + y( i )
155 y( iy ) = x( ix ) + y( iy )
162 IF( incx.EQ.1 .AND. incy.EQ.1 )
THEN
164 y( i ) = x( i ) + beta * y( i )
170 y( iy ) = x( ix ) + beta * y( iy )
178 IF( beta.EQ.zero )
THEN
179 IF( incx.EQ.1 .AND. incy.EQ.1 )
THEN
181 y( i ) = alpha * x( i )
193 ELSE IF( beta.EQ.one )
THEN
194 IF( lsame( mode,
'V' ) )
THEN
195 CALL zaxpy( n, alpha, x, incx, y, incy )
196 ELSE IF( incx.EQ.1 .AND. incy.EQ.1 )
THEN
198 y( i ) = alpha * x( i ) + y( i )
204 y( iy ) = alpha * x( ix ) + y( iy )
211 IF( incx.EQ.1 .AND. incy.EQ.1 )
THEN
213 y( i ) = alpha * x( i ) + beta * y( i )
219 y( iy ) = alpha * x( ix ) + beta * y( iy )
228 IF( alpha.EQ.one )
THEN
229 IF( beta.EQ.zero )
THEN
230 IF( incx.EQ.1 .AND. incy.EQ.1 )
THEN
232 y( i ) = dconjg( x( i ) )
238 y( iy ) = dconjg( x( ix ) )
244 ELSE IF( beta.EQ.one )
THEN
245 IF( incx.EQ.1 .AND. incy.EQ.1 )
THEN
247 y( i ) = dconjg( x( i ) ) + y( i )
253 y( iy ) = dconjg( x( ix ) ) + y( iy )
260 IF( incx.EQ.1 .AND. incy.EQ.1 )
THEN
262 y( i ) = dconjg( x( i ) ) + beta * y( i )
268 y( iy ) = dconjg( x( ix ) ) + beta * y( iy )
276 IF( beta.EQ.zero )
THEN
277 IF( incx.EQ.1 .AND. incy.EQ.1 )
THEN
279 y( i ) = alpha * dconjg( x( i ) )
285 y( iy ) = alpha * dconjg( x( ix ) )
291 ELSE IF( beta.EQ.one )
THEN
292 IF( incx.EQ.1 .AND. incy.EQ.1 )
THEN
294 y( i ) = alpha * dconjg( x( i ) ) + y( i )
300 y( iy ) = alpha * dconjg( x( ix ) ) + y( iy )
307 IF( incx.EQ.1 .AND. incy.EQ.1 )
THEN
309 y( i ) = alpha * dconjg( x( i ) ) + beta * y( i )
315 y( iy ) = alpha * dconjg( x(ix) ) + beta * y( iy )