Skip to content

Commit

Permalink
Rename dot_product to fdot_product in tests.
Browse files Browse the repository at this point in the history
- To avoid overloading the intrinsic dot_product. To be able to use
  the intrinsic dot_product as a reference in the tests.
  • Loading branch information
gha3mi committed Jan 30, 2024
1 parent c3ce3f3 commit b6aed21
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
18 changes: 9 additions & 9 deletions test/test1.f90
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
program test_dot1

use kinds
use fordot
use fordot, only: fdot_product => dot_product ! rename dot_product to fdot_product to avoid overloading
use forunittest

implicit none
Expand All @@ -22,28 +22,28 @@ program test_dot1

a_ref = dot_product(u,v)

a = dot_product(u,v, option='m1')
a = fdot_product(u,v, option='m1')
call ut%check(a, a_ref, tol=1e-5_rk, msg='test_dot1.1')

a = dot_product(u,v, option='m2')
a = fdot_product(u,v, option='m2')
call ut%check(a, a_ref, tol=1e-5_rk, msg='test_dot1.2')

a = dot_product(u,v, option='m3')
a = fdot_product(u,v, option='m3')
call ut%check(a, a_ref, tol=1e-5_rk, msg='test_dot1.3')

a = dot_product(u,v, option='m4')
a = fdot_product(u,v, option='m4')
call ut%check(a, a_ref, tol=1e-5_rk, msg='test_dot1.4')

a = dot_product(u,v, option='m1b', nblock=16)
a = fdot_product(u,v, option='m1b', nblock=16)
call ut%check(a, a_ref, tol=1e-5_rk, msg='test_dot1.5')

a = dot_product(u,v, option='m2b', nblock=16)
a = fdot_product(u,v, option='m2b', nblock=16)
call ut%check(a, a_ref, tol=1e-5_rk, msg='test_dot1.6')

a = dot_product(u,v, option='m3b', nblock=16)
a = fdot_product(u,v, option='m3b', nblock=16)
call ut%check(a, a_ref, tol=1e-5_rk, msg='test_dot1.7')

a = dot_product(u,v, option='m4b', nblock=16)
a = fdot_product(u,v, option='m4b', nblock=16)
call ut%check(a, a_ref, tol=1e-5_rk, msg='test_dot1.8')

end program test_dot1
Expand Down
10 changes: 5 additions & 5 deletions test/test2.f90
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
program test_dot2

use kinds
use fordot
use fordot, only: fdot_product => dot_product ! rename dot_product to fdot_product to avoid overloading
use forunittest

implicit none
Expand All @@ -28,16 +28,16 @@ program test_dot2

a_ref = dot_product(u,v)

a = dot_product(u,v, coarray=.true., option='m1')
a = fdot_product(u,v, coarray=.true., option='m1')
if (im==1) call ut%check(a, a_ref, tol=1e-5_rk, msg='test_dot2.1')

a = dot_product(u,v, coarray=.true., option='m2')
a = fdot_product(u,v, coarray=.true., option='m2')
if (im==1) call ut%check(a, a_ref, tol=1e-5_rk, msg='test_dot2.2')

a = dot_product(u,v, coarray=.true., option='m3')
a = fdot_product(u,v, coarray=.true., option='m3')
if (im==1) call ut%check(a, a_ref, tol=1e-5_rk, msg='test_dot2.3')

a = dot_product(u,v, coarray=.true., option='m4')
a = fdot_product(u,v, coarray=.true., option='m4')
if (im==1) call ut%check(a, a_ref, tol=1e-5_rk, msg='test_dot2.4')

end program test_dot2
Expand Down

0 comments on commit b6aed21

Please sign in to comment.