Macros | |
| #define | AMP_ASSERT(EXP) |
| Assert error. | |
| #define | AMP_DEBUG_ASSERT(EXP) |
| Assert error (debug only) | |
| #define | AMP_DEBUG_INSIST(EXP, MSG) |
| Insist error. | |
| #define | AMP_ERROR(MSG) StackTrace::Utilities::abort( MSG, SOURCE_LOCATION_CURRENT() ) |
| Throw error. | |
| #define | AMP_INSIST(EXP, MSG) |
| Insist error. | |
| #define | AMP_WARN_ONCE(MSG) |
| Print a warning. | |
| #define | AMP_WARNING(MSG) |
| Print a warning. | |
| #define | DISABLE_WARNINGS |
| Re-enable warnings. | |
| #define | ENABLE_WARNINGS |
| Suppress all warnings. | |
| #define | STATIC_ERROR(MSG) static_assert( failed_assert_v<TYPE>, MSG ) |
| Fail assert. | |
These functions are a list of C++ macros that are used within AMP for common operations, including checking for errors and profiling.
| #define AMP_ASSERT | ( | EXP | ) |
Assert error.
Throw an error exception from within any C++ source code if the given expression is not true. This is a parallel-friendly version of assert. The file and line number of the abort are printed along with the stack trace (if available).
| EXP | Expression to evaluate |
Definition at line 114 of file UtilityMacros.h.
| #define AMP_DEBUG_ASSERT | ( | EXP | ) |
Assert error (debug only)
Throw an error exception from within any C++ source code if the given expression is not true. This only runs if compiled with debug is enabled. If enabled, this is the same as a call to AMP_ASSERT.
| EXP | Expression to evaluate |
Definition at line 165 of file UtilityMacros.h.
| #define AMP_DEBUG_INSIST | ( | EXP, | |
| MSG | |||
| ) |
Insist error.
Throw an error exception from within any C++ source code if the given expression is not true. This will also print the given message. This is a parallel-friendly version of assert. The file and line number of the abort are printed along with the stack trace (if available). This only runs if compiled with debug is enabled. If enabled, this is the same as a call to AMP_INSIST.
| EXP | Expression to evaluate |
| MSG | Debug message to print |
Definition at line 168 of file UtilityMacros.h.
| #define AMP_ERROR | ( | MSG | ) | StackTrace::Utilities::abort( MSG, SOURCE_LOCATION_CURRENT() ) |
Throw error.
Throw an error exception from within any C++ source code. The macro argument may be any standard ostream expression. The file and line number of the abort are also printed.
| MSG | Error message to print |
Definition at line 72 of file UtilityMacros.h.
| #define AMP_INSIST | ( | EXP, | |
| MSG | |||
| ) |
Insist error.
Throw an error exception from within any C++ source code if the given expression is not true. This will also print the given message. This is a parallel-friendly version of assert. The file and line number of the abort are printed along with the stack trace (if available).
| EXP | Expression to evaluate |
| MSG | Debug message to print |
Definition at line 131 of file UtilityMacros.h.
| #define AMP_WARN_ONCE | ( | MSG | ) |
Print a warning.
Print a warning without exit. Print file and line number of the warning. The message will only be printed once per execution
| MSG | Warning message to print |
Definition at line 96 of file UtilityMacros.h.
| #define AMP_WARNING | ( | MSG | ) |
Print a warning.
Print a warning without exit. Print file and line number of the warning.
| MSG | Warning message to print |
Definition at line 80 of file UtilityMacros.h.
| #define DISABLE_WARNINGS |
Re-enable warnings.
This will re-enable warnings after a call to DIASABLE_WARNINGS
Definition at line 247 of file UtilityMacros.h.
| #define ENABLE_WARNINGS |
Suppress all warnings.
This will start to supress all compile warnings. Be sure to follow with ENABLE_WARNINGS
Definition at line 248 of file UtilityMacros.h.
| #define STATIC_ERROR | ( | MSG | ) | static_assert( failed_assert_v<TYPE>, MSG ) |
Fail assert.
Fail assert at compile time
| MSG | Error message to print |
Definition at line 62 of file UtilityMacros.h.
|
Advanced Multi-Physics (AMP) Oak Ridge National Laboratory Idaho National Laboratory Los Alamos National Laboratory |
This page automatically produced from the source code by Last updated: Tue Mar 10 2026 13:06:41. Comments on this page |