Mercurial > octave
comparison libcruft/blas/zcopy.f @ 2329:30c606bec7a8
[project @ 1996-07-19 01:29:05 by jwe]
Initial revision
author | jwe |
---|---|
date | Fri, 19 Jul 1996 01:29:55 +0000 |
parents | |
children | bac14003d9bb |
comparison
equal
deleted
inserted
replaced
2328:b44c3b2a5fce | 2329:30c606bec7a8 |
---|---|
1 subroutine zcopy(n,zx,incx,zy,incy) | |
2 c | |
3 c copies a vector, x, to a vector, y. | |
4 c jack dongarra, linpack, 4/11/78. | |
5 c | |
6 double complex zx(1),zy(1) | |
7 integer i,incx,incy,ix,iy,n | |
8 c | |
9 if(n.le.0)return | |
10 if(incx.eq.1.and.incy.eq.1)go to 20 | |
11 c | |
12 c code for unequal increments or equal increments | |
13 c not equal to 1 | |
14 c | |
15 ix = 1 | |
16 iy = 1 | |
17 if(incx.lt.0)ix = (-n+1)*incx + 1 | |
18 if(incy.lt.0)iy = (-n+1)*incy + 1 | |
19 do 10 i = 1,n | |
20 zy(iy) = zx(ix) | |
21 ix = ix + incx | |
22 iy = iy + incy | |
23 10 continue | |
24 return | |
25 c | |
26 c code for both increments equal to 1 | |
27 c | |
28 20 do 30 i = 1,n | |
29 zy(i) = zx(i) | |
30 30 continue | |
31 return | |
32 end |