|
LvArray
|
Contains a bunch of macro definitions. More...
#include "LvArrayConfig.hpp"#include "system.hpp"#include <fstream>#include <sstream>#include <iostream>#include <type_traits>#include <cassert>#include <RAJA/RAJA.hpp>

Go to the source code of this file.
Classes | |
| struct | RAJAHelper< typename > |
| struct | RAJAHelper< serialPolicy > |
Macros | |
| #define | LVARRAY_FORCE_INLINE inline |
| Marks a function/lambda for inlining. | |
| #define | STRINGIZE_NX(A) #A |
Convert A into a string. More... | |
| #define | STRINGIZE(A) STRINGIZE_NX( A ) |
Convert the macro expansion of A into a string. More... | |
| #define | LVARRAY_UNUSED_ARG(X) |
Mark X as an unused argument, used to silence compiler warnings. More... | |
| #define | LVARRAY_UNUSED_VARIABLE(X) ( ( void ) X ) |
Mark X as an unused variable, used to silence compiler warnings. More... | |
| #define | LVARRAY_DEBUG_VAR(X) LVARRAY_UNUSED_VARIABLE( X ) |
Mark X as an debug variable, used to silence compiler warnings. More... | |
| #define | LOCATION __FILE__ ":" STRINGIZE( __LINE__ ) |
| Expands to a string representing the current file and line. | |
| #define | TYPEOFPTR(X) std::remove_pointer_t< decltype( X ) > |
Given an expression X that evaluates to a pointer, expands to the type pointed to. More... | |
| #define | TYPEOFREF(X) std::remove_reference_t< decltype( X ) > |
Given an expression X that evaluates to a reference, expands to the type referred to. More... | |
| #define | LVARRAY_LOG(...) std::cout << __VA_ARGS__ << std::endl |
| Print the expression. | |
| #define | LVARRAY_LOG_VAR(...) LVARRAY_LOG( STRINGIZE( __VA_ARGS__ ) << " = " << __VA_ARGS__ ) |
| Print the expression string along with its value. | |
| #define | LVARRAY_ERROR_IF(EXP, MSG) |
Abort execution if EXP is true. More... | |
| #define | LVARRAY_ERROR(MSG) LVARRAY_ERROR_IF( true, MSG ) |
| Abort execution. More... | |
| #define | LVARRAY_ASSERT_MSG(EXP, MSG) LVARRAY_ERROR_IF( !(EXP), MSG ) |
Abort execution if EXP is false but only when NDEBUG is not defined.. More... | |
| #define | LVARRAY_THROW_IF(EXP, MSG, TYPE) |
| Conditionally throw an exception. More... | |
| #define | LVARRAY_THROW(MSG, TYPE) LVARRAY_THROW_IF( true, MSG, TYPE ) |
| Throw an exception. More... | |
| #define | LVARRAY_ASSERT(EXP) LVARRAY_ASSERT_MSG( EXP, "" ) |
Assert EXP is true with no message. | |
| #define | LVARRAY_WARNING_IF(EXP, MSG) |
Print a warning if EXP is true. More... | |
| #define | LVARRAY_WARNING(MSG) LVARRAY_WARNING_IF( true, MSG ) |
| Print a warning with a message. More... | |
| #define | LVARRAY_INFO_IF(EXP, MSG) |
Print msg along with the location if EXP is true. More... | |
| #define | LVARRAY_INFO(msg) LVARRAY_INFO_IF( true, msg ) |
Print msg along with the location. More... | |
| #define | LVARRAY_ERROR_IF_OP_MSG(lhs, OP, NOP, rhs, msg) |
Abort execution if lhs OP rhs. More... | |
| #define | LVARRAY_THROW_IF_OP_MSG(lhs, OP, NOP, rhs, msg, TYPE) |
Throw an exception if lhs OP rhs. More... | |
| #define | LVARRAY_ERROR_IF_EQ_MSG(lhs, rhs, msg) LVARRAY_ERROR_IF_OP_MSG( lhs, ==, !=, rhs, msg ) |
| Raise a hard error if two values are equal. More... | |
| #define | LVARRAY_THROW_IF_EQ_MSG(lhs, rhs, msg, TYPE) LVARRAY_THROW_IF_OP_MSG( lhs, ==, !=, rhs, msg, TYPE ) |
| Throw an exception if two values are equal. More... | |
| #define | LVARRAY_ERROR_IF_EQ(lhs, rhs) LVARRAY_ERROR_IF_EQ_MSG( lhs, rhs, "" ) |
| Raise a hard error if two values are equal. More... | |
| #define | LVARRAY_THROW_IF_EQ(lhs, rhs, TYPE) LVARRAY_THROW_IF_EQ_MSG( lhs, rhs, "", TYPE ) |
| Throw an exception if two values are equal. More... | |
| #define | LVARRAY_ERROR_IF_NE_MSG(lhs, rhs, msg) LVARRAY_ERROR_IF_OP_MSG( lhs, !=, ==, rhs, msg ) |
| Raise a hard error if two values are not equal. More... | |
| #define | LVARRAY_THROW_IF_NE_MSG(lhs, rhs, msg, TYPE) LVARRAY_THROW_IF_OP_MSG( lhs, !=, ==, rhs, msg, TYPE ) |
| Throw an exception if two values are not equal. More... | |
| #define | LVARRAY_ERROR_IF_NE(lhs, rhs) LVARRAY_ERROR_IF_NE_MSG( lhs, rhs, "" ) |
| Raise a hard error if two values are not equal. More... | |
| #define | LVARRAY_THROW_IF_NE(lhs, rhs, TYPE) LVARRAY_THROW_IF_NE_MSG( lhs, rhs, "", TYPE ) |
| Throw an exception if two values are not equal. More... | |
| #define | LVARRAY_ERROR_IF_GT_MSG(lhs, rhs, msg) LVARRAY_ERROR_IF_OP_MSG( lhs, >, <=, rhs, msg ) |
| Raise a hard error if one value compares greater than the other. More... | |
| #define | LVARRAY_THROW_IF_GT_MSG(lhs, rhs, msg, TYPE) LVARRAY_THROW_IF_OP_MSG( lhs, >, <=, rhs, msg, TYPE ) |
| Throw an exception if one value compares greater than the other. More... | |
| #define | LVARRAY_ERROR_IF_GT(lhs, rhs) LVARRAY_ERROR_IF_GT_MSG( lhs, rhs, "" ) |
| Raise a hard error if one value compares greater than the other. More... | |
| #define | LVARRAY_THROW_IF_GT(lhs, rhs, TYPE) LVARRAY_THROW_IF_GT_MSG( lhs, rhs, "", TYPE ) |
| Throw an exception if one value compares greater than the other. More... | |
| #define | LVARRAY_ERROR_IF_GE_MSG(lhs, rhs, msg) LVARRAY_ERROR_IF_OP_MSG( lhs, >=, <, rhs, msg ) |
| Raise a hard error if one value compares greater than or equal to the other. More... | |
| #define | LVARRAY_THROW_IF_GE_MSG(lhs, rhs, msg, TYPE) LVARRAY_THROW_IF_OP_MSG( lhs, >=, <, rhs, msg, TYPE ) |
| Throw an exception if one value compares greater than or equal to the other. More... | |
| #define | LVARRAY_ERROR_IF_GE(lhs, rhs) LVARRAY_ERROR_IF_GE_MSG( lhs, rhs, "" ) |
| Raise a hard error if one value compares greater than or equal to the other. More... | |
| #define | LVARRAY_THROW_IF_GE(lhs, rhs, TYPE) LVARRAY_THROW_IF_GE_MSG( lhs, rhs, "", TYPE ) |
| Throw an exception if one value compares greater than or equal to the other. More... | |
| #define | LVARRAY_ERROR_IF_LT_MSG(lhs, rhs, msg) LVARRAY_ERROR_IF_OP_MSG( lhs, <, >=, rhs, msg ) |
| Raise a hard error if one value compares less than the other. More... | |
| #define | LVARRAY_THROW_IF_LT_MSG(lhs, rhs, msg, TYPE) LVARRAY_THROW_IF_OP_MSG( lhs, <, >=, rhs, msg, TYPE ) |
| Throw an exception if one value compares less than the other. More... | |
| #define | LVARRAY_ERROR_IF_LT(lhs, rhs) LVARRAY_ERROR_IF_LT_MSG( lhs, rhs, "" ) |
| Raise a hard error if one value compares less than the other. More... | |
| #define | LVARRAY_THROW_IF_LT(lhs, rhs, TYPE) LVARRAY_THROW_IF_LT_MSG( lhs, rhs, "", TYPE ) |
| Throw an exception if one value compares less than the other. More... | |
| #define | LVARRAY_ERROR_IF_LE_MSG(lhs, rhs, msg) LVARRAY_ERROR_IF_OP_MSG( lhs, <=, >, rhs, msg ) |
| Raise a hard error if one value compares less than or equal to the other. More... | |
| #define | LVARRAY_THROW_IF_LE_MSG(lhs, rhs, msg, TYPE) LVARRAY_THROW_IF_OP_MSG( lhs, <=, >, rhs, msg, TYPE ) |
| Throw an exception if one value compares less than or equal to the other. More... | |
| #define | LVARRAY_ERROR_IF_LE(lhs, rhs) LVARRAY_ERROR_IF_GE_MSG( lhs, rhs, "" ) |
| Raise a hard error if one value compares less than or equal to the other. More... | |
| #define | LVARRAY_THROW_IF_LE(lhs, rhs, TYPE) LVARRAY_THROW_IF_GE_MSG( lhs, rhs, "", TYPE ) |
| Throw an exception if one value compares less than or equal to the other. More... | |
| #define | LVARRAY_ASSERT_OP_MSG(lhs, OP, rhs, msg) |
Abort execution if lhs OP rhs is false. More... | |
| #define | LVARRAY_ASSERT_EQ_MSG(lhs, rhs, msg) LVARRAY_ASSERT_OP_MSG( lhs, ==, rhs, msg ) |
| Assert that two values compare equal in debug builds. More... | |
| #define | LVARRAY_ASSERT_EQ(lhs, rhs) LVARRAY_ASSERT_EQ_MSG( lhs, rhs, "" ) |
| Assert that two values compare equal in debug builds. More... | |
| #define | LVARRAY_ASSERT_NE_MSG(lhs, rhs, msg) LVARRAY_ASSERT_OP_MSG( lhs, !=, rhs, msg ) |
| Assert that two values compare not equal in debug builds. More... | |
| #define | LVARRAY_ASSERT_NE(lhs, rhs) LVARRAY_ASSERT_NE_MSG( lhs, rhs, "" ) |
| Assert that two values compare not equal in debug builds. More... | |
| #define | LVARRAY_ASSERT_GT_MSG(lhs, rhs, msg) LVARRAY_ASSERT_OP_MSG( lhs, >, rhs, msg ) |
| Assert that one value compares greater than the other in debug builds. More... | |
| #define | LVARRAY_ASSERT_GT(lhs, rhs) LVARRAY_ASSERT_GT_MSG( lhs, rhs, "" ) |
| Assert that one value compares greater than the other in debug builds. More... | |
| #define | LVARRAY_ASSERT_GE_MSG(lhs, rhs, msg) LVARRAY_ASSERT_OP_MSG( lhs, >=, rhs, msg ) |
| Assert that one value compares greater than or equal to the other in debug builds. More... | |
| #define | LVARRAY_ASSERT_GE(lhs, rhs) LVARRAY_ASSERT_GE_MSG( lhs, rhs, "" ) |
| Assert that one value compares greater than or equal to the other in debug builds. More... | |
| #define | LVARRAY_HOST_DEVICE |
| Mark a function for both host and device usage. | |
| #define | LVARRAY_HOST_DEVICE_HIP |
| Mark a function for both host and device usage when using HIP only. | |
| #define | LVARRAY_DEVICE |
| Mark a function for only device usage. | |
| #define | DISABLE_HD_WARNING |
| Disable host device warnings. More... | |
| #define | CONSTEXPR_WITHOUT_BOUNDS_CHECK constexpr |
| Expands to constexpr when array bound checking is disabled. | |
| #define | CONSTEXPR_WITH_NDEBUG |
| Expands to constexpr in release builds (when NDEBUG is defined). | |
| #define | CONSTEXPR_WITHOUT_BOUNDS_CHECK constexpr |
| Expands to constexpr when array bound checking is disabled. | |
| #define | CONSTEXPR_WITH_NDEBUG |
| Expands to constexpr in release builds (when NDEBUG is defined). | |
Typedefs | |
| using | serialPolicy = RAJA::loop_exec |
Contains a bunch of macro definitions.
| #define DISABLE_HD_WARNING |
Disable host device warnings.
This pragma disables nvcc warnings about calling a host function from a host-device function. This is used on templated host-device functions where some template instantiations call host only code. This is safe as long as the host only instantiations are only called on the host. To use place directly above a the template.
| #define LVARRAY_ASSERT_EQ | ( | lhs, | |
| rhs | |||
| ) | LVARRAY_ASSERT_EQ_MSG( lhs, rhs, "" ) |
Assert that two values compare equal in debug builds.
| lhs | expression to be evaluated and used as left-hand side in comparison |
| rhs | expression to be evaluated and used as right-hand side in comparison |
| #define LVARRAY_ASSERT_EQ_MSG | ( | lhs, | |
| rhs, | |||
| msg | |||
| ) | LVARRAY_ASSERT_OP_MSG( lhs, ==, rhs, msg ) |
Assert that two values compare equal in debug builds.
| lhs | expression to be evaluated and used as left-hand side in comparison |
| rhs | expression to be evaluated and used as right-hand side in comparison |
| msg | a message to log (any expression that can be stream inserted) |
| #define LVARRAY_ASSERT_GE | ( | lhs, | |
| rhs | |||
| ) | LVARRAY_ASSERT_GE_MSG( lhs, rhs, "" ) |
Assert that one value compares greater than or equal to the other in debug builds.
| lhs | expression to be evaluated and used as left-hand side in comparison |
| rhs | expression to be evaluated and used as right-hand side in comparison |
| #define LVARRAY_ASSERT_GE_MSG | ( | lhs, | |
| rhs, | |||
| msg | |||
| ) | LVARRAY_ASSERT_OP_MSG( lhs, >=, rhs, msg ) |
Assert that one value compares greater than or equal to the other in debug builds.
| lhs | expression to be evaluated and used as left-hand side in comparison |
| rhs | expression to be evaluated and used as right-hand side in comparison |
| msg | a message to log (any expression that can be stream inserted) |
| #define LVARRAY_ASSERT_GT | ( | lhs, | |
| rhs | |||
| ) | LVARRAY_ASSERT_GT_MSG( lhs, rhs, "" ) |
Assert that one value compares greater than the other in debug builds.
| lhs | expression to be evaluated and used as left-hand side in comparison |
| rhs | expression to be evaluated and used as right-hand side in comparison |
| #define LVARRAY_ASSERT_GT_MSG | ( | lhs, | |
| rhs, | |||
| msg | |||
| ) | LVARRAY_ASSERT_OP_MSG( lhs, >, rhs, msg ) |
Assert that one value compares greater than the other in debug builds.
| lhs | expression to be evaluated and used as left-hand side in comparison |
| rhs | expression to be evaluated and used as right-hand side in comparison |
| msg | a message to log (any expression that can be stream inserted) |
| #define LVARRAY_ASSERT_MSG | ( | EXP, | |
| MSG | |||
| ) | LVARRAY_ERROR_IF( !(EXP), MSG ) |
Abort execution if EXP is false but only when NDEBUG is not defined..
| EXP | The expression to check. |
| MSG | The message to associate with the error, can be anything streamable to a std::ostream. |
| #define LVARRAY_ASSERT_NE | ( | lhs, | |
| rhs | |||
| ) | LVARRAY_ASSERT_NE_MSG( lhs, rhs, "" ) |
Assert that two values compare not equal in debug builds.
| lhs | expression to be evaluated and used as left-hand side in comparison |
| rhs | expression to be evaluated and used as right-hand side in comparison |
| #define LVARRAY_ASSERT_NE_MSG | ( | lhs, | |
| rhs, | |||
| msg | |||
| ) | LVARRAY_ASSERT_OP_MSG( lhs, !=, rhs, msg ) |
Assert that two values compare not equal in debug builds.
| lhs | expression to be evaluated and used as left-hand side in comparison |
| rhs | expression to be evaluated and used as right-hand side in comparison |
| msg | a message to log (any expression that can be stream inserted) |
| #define LVARRAY_ASSERT_OP_MSG | ( | lhs, | |
| OP, | |||
| rhs, | |||
| msg | |||
| ) |
Abort execution if lhs OP rhs is false.
| lhs | The left side of the operation. |
| OP | The operation to apply. |
| rhs | The right side of the operation. |
| msg | The message to diplay. |
| #define LVARRAY_DEBUG_VAR | ( | X | ) | LVARRAY_UNUSED_VARIABLE( X ) |
Mark X as an debug variable, used to silence compiler warnings.
| X | the debug variable. |
| #define LVARRAY_ERROR | ( | MSG | ) | LVARRAY_ERROR_IF( true, MSG ) |
Abort execution.
| MSG | The message to associate with the error, can be anything streamable to a std::ostream. |
| #define LVARRAY_ERROR_IF | ( | EXP, | |
| MSG | |||
| ) |
Abort execution if EXP is true.
| EXP | The expression to check. |
| MSG | The message to associate with the error, can be anything streamable to a std::ostream. |
| #define LVARRAY_ERROR_IF_EQ | ( | lhs, | |
| rhs | |||
| ) | LVARRAY_ERROR_IF_EQ_MSG( lhs, rhs, "" ) |
Raise a hard error if two values are equal.
| lhs | expression to be evaluated and used as left-hand side in comparison |
| rhs | expression to be evaluated and used as right-hand side in comparison |
| #define LVARRAY_ERROR_IF_EQ_MSG | ( | lhs, | |
| rhs, | |||
| msg | |||
| ) | LVARRAY_ERROR_IF_OP_MSG( lhs, ==, !=, rhs, msg ) |
Raise a hard error if two values are equal.
| lhs | expression to be evaluated and used as left-hand side in comparison |
| rhs | expression to be evaluated and used as right-hand side in comparison |
| msg | a message to log (any expression that can be stream inserted) |
| #define LVARRAY_ERROR_IF_GE | ( | lhs, | |
| rhs | |||
| ) | LVARRAY_ERROR_IF_GE_MSG( lhs, rhs, "" ) |
Raise a hard error if one value compares greater than or equal to the other.
| lhs | expression to be evaluated and used as left-hand side in comparison |
| rhs | expression to be evaluated and used as right-hand side in comparison |
| #define LVARRAY_ERROR_IF_GE_MSG | ( | lhs, | |
| rhs, | |||
| msg | |||
| ) | LVARRAY_ERROR_IF_OP_MSG( lhs, >=, <, rhs, msg ) |
Raise a hard error if one value compares greater than or equal to the other.
| lhs | expression to be evaluated and used as left-hand side in comparison |
| rhs | expression to be evaluated and used as right-hand side in comparison |
| msg | a message to log (any expression that can be stream inserted) |
| #define LVARRAY_ERROR_IF_GT | ( | lhs, | |
| rhs | |||
| ) | LVARRAY_ERROR_IF_GT_MSG( lhs, rhs, "" ) |
Raise a hard error if one value compares greater than the other.
| lhs | expression to be evaluated and used as left-hand side in comparison |
| rhs | expression to be evaluated and used as right-hand side in comparison |
| #define LVARRAY_ERROR_IF_GT_MSG | ( | lhs, | |
| rhs, | |||
| msg | |||
| ) | LVARRAY_ERROR_IF_OP_MSG( lhs, >, <=, rhs, msg ) |
Raise a hard error if one value compares greater than the other.
| lhs | expression to be evaluated and used as left-hand side in comparison |
| rhs | expression to be evaluated and used as right-hand side in comparison |
| msg | a message to log (any expression that can be stream inserted) |
| #define LVARRAY_ERROR_IF_LE | ( | lhs, | |
| rhs | |||
| ) | LVARRAY_ERROR_IF_GE_MSG( lhs, rhs, "" ) |
Raise a hard error if one value compares less than or equal to the other.
| lhs | expression to be evaluated and used as left-hand side in comparison |
| rhs | expression to be evaluated and used as right-hand side in comparison |
| #define LVARRAY_ERROR_IF_LE_MSG | ( | lhs, | |
| rhs, | |||
| msg | |||
| ) | LVARRAY_ERROR_IF_OP_MSG( lhs, <=, >, rhs, msg ) |
Raise a hard error if one value compares less than or equal to the other.
| lhs | expression to be evaluated and used as left-hand side in comparison |
| rhs | expression to be evaluated and used as right-hand side in comparison |
| msg | a message to log (any expression that can be stream inserted) |
| #define LVARRAY_ERROR_IF_LT | ( | lhs, | |
| rhs | |||
| ) | LVARRAY_ERROR_IF_LT_MSG( lhs, rhs, "" ) |
Raise a hard error if one value compares less than the other.
| lhs | expression to be evaluated and used as left-hand side in comparison |
| rhs | expression to be evaluated and used as right-hand side in comparison |
| #define LVARRAY_ERROR_IF_LT_MSG | ( | lhs, | |
| rhs, | |||
| msg | |||
| ) | LVARRAY_ERROR_IF_OP_MSG( lhs, <, >=, rhs, msg ) |
Raise a hard error if one value compares less than the other.
| lhs | expression to be evaluated and used as left-hand side in comparison |
| rhs | expression to be evaluated and used as right-hand side in comparison |
| msg | a message to log (any expression that can be stream inserted) |
| #define LVARRAY_ERROR_IF_NE | ( | lhs, | |
| rhs | |||
| ) | LVARRAY_ERROR_IF_NE_MSG( lhs, rhs, "" ) |
Raise a hard error if two values are not equal.
| lhs | expression to be evaluated and used as left-hand side in comparison |
| rhs | expression to be evaluated and used as right-hand side in comparison |
| #define LVARRAY_ERROR_IF_NE_MSG | ( | lhs, | |
| rhs, | |||
| msg | |||
| ) | LVARRAY_ERROR_IF_OP_MSG( lhs, !=, ==, rhs, msg ) |
Raise a hard error if two values are not equal.
| lhs | expression to be evaluated and used as left-hand side in comparison |
| rhs | expression to be evaluated and used as right-hand side in comparison |
| msg | a message to log (any expression that can be stream inserted) |
| #define LVARRAY_ERROR_IF_OP_MSG | ( | lhs, | |
| OP, | |||
| NOP, | |||
| rhs, | |||
| msg | |||
| ) |
Abort execution if lhs OP rhs.
| lhs | The left side of the operation. |
| OP | The operation to apply. |
| NOP | The opposite of OP, used in the message. |
| rhs | The right side of the operation. |
| msg | The message to diplay. |
| #define LVARRAY_INFO | ( | msg | ) | LVARRAY_INFO_IF( true, msg ) |
Print msg along with the location.
| msg | The message to print. |
| #define LVARRAY_INFO_IF | ( | EXP, | |
| MSG | |||
| ) |
Print msg along with the location if EXP is true.
| EXP | The expression to test. |
| MSG | The message to print. |
| #define LVARRAY_THROW | ( | MSG, | |
| TYPE | |||
| ) | LVARRAY_THROW_IF( true, MSG, TYPE ) |
Throw an exception.
| MSG | The message to associate with the error, can be anything streamable to a std::ostream. |
| #define LVARRAY_THROW_IF | ( | EXP, | |
| MSG, | |||
| TYPE | |||
| ) |
Conditionally throw an exception.
| EXP | an expression that will be evaluated as a predicate |
| MSG | a message to log (any expression that can be stream inserted) |
| TYPE | the type of exception to throw |
| #define LVARRAY_THROW_IF_EQ | ( | lhs, | |
| rhs, | |||
| TYPE | |||
| ) | LVARRAY_THROW_IF_EQ_MSG( lhs, rhs, "", TYPE ) |
Throw an exception if two values are equal.
| lhs | expression to be evaluated and used as left-hand side in comparison |
| rhs | expression to be evaluated and used as right-hand side in comparison |
| TYPE | the type of exception to throw |
| #define LVARRAY_THROW_IF_EQ_MSG | ( | lhs, | |
| rhs, | |||
| msg, | |||
| TYPE | |||
| ) | LVARRAY_THROW_IF_OP_MSG( lhs, ==, !=, rhs, msg, TYPE ) |
Throw an exception if two values are equal.
| lhs | expression to be evaluated and used as left-hand side in comparison |
| rhs | expression to be evaluated and used as right-hand side in comparison |
| msg | a message to log (any expression that can be stream inserted) |
| TYPE | the type of exception to throw |
| #define LVARRAY_THROW_IF_GE | ( | lhs, | |
| rhs, | |||
| TYPE | |||
| ) | LVARRAY_THROW_IF_GE_MSG( lhs, rhs, "", TYPE ) |
Throw an exception if one value compares greater than or equal to the other.
| lhs | expression to be evaluated and used as left-hand side in comparison |
| rhs | expression to be evaluated and used as right-hand side in comparison |
| TYPE | the type of exception to throw |
| #define LVARRAY_THROW_IF_GE_MSG | ( | lhs, | |
| rhs, | |||
| msg, | |||
| TYPE | |||
| ) | LVARRAY_THROW_IF_OP_MSG( lhs, >=, <, rhs, msg, TYPE ) |
Throw an exception if one value compares greater than or equal to the other.
| lhs | expression to be evaluated and used as left-hand side in comparison |
| rhs | expression to be evaluated and used as right-hand side in comparison |
| msg | a message to log (any expression that can be stream inserted) |
| TYPE | the type of exception to throw |
| #define LVARRAY_THROW_IF_GT | ( | lhs, | |
| rhs, | |||
| TYPE | |||
| ) | LVARRAY_THROW_IF_GT_MSG( lhs, rhs, "", TYPE ) |
Throw an exception if one value compares greater than the other.
| lhs | expression to be evaluated and used as left-hand side in comparison |
| rhs | expression to be evaluated and used as right-hand side in comparison |
| TYPE | the type of exception to throw |
| #define LVARRAY_THROW_IF_GT_MSG | ( | lhs, | |
| rhs, | |||
| msg, | |||
| TYPE | |||
| ) | LVARRAY_THROW_IF_OP_MSG( lhs, >, <=, rhs, msg, TYPE ) |
Throw an exception if one value compares greater than the other.
| lhs | expression to be evaluated and used as left-hand side in comparison |
| rhs | expression to be evaluated and used as right-hand side in comparison |
| msg | a message to log (any expression that can be stream inserted) |
| TYPE | the type of exception to throw |
| #define LVARRAY_THROW_IF_LE | ( | lhs, | |
| rhs, | |||
| TYPE | |||
| ) | LVARRAY_THROW_IF_GE_MSG( lhs, rhs, "", TYPE ) |
Throw an exception if one value compares less than or equal to the other.
| lhs | expression to be evaluated and used as left-hand side in comparison |
| rhs | expression to be evaluated and used as right-hand side in comparison |
| TYPE | the type of exception to throw |
| #define LVARRAY_THROW_IF_LE_MSG | ( | lhs, | |
| rhs, | |||
| msg, | |||
| TYPE | |||
| ) | LVARRAY_THROW_IF_OP_MSG( lhs, <=, >, rhs, msg, TYPE ) |
Throw an exception if one value compares less than or equal to the other.
| lhs | expression to be evaluated and used as left-hand side in comparison |
| rhs | expression to be evaluated and used as right-hand side in comparison |
| msg | a message to log (any expression that can be stream inserted) |
| TYPE | the type of exception to throw |
| #define LVARRAY_THROW_IF_LT | ( | lhs, | |
| rhs, | |||
| TYPE | |||
| ) | LVARRAY_THROW_IF_LT_MSG( lhs, rhs, "", TYPE ) |
Throw an exception if one value compares less than the other.
| lhs | expression to be evaluated and used as left-hand side in comparison |
| rhs | expression to be evaluated and used as right-hand side in comparison |
| TYPE | the type of exception to throw |
| #define LVARRAY_THROW_IF_LT_MSG | ( | lhs, | |
| rhs, | |||
| msg, | |||
| TYPE | |||
| ) | LVARRAY_THROW_IF_OP_MSG( lhs, <, >=, rhs, msg, TYPE ) |
Throw an exception if one value compares less than the other.
| lhs | expression to be evaluated and used as left-hand side in comparison |
| rhs | expression to be evaluated and used as right-hand side in comparison |
| msg | a message to log (any expression that can be stream inserted) |
| TYPE | the type of exception to throw |
| #define LVARRAY_THROW_IF_NE | ( | lhs, | |
| rhs, | |||
| TYPE | |||
| ) | LVARRAY_THROW_IF_NE_MSG( lhs, rhs, "", TYPE ) |
Throw an exception if two values are not equal.
| lhs | expression to be evaluated and used as left-hand side in comparison |
| rhs | expression to be evaluated and used as right-hand side in comparison |
| TYPE | the type of exception to throw |
| #define LVARRAY_THROW_IF_NE_MSG | ( | lhs, | |
| rhs, | |||
| msg, | |||
| TYPE | |||
| ) | LVARRAY_THROW_IF_OP_MSG( lhs, !=, ==, rhs, msg, TYPE ) |
Throw an exception if two values are not equal.
| lhs | expression to be evaluated and used as left-hand side in comparison |
| rhs | expression to be evaluated and used as right-hand side in comparison |
| msg | a message to log (any expression that can be stream inserted) |
| TYPE | the type of exception to throw |
| #define LVARRAY_THROW_IF_OP_MSG | ( | lhs, | |
| OP, | |||
| NOP, | |||
| rhs, | |||
| msg, | |||
| TYPE | |||
| ) |
Throw an exception if lhs OP rhs.
| lhs | The left side of the operation. |
| OP | The operation to apply. |
| NOP | The opposite of OP, used in the message. |
| rhs | The right side of the operation. |
| msg | The message to diplay. |
| TYPE | the type of exception to throw. |
| #define LVARRAY_UNUSED_ARG | ( | X | ) |
Mark X as an unused argument, used to silence compiler warnings.
| X | the unused argument. |
| #define LVARRAY_UNUSED_VARIABLE | ( | X | ) | ( ( void ) X ) |
Mark X as an unused variable, used to silence compiler warnings.
| X | the unused variable. |
| #define LVARRAY_WARNING | ( | MSG | ) | LVARRAY_WARNING_IF( true, MSG ) |
Print a warning with a message.
| MSG | The message to print. |
| #define LVARRAY_WARNING_IF | ( | EXP, | |
| MSG | |||
| ) |
Print a warning if EXP is true.
| EXP | The expression to check. |
| MSG | The message to associate with the warning, can be anything streamable to a std::ostream. |
| #define STRINGIZE | ( | A | ) | STRINGIZE_NX( A ) |
Convert the macro expansion of A into a string.
| A | the token to convert to a string. |
| #define STRINGIZE_NX | ( | A | ) | #A |
Convert A into a string.
| A | the token to convert to a string. |
| #define TYPEOFPTR | ( | X | ) | std::remove_pointer_t< decltype( X ) > |
Given an expression X that evaluates to a pointer, expands to the type pointed to.
| X | The expression to evaluate. |
| #define TYPEOFREF | ( | X | ) | std::remove_reference_t< decltype( X ) > |
Given an expression X that evaluates to a reference, expands to the type referred to.
| X | The expression to evaluate. |
1.8.13