Skip to content
Snippets Groups Projects
Commit 28aa4e7c authored by Olivier BICHLER's avatar Olivier BICHLER
Browse files

Added macro helper for Registrar

parent d6039d95
No related branches found
No related tags found
2 merge requests!212Version 0.3.0,!186Refactor OperatorImpl for backend/export
Pipeline #53595 failed
......@@ -141,4 +141,13 @@ void declare_registrable(py::module& m, const std::string& class_name){
}
#define CONCAT(a, b) CONCAT_INNER(a, b)
#define CONCAT_INNER(a, b) a ## b
#define REGISTRAR(cls, ...) \
namespace { \
static Registrar<cls> CONCAT(CONCAT(aidge_register_ , cls), __COUNTER__)(__VA_ARGS__); \
} \
static_assert(true, "")
#endif //AIDGE_CORE_UTILS_REGISTRAR_H_
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment