Skip to content

Commit

Permalink
Adjust test tools definition of throw in GPU environment
Browse files Browse the repository at this point in the history
  • Loading branch information
mborland committed Jul 26, 2024
1 parent 0cf32de commit f7a82bb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include_private/boost/math/tools/test.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,9 @@ void test_check_throw(Val v, boost::math::rounding_error const*)
// exception-free testing support, ideally we'd only define this in our tests,
// but to keep things simple we really need it somewhere that's always included:
//
#ifdef BOOST_MATH_NO_EXCEPTIONS
#if defined(BOOST_MATH_NO_EXCEPTIONS) && defined(BOOST_MATH_HAS_GPU_SUPPORT)
# define BOOST_MATH_CHECK_THROW(x, y)
#elif defined(BOOST_MATH_NO_EXCEPTIONS)
# define BOOST_MATH_CHECK_THROW(x, ExceptionType) boost::math::tools::test_check_throw(x, static_cast<ExceptionType const*>(nullptr));
#else
# define BOOST_MATH_CHECK_THROW(x, y) BOOST_CHECK_THROW(x, y)
Expand Down

0 comments on commit f7a82bb

Please sign in to comment.