#include <tvm/api.h>
#include <utility>
Go to the source code of this file.
◆ ADD_ARGUMENT
| #define ADD_ARGUMENT |
( |
|
T, |
|
|
|
member, |
|
|
|
b1, |
|
|
|
b2 |
|
) |
| |
Value: T member = T(); \
template<typename... Args> \
std::pair<bool, bool> processArgs(const T & m, const Args &... args) \
{ \
static_assert(!check_args<T, Args...>(), #T " has already been specified"); \
member = m; \
auto p = processArgs(args...); \
return {p.first || b1, p.second || b2}; \
}
This macro adds a member of type T named member to a struct, and a method processArgs to process it when it appears in a list of arguments. processArgs return a pair of boolean that is the member-wise "or" of another pair it gets by recursive call and {b1, b2}