Skip to content

Commit

Permalink
Oops comparing error and reference
Browse files Browse the repository at this point in the history
  • Loading branch information
brryan committed Sep 22, 2024
1 parent 77932f6 commit 93da7dc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tst/unit/test_kokkos_abstraction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -325,9 +325,8 @@ bool test_wrapper_nested_3d(OuterLoopPattern outer_loop_pattern,
for (int j = 0; j < N; j++) {
for (int i = 1; i < N - 1; i++) {
const Real analytic = 2.0 * (i + 1) * pow((j + 2) * (k + 3), 2.0);
const Real err = host_du(k, j, i - 1) - analytic;

if (!soft_equiv(err, analytic, rel_tol)) {
if (!soft_equiv(host_du(k, j, i - 1), analytic, rel_tol)) {
return false;
}
}
Expand Down Expand Up @@ -396,9 +395,8 @@ bool test_wrapper_nested_4d(OuterLoopPattern outer_loop_pattern,
for (int j = 0; j < N; j++) {
for (int i = 1; i < N - 1; i++) {
const Real analytic = 2.0 * (i + 1) * pow((j + 2) * (k + 3) * (n + 4), 2.0);
const Real err = host_du(n, k, j, i - 1) - analytic;

if (!soft_equiv(err, analytic, rel_tol)) {
if (!soft_equiv(host_du(n, k, j, i - 1), analytic, rel_tol)) {
return false;
}
}
Expand Down

0 comments on commit 93da7dc

Please sign in to comment.