diff --git a/libs/assertion/include/hpx/assertion.hpp b/libs/assertion/include/hpx/assertion.hpp index 6c43ed59fa24..881fdc658904 100644 --- a/libs/assertion/include/hpx/assertion.hpp +++ b/libs/assertion/include/hpx/assertion.hpp @@ -7,6 +7,7 @@ // Make HPX inspect tool happy: // hpxinspect:noinclude:HPX_ASSERT // hpxinspect:noinclude:HPX_ASSERT_MSG +// hpxinspect:noassert_macro // Note: There are no include guards. This is intentional. @@ -16,6 +17,9 @@ #include #include +#if defined(HPX_COMPUTE_DEVICE_CODE) +#include +#endif #include #include @@ -61,8 +65,13 @@ namespace hpx { namespace assertion { /**/ #if defined(HPX_DEBUG) +#if defined(HPX_COMPUTE_DEVICE_CODE) +#define HPX_ASSERT(expr) assert(expr) +#define HPX_ASSERT_MSG(expr, msg) HPX_ASSERT(expr) +#else #define HPX_ASSERT(expr) HPX_ASSERT_(expr, std::string()) #define HPX_ASSERT_MSG(expr, msg) HPX_ASSERT_(expr, msg) +#endif #define HPX_NOEXCEPT_WITH_ASSERT #else #define HPX_ASSERT(expr)