Skip to content

Commit

Permalink
Merge pull request #44808 from mmusich/mm_dev_fix_44786_14_0_X
Browse files Browse the repository at this point in the history
[14.0.X] `BrokenLineFit` and `RiemannFit`: mask asserts behind `DEBUG` flags
  • Loading branch information
cmsbuild authored Apr 24, 2024
2 parents 222fc6a + 1f47513 commit c42fe90
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 @@ -160,11 +160,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 @@ -82,11 +82,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 c42fe90

Please sign in to comment.