Skip to content

Commit

Permalink
Merge pull request #44801 from mmusich/mm_dev_fix_44786
Browse files Browse the repository at this point in the history
`BrokenLineFit` and `RiemannFit`: mask asserts behind `DEBUG` flags
  • Loading branch information
cmsbuild authored Apr 23, 2024
2 parents ab9c12e + 3c36fcd commit 427fc3b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
12 changes: 7 additions & 5 deletions RecoTracker/PixelSeeding/plugins/alpaka/BrokenLineFit.dev.cc
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,13 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE {
}
brokenline::fastFit(acc, hits, fast_fit);

// no NaN here....
ALPAKA_ASSERT_ACC(fast_fit(0) == fast_fit(0));
ALPAKA_ASSERT_ACC(fast_fit(1) == fast_fit(1));
ALPAKA_ASSERT_ACC(fast_fit(2) == fast_fit(2));
ALPAKA_ASSERT_ACC(fast_fit(3) == fast_fit(3));
#ifdef BROKENLINE_DEBUG
// any NaN value should cause the track to be rejected at a later stage
ALPAKA_ASSERT_ACC(not alpaka::math::isnan(acc, fast_fit(0)));
ALPAKA_ASSERT_ACC(not alpaka::math::isnan(acc, fast_fit(1)));
ALPAKA_ASSERT_ACC(not alpaka::math::isnan(acc, fast_fit(2)));
ALPAKA_ASSERT_ACC(not alpaka::math::isnan(acc, fast_fit(3)));
#endif
}
}
};
Expand Down
12 changes: 7 additions & 5 deletions RecoTracker/PixelSeeding/plugins/alpaka/RiemannFit.dev.cc
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,13 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE {
}
riemannFit::fastFit(acc, hits, fast_fit);

// no NaN here....
ALPAKA_ASSERT_ACC(fast_fit(0) == fast_fit(0));
ALPAKA_ASSERT_ACC(fast_fit(1) == fast_fit(1));
ALPAKA_ASSERT_ACC(fast_fit(2) == fast_fit(2));
ALPAKA_ASSERT_ACC(fast_fit(3) == fast_fit(3));
#ifdef RIEMANN_DEBUG
// any NaN value should cause the track to be rejected at a later stage
ALPAKA_ASSERT_ACC(not alpaka::math::isnan(acc, fast_fit(0)));
ALPAKA_ASSERT_ACC(not alpaka::math::isnan(acc, fast_fit(1)));
ALPAKA_ASSERT_ACC(not alpaka::math::isnan(acc, fast_fit(2)));
ALPAKA_ASSERT_ACC(not alpaka::math::isnan(acc, fast_fit(3)));
#endif
}
}
};
Expand Down

0 comments on commit 427fc3b

Please sign in to comment.