![]() |
Block-Structured AMR Software Framework
|
Assertion macros used across AMReX for runtime consistency checks. More...
Go to the source code of this file.
Macros | |
| #define | AMREX_ASSERT_WITH_MESSAGE(EX, MSG) ((void)0) |
| #define | AMREX_ASSERT(EX) ((void)0) |
| #define | BL_ASSERT(EX) ((void)0) |
| #define | AMREX_ALWAYS_ASSERT_WITH_MESSAGE(EX, MSG) (EX)?((void)0):amrex::Assert( # EX , __FILE__, __LINE__ , MSG) |
| #define | AMREX_ALWAYS_ASSERT(EX) (EX)?((void)0):amrex::Assert( # EX , __FILE__, __LINE__) |
| #define | AMREX_GPU_ASSERT(EX) ((void)0) |
Assertion macros used across AMReX for runtime consistency checks.
In debug builds (or when AMREX_USE_ASSERTION is defined) the macros expand to runtime checks that call amrex::Assert if they fail. In release builds without assertion support, the non-*_ALWAYS variants become no-ops.
AMREX_ASSERT(expr) evaluates expr and aborts on failure, emitting the expression, file, and line number.AMREX_ASSERT_WITH_MESSAGE(expr,msg) behaves the same but also forwards the user-provided msg to amrex::Assert, allowing custom diagnostics._ALWAYS_ variants (AMREX_ALWAYS_ASSERT, etc.) remain active even in non-debug builds.AMREX_GPU_ASSERT provides the same semantics inside GPU code paths when AMREX_USE_GPU is defined and either AMREX_DEBUG or AMREX_USE_ASSERTION is enabled; otherwise it is a no-op. | #define AMREX_ALWAYS_ASSERT | ( | EX | ) | (EX)?((void)0):amrex::Assert( # EX , __FILE__, __LINE__) |
| #define AMREX_ALWAYS_ASSERT_WITH_MESSAGE | ( | EX, | |
| MSG | |||
| ) | (EX)?((void)0):amrex::Assert( # EX , __FILE__, __LINE__ , MSG) |
| #define AMREX_ASSERT | ( | EX | ) | ((void)0) |
| #define AMREX_ASSERT_WITH_MESSAGE | ( | EX, | |
| MSG | |||
| ) | ((void)0) |
| #define AMREX_GPU_ASSERT | ( | EX | ) | ((void)0) |
| #define BL_ASSERT | ( | EX | ) | ((void)0) |