KTH framework for Nek5000 toolboxes; testing version  0.0.1
zdotc.f
Go to the documentation of this file.
1  double complex function zdotc(n,zx,incx,zy,incy)
2 c
3 c forms the dot product of a vector.
4 c jack dongarra, 3/11/78.
5 c modified 12/3/93, array(1) declarations changed to array(*)
6 c
7  double complex zx(*),zy(*),ztemp
8  integer i,incx,incy,ix,iy,n
9  ztemp = (0.0d0,0.0d0)
10  zdotc = (0.0d0,0.0d0)
11  if(n.le.0)return
12  if(incx.eq.1.and.incy.eq.1)go to 20
13 c
14 c code for unequal increments or equal increments
15 c not equal to 1
16 c
17  ix = 1
18  iy = 1
19  if(incx.lt.0)ix = (-n+1)*incx + 1
20  if(incy.lt.0)iy = (-n+1)*incy + 1
21  do 10 i = 1,n
22  ztemp = ztemp + dconjg(zx(ix))*zy(iy)
23  ix = ix + incx
24  iy = iy + incy
25  10 continue
26  zdotc = ztemp
27  return
28 c
29 c code for both increments equal to 1
30 c
31  20 do 30 i = 1,n
32  ztemp = ztemp + dconjg(zx(i))*zy(i)
33  30 continue
34  zdotc = ztemp
35  return
36  end
double complex function zdotc(n, zx, incx, zy, incy)
Definition: zdotc.f:2