ATLAS Offline Software
|
Go to the source code of this file.
Macros | |
#define | CRGPU_EMPTY() |
#define | CRGPU_DEFER(...) __VA_ARGS__ CRGPU_EMPTY() |
Helper macro, defers macro expansion to the next level of evaluation to allow recursive macros. More... | |
#define | CRGPU_IGNORE(...) |
Helper macro, takes the arguments and expands to nothing. More... | |
#define | CRGPU_CONCAT(X, Y) CRGPU_CONCAT_HELPER(X, Y) |
Helper macro, concatenates two arguments. More... | |
#define | CRGPU_CONCAT_HELPER(X, ...) X ## __VA_ARGS__ |
Helper macro for concatenation. More... | |
#define | CRGPU_STRINGIFY(X) CRGPU_STRINGIFY_HELPER(X) |
Helper macro, stringifies the argument. More... | |
#define | CRGPU_STRINGIFY_HELPER(...) #__VA_ARGS__ |
Helper macro for concatenation. More... | |
#define | CRGPU_GET_FIRST(X, ...) X |
Helper macro, returns the first argument. More... | |
#define | CRGPU_GET_SECOND(X, ...) CRGPU_GET_FIRST(__VA_ARGS__, X) |
Helper macro, returns the second argument. More... | |
#define | CRGPU_TEST_CRGPU_END ,1 |
Definitions to check for list end. More... | |
#define | CRGPU_TEST_ ,1 |
Definitions to allow an empty argument to also be used as a terminator. More... | |
#define | CRGPU_CHECK_FOR_END(X) CRGPU_CHECK_FOR_END_CHECK(CRGPU_TEST_ ## X, 0) |
Check for CRGPU_END (or an empty argument) to terminate list. More... | |
#define | CRGPU_CHECK_FOR_END_CHECK(...) CRGPU_GET_SECOND(__VA_ARGS__,) |
Implementation of checking for CRGPU_END (or an empty argument) to terminate list. More... | |
#define | CRGPU_RECURSIVE_MACRO(...) CR_GPU_MACRO_RECURSE1(CR_GPU_MACRO_RECURSE1(CR_GPU_MACRO_RECURSE1(CR_GPU_MACRO_RECURSE1(__VA_ARGS__)))) |
Expands recursive macros. More... | |
#define | CR_GPU_MACRO_RECURSE1(...) CR_GPU_MACRO_RECURSE2(CR_GPU_MACRO_RECURSE2(CR_GPU_MACRO_RECURSE2(CR_GPU_MACRO_RECURSE2(__VA_ARGS__)))) |
Helper macro to expand recursive macros (recursion level 1). More... | |
#define | CR_GPU_MACRO_RECURSE2(...) CR_GPU_MACRO_RECURSE3(CR_GPU_MACRO_RECURSE3(CR_GPU_MACRO_RECURSE3(CR_GPU_MACRO_RECURSE3(__VA_ARGS__)))) |
Helper macro to expand recursive macros (recursion level 2). More... | |
#define | CR_GPU_MACRO_RECURSE3(...) CR_GPU_MACRO_RECURSE4(CR_GPU_MACRO_RECURSE4(CR_GPU_MACRO_RECURSE4(CR_GPU_MACRO_RECURSE4(__VA_ARGS__)))) |
Helper macro to expand recursive macros (recursion level 3). More... | |
#define | CR_GPU_MACRO_RECURSE4(...) CR_GPU_MACRO_RECURSE_BASE(CR_GPU_MACRO_RECURSE_BASE(CR_GPU_MACRO_RECURSE_BASE(CR_GPU_MACRO_RECURSE_BASE(__VA_ARGS__)))) |
Helper macro to expand recursive macros (recursion level 4). More... | |
#define | CR_GPU_MACRO_RECURSE_BASE(...) __VA_ARGS__ |
Helper macro to expand recursive macros (last recursion level: simply expands the macro). More... | |
#define | CRGPU_MACRO_EXPANSION(MACRO, EXTRA_ARG, ...) CRGPU_MACRO_EXPANSION_IMPL(MACRO, EXTRA_ARG, __VA_ARGS__, CRGPU_END, CRGPU_END) |
Helper macro to apply a macro to all elements of the variadic list, with EXTRA_ARG and the parenthesised rest of the arguments being passed as arguments to the macro too. More... | |
#define | CRGPU_MACRO_EXPANSION_IMPL(MACRO, EXTRA_ARG, ONE, NEXT, ...) |
#define | CRGPU_MACRO_EXPANSION_IMPL_0 CRGPU_MACRO_EXPANSION_IMPL_DO |
Helper macro to defer macro expansion to enable recursion. More... | |
#define | CRGPU_MACRO_EXPANSION_IMPL_DO() CRGPU_MACRO_EXPANSION_IMPL |
Helper macro to defer macro expansion to enable recursion. More... | |
#define | CRGPU_MACRO_EXPANSION_IMPL_1 CRGPU_MACRO_EXPANSION_IMPL_DONT |
Helper macro to defer macro expansion to enable recursion. More... | |
#define | CRGPU_MACRO_EXPANSION_IMPL_DONT() CRGPU_IGNORE |
Helper macro to defer macro expansion to enable recursion. More... | |
#define | CRGPU_MACRO_INSTANTIATION_IMPL_0 CRGPU_MACRO_INSTANTIATION_DO |
Helper macro to defer macro expansion to enable recursion. More... | |
#define | CRGPU_MACRO_INSTANTIATION_IMPL_1 CRGPU_MACRO_INSTANTIATION_DONT |
Helper macro to defer macro expansion to enable recursion. More... | |
#define | CRGPU_MACRO_INSTANTIATION_DO(...) __VA_ARGS__ |
Helper macro to defer macro expansion to enable recursion. More... | |
#define | CRGPU_MACRO_INSTANTIATION_DONT(...) CRGPU_IGNORE |
Helper macro to defer macro expansion to enable recursion. More... | |
#define | CRGPU_STRING_TO_ENUM_OP(TYPE, VAR_PREFIX_PAIR, IGNORE) |
Base macro to be applied to every element for converting strings to enums. More... | |
#define | CRGPU_CHEAP_STRING_TO_ENUM(VAR, PREFIX, ONE, ...) if (false) { return PREFIX::ONE; } CRGPU_MACRO_EXPANSION(CRGPU_STRING_TO_ENUM_OP, (VAR, PREFIX), ONE, __VA_ARGS__) |
Checks a string variable, VAR , for matching enum identifiers (ONE and the remaining variadic arguments), for the enum starting with PREFIX . More... | |
Contains some helpful macros to help with repetitive code...
Definition in file MacroHelpers.h.
#define CR_GPU_MACRO_RECURSE1 | ( | ... | ) | CR_GPU_MACRO_RECURSE2(CR_GPU_MACRO_RECURSE2(CR_GPU_MACRO_RECURSE2(CR_GPU_MACRO_RECURSE2(__VA_ARGS__)))) |
Helper macro to expand recursive macros (recursion level 1).
Definition at line 75 of file MacroHelpers.h.
#define CR_GPU_MACRO_RECURSE2 | ( | ... | ) | CR_GPU_MACRO_RECURSE3(CR_GPU_MACRO_RECURSE3(CR_GPU_MACRO_RECURSE3(CR_GPU_MACRO_RECURSE3(__VA_ARGS__)))) |
Helper macro to expand recursive macros (recursion level 2).
Definition at line 79 of file MacroHelpers.h.
#define CR_GPU_MACRO_RECURSE3 | ( | ... | ) | CR_GPU_MACRO_RECURSE4(CR_GPU_MACRO_RECURSE4(CR_GPU_MACRO_RECURSE4(CR_GPU_MACRO_RECURSE4(__VA_ARGS__)))) |
Helper macro to expand recursive macros (recursion level 3).
Definition at line 83 of file MacroHelpers.h.
#define CR_GPU_MACRO_RECURSE4 | ( | ... | ) | CR_GPU_MACRO_RECURSE_BASE(CR_GPU_MACRO_RECURSE_BASE(CR_GPU_MACRO_RECURSE_BASE(CR_GPU_MACRO_RECURSE_BASE(__VA_ARGS__)))) |
Helper macro to expand recursive macros (recursion level 4).
Definition at line 87 of file MacroHelpers.h.
#define CR_GPU_MACRO_RECURSE_BASE | ( | ... | ) | __VA_ARGS__ |
Helper macro to expand recursive macros (last recursion level: simply expands the macro).
Definition at line 91 of file MacroHelpers.h.
#define CRGPU_CHEAP_STRING_TO_ENUM | ( | VAR, | |
PREFIX, | |||
ONE, | |||
... | |||
) | if (false) { return PREFIX::ONE; } CRGPU_MACRO_EXPANSION(CRGPU_STRING_TO_ENUM_OP, (VAR, PREFIX), ONE, __VA_ARGS__) |
Checks a string variable, VAR
, for matching enum identifiers (ONE
and the remaining variadic arguments), for the enum starting with PREFIX
.
CRGPU_RECURSIVE_MACRO
to work properly. Definition at line 149 of file MacroHelpers.h.
#define CRGPU_CHECK_FOR_END | ( | X | ) | CRGPU_CHECK_FOR_END_CHECK(CRGPU_TEST_ ## X, 0) |
Check for CRGPU_END (or an empty argument) to terminate list.
Definition at line 63 of file MacroHelpers.h.
#define CRGPU_CHECK_FOR_END_CHECK | ( | ... | ) | CRGPU_GET_SECOND(__VA_ARGS__,) |
Implementation of checking for CRGPU_END (or an empty argument) to terminate list.
Definition at line 67 of file MacroHelpers.h.
#define CRGPU_CONCAT | ( | X, | |
Y | |||
) | CRGPU_CONCAT_HELPER(X, Y) |
Helper macro, concatenates two arguments.
Definition at line 30 of file MacroHelpers.h.
#define CRGPU_CONCAT_HELPER | ( | X, | |
... | |||
) | X ## __VA_ARGS__ |
Helper macro for concatenation.
Definition at line 34 of file MacroHelpers.h.
#define CRGPU_DEFER | ( | ... | ) | __VA_ARGS__ CRGPU_EMPTY() |
Helper macro, defers macro expansion to the next level of evaluation to allow recursive macros.
Definition at line 21 of file MacroHelpers.h.
#define CRGPU_EMPTY | ( | ) |
Definition at line 17 of file MacroHelpers.h.
#define CRGPU_GET_FIRST | ( | X, | |
... | |||
) | X |
Helper macro, returns the first argument.
Definition at line 48 of file MacroHelpers.h.
#define CRGPU_GET_SECOND | ( | X, | |
... | |||
) | CRGPU_GET_FIRST(__VA_ARGS__, X) |
Helper macro, returns the second argument.
Definition at line 52 of file MacroHelpers.h.
#define CRGPU_IGNORE | ( | ... | ) |
Helper macro, takes the arguments and expands to nothing.
Definition at line 26 of file MacroHelpers.h.
#define CRGPU_MACRO_EXPANSION | ( | MACRO, | |
EXTRA_ARG, | |||
... | |||
) | CRGPU_MACRO_EXPANSION_IMPL(MACRO, EXTRA_ARG, __VA_ARGS__, CRGPU_END, CRGPU_END) |
Helper macro to apply a macro to all elements of the variadic list, with EXTRA_ARG
and the parenthesised rest of the arguments being passed as arguments to the macro too.
Definition at line 97 of file MacroHelpers.h.
#define CRGPU_MACRO_EXPANSION_IMPL | ( | MACRO, | |
EXTRA_ARG, | |||
ONE, | |||
NEXT, | |||
... | |||
) |
Definition at line 100 of file MacroHelpers.h.
#define CRGPU_MACRO_EXPANSION_IMPL_0 CRGPU_MACRO_EXPANSION_IMPL_DO |
Helper macro to defer macro expansion to enable recursion.
Definition at line 106 of file MacroHelpers.h.
#define CRGPU_MACRO_EXPANSION_IMPL_1 CRGPU_MACRO_EXPANSION_IMPL_DONT |
Helper macro to defer macro expansion to enable recursion.
Definition at line 114 of file MacroHelpers.h.
#define CRGPU_MACRO_EXPANSION_IMPL_DO | ( | ) | CRGPU_MACRO_EXPANSION_IMPL |
Helper macro to defer macro expansion to enable recursion.
Definition at line 110 of file MacroHelpers.h.
#define CRGPU_MACRO_EXPANSION_IMPL_DONT | ( | ) | CRGPU_IGNORE |
Helper macro to defer macro expansion to enable recursion.
Definition at line 118 of file MacroHelpers.h.
#define CRGPU_MACRO_INSTANTIATION_DO | ( | ... | ) | __VA_ARGS__ |
Helper macro to defer macro expansion to enable recursion.
Definition at line 130 of file MacroHelpers.h.
#define CRGPU_MACRO_INSTANTIATION_DONT | ( | ... | ) | CRGPU_IGNORE |
Helper macro to defer macro expansion to enable recursion.
Definition at line 134 of file MacroHelpers.h.
#define CRGPU_MACRO_INSTANTIATION_IMPL_0 CRGPU_MACRO_INSTANTIATION_DO |
Helper macro to defer macro expansion to enable recursion.
Definition at line 122 of file MacroHelpers.h.
#define CRGPU_MACRO_INSTANTIATION_IMPL_1 CRGPU_MACRO_INSTANTIATION_DONT |
Helper macro to defer macro expansion to enable recursion.
Definition at line 126 of file MacroHelpers.h.
#define CRGPU_RECURSIVE_MACRO | ( | ... | ) | CR_GPU_MACRO_RECURSE1(CR_GPU_MACRO_RECURSE1(CR_GPU_MACRO_RECURSE1(CR_GPU_MACRO_RECURSE1(__VA_ARGS__)))) |
Expands recursive macros.
Wrap the recursive macro call in CRGPU_RECURSIVE_MACRO
to make it work.
Definition at line 71 of file MacroHelpers.h.
#define CRGPU_STRING_TO_ENUM_OP | ( | TYPE, | |
VAR_PREFIX_PAIR, | |||
IGNORE | |||
) |
Base macro to be applied to every element for converting strings to enums.
Definition at line 138 of file MacroHelpers.h.
#define CRGPU_STRINGIFY | ( | X | ) | CRGPU_STRINGIFY_HELPER(X) |
Helper macro, stringifies the argument.
Definition at line 39 of file MacroHelpers.h.
#define CRGPU_STRINGIFY_HELPER | ( | ... | ) | #__VA_ARGS__ |
Helper macro for concatenation.
Definition at line 43 of file MacroHelpers.h.
#define CRGPU_TEST_ ,1 |
Definitions to allow an empty argument to also be used as a terminator.
Definition at line 59 of file MacroHelpers.h.
#define CRGPU_TEST_CRGPU_END ,1 |
Definitions to check for list end.
Definition at line 56 of file MacroHelpers.h.