forked from pnroy/FC
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprod.f
More file actions
executable file
·32 lines (31 loc) · 798 Bytes
/
prod.f
File metadata and controls
executable file
·32 lines (31 loc) · 798 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
subroutine dmatvecprod(prod,arg1,arg2,size)
implicit none
integer size,i
real*8 prod(size),arg1(size),arg2(size)
do 10 i=1,size
prod(i)=arg1(i)*arg2(i)
10 continue
return
end
subroutine dotprod(arg1,arg2,size,dot)
implicit none
integer size,i
real*8 dot,arg1(size),arg2(size),ddot
c dot=ddot(size,arg1,1,arg2,1)
dot=0.d0
do 10 i=1,size
dot=dot+arg1(i)*arg2(i)
10 continue
return
end
subroutine cdotprod(arg1,arg2,size,dot)
implicit none
integer size,i
complex*16 dot,arg1(size),arg2(size),zdotu
c dot=zdotu(size,arg1,1,arg2,1)
dot=(0.d0,0.d0)
do 10 i=1,size
dot=dot+dconjg(arg1(i))*arg2(i)
10 continue
return
end