Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
foo_mod.f9042 linesDownload Raw Back to assumed_shape
1
2module mod
3
4contains
5
6subroutine sum(x, res)
7  implicit none
8  real, intent(in) :: x(:)
9  real, intent(out) :: res
10
11  integer :: i
12
13  !print *, "sum: size(x) = ", size(x)
14
15  res = 0.0
16
17  do i = 1, size(x)
18    res = res + x(i)
19  enddo
20
21end subroutine sum
22
23function fsum(x) result (res)
24  implicit none
25  real, intent(in) :: x(:)
26  real :: res
27
28  integer :: i
29
30  !print *, "fsum: size(x) = ", size(x)
31
32  res = 0.0
33
34  do i = 1, size(x)
35    res = res + x(i)
36  enddo
37
38end function fsum
39
40
41end module mod
42 
codekingpro/portable-devtools · Team Ai