Team Ai
Datasetpublic

codekingpro/portable-devtools

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