Skip to content
Snippets Groups Projects
Commit a955c124 authored by kamischi's avatar kamischi
Browse files

try openmp

parent fd66ea35
Branches
No related tags found
No related merge requests found
......@@ -106,9 +106,13 @@ subroutine quanc8(fun, a, b, abserr, relerr, result, errest, nofun, flag, eps, t
x(6) = (x(4) + x(8)) / 2
x(10) = (x(8) + x(12)) / 2
x(14) = (x(12) + x(16)) / 2
!*** !$OMP PARALLEL shared (f, x, eps, thick, layers, nper) private (j)
!*** !$OMP DO
do j = 2, 16, 2
f(j) = fun(x(j), eps, thick, layers, nper, size(eps))
enddo
!*** !$OMP END DO NOWAIT
!*** !$OMP END PARALLEL
nofun = 9
do
......@@ -121,8 +125,14 @@ subroutine quanc8(fun, a, b, abserr, relerr, result, errest, nofun, flag, eps, t
f(1) = fun(x(1), eps, thick, layers, nper, size(eps))
do j = 3, 15, 2
x(j) = (x(j - 1) + x(j + 1)) / 2
enddo
!*** !$OMP PARALLEL shared (f, x, eps, thick, layers, nper) private (j)
!*** !$OMP DO SCHEDULE(auto)
do j = 3, 15, 2
f(j) = fun(x(j), eps, thick, layers, nper, size(eps))
enddo
!*** !$OMP END DO NOWAIT
!*** !$OMP END PARALLEL
nofun = nofun + 8
step = (x(16) - x0) / 16.0d0
qleft = (w0 * (f0 + f(8)) + w1 * (f(1) + f(7)) + w2 * (f(2) + f(6)) &
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment