From b29f4d7be67fb59556305fa63c497f9e1a68a262 Mon Sep 17 00:00:00 2001 From: cmoineau <cyril.moineau@cea.fr> Date: Mon, 24 Feb 2025 16:31:52 +0000 Subject: [PATCH] Use SET_IMPL_MACRO for metaop. --- src/operator/MetaOperator.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/operator/MetaOperator.cpp b/src/operator/MetaOperator.cpp index a7d2a1da8..192cc9f5e 100644 --- a/src/operator/MetaOperator.cpp +++ b/src/operator/MetaOperator.cpp @@ -19,6 +19,8 @@ #include "aidge/graph/GraphView.hpp" #include "aidge/utils/ErrorHandling.hpp" #include "aidge/utils/DynamicAttributes.hpp" +#include "aidge/utils/Registrar.hpp" // SET_IMPL_MACRO + Aidge::MetaOperator_Op::MetaOperator_Op(const std::string& type, const std::shared_ptr<GraphView>& graph, const std::vector<InputCategory>& forcedInputsCategory) : OperatorTensor(type, [graph, forcedInputsCategory]() { @@ -113,8 +115,7 @@ std::string Aidge::MetaOperator_Op::backend() const noexcept { void Aidge::MetaOperator_Op::setBackend(const std::string &name, Aidge::DeviceIdx_t device) { if (Registrar<MetaOperator_Op>::exists({name, type()})) { // A custom implementation exists for this meta operator - mImpl = Registrar<MetaOperator_Op>::create({name, type()})(*this); - + SET_IMPL_MACRO(MetaOperator_Op, *this, {name, type()}); // Set backend for in/out tensor of the MetaOp for(auto i: mGraph->inputNodes()){ auto op_i = std::static_pointer_cast<OperatorTensor>(i->getOperator()); -- GitLab