Skip to content

Commit

Permalink
Revert changes to assertion for now
Browse files Browse the repository at this point in the history
  • Loading branch information
sethrj committed Sep 5, 2024
1 parent 2338f27 commit 9a71884
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/corecel/Assert.hh
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@
::celeritas::unreachable(); \
} while (0)

#if !CELER_DEVICE_COMPILE
#if !CELER_DEVICE_COMPILE || defined(__HIP__)
# define CELER_RUNTIME_THROW(WHICH, WHAT, COND) \
throw ::celeritas::RuntimeError({ \
WHICH, \
Expand All @@ -198,13 +198,10 @@
__FILE__, \
__LINE__, \
})
#elif CELERITAS_DEBUG
#else
# define CELER_RUNTIME_THROW(WHICH, WHAT, COND) \
CELER_DEBUG_FAIL("Runtime errors cannot be thrown from device code", \
unreachable);
#else
// Avoid printf statements which can add substantially to local memory
# define CELER_RUNTIME_THROW(WHICH, WHAT, COND) ::celeritas::unreachable()
#endif

#if CELERITAS_DEBUG
Expand All @@ -222,7 +219,7 @@
# define CELER_ASSERT_UNREACHABLE() ::celeritas::unreachable()
#endif

#if !CELER_DEVICE_COMPILE
#if !CELER_DEVICE_COMPILE || defined(__HIP__)
# define CELER_VALIDATE(COND, MSG) \
do \
{ \
Expand Down

0 comments on commit 9a71884

Please sign in to comment.