diff --git a/RecoTracker/PixelSeeding/plugins/alpaka/BrokenLineFit.dev.cc b/RecoTracker/PixelSeeding/plugins/alpaka/BrokenLineFit.dev.cc index dfb413f1e9258..f8cadf653114d 100644 --- a/RecoTracker/PixelSeeding/plugins/alpaka/BrokenLineFit.dev.cc +++ b/RecoTracker/PixelSeeding/plugins/alpaka/BrokenLineFit.dev.cc @@ -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 } } }; diff --git a/RecoTracker/PixelSeeding/plugins/alpaka/RiemannFit.dev.cc b/RecoTracker/PixelSeeding/plugins/alpaka/RiemannFit.dev.cc index c6b7af5bccf67..3e6f6e9c8ed98 100644 --- a/RecoTracker/PixelSeeding/plugins/alpaka/RiemannFit.dev.cc +++ b/RecoTracker/PixelSeeding/plugins/alpaka/RiemannFit.dev.cc @@ -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 } } };