From 8e449e0fd2e408ae49e451b18abde4d76d26e524 Mon Sep 17 00:00:00 2001 From: Olivier BICHLER <olivier.bichler@cea.fr> Date: Mon, 9 Sep 2024 10:31:43 +0200 Subject: [PATCH] Do not addAttr with any! --- src/operator/MetaOperator.cpp | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/src/operator/MetaOperator.cpp b/src/operator/MetaOperator.cpp index dd736d853..1b4c73990 100644 --- a/src/operator/MetaOperator.cpp +++ b/src/operator/MetaOperator.cpp @@ -84,24 +84,12 @@ void Aidge::MetaOperator_Op::setBackend(const std::string &name, Aidge::DeviceId std::shared_ptr<Aidge::Attributes> Aidge::MetaOperator_Op::attributes() const { auto attrs = std::make_shared<DynamicAttributes>(); - std::set<std::string> nonUniqueGlobalAttrs; for (const auto& node : mGraph->getRankedNodesName("{3}")) { - const auto nodeAttrs = node.first->getOperator()->attributes()->getAttrs(); - for (const auto& attr : nodeAttrs) { - attrs->addAttr(node.first->type() + "#" + node.second + "." + attr.first, attr.second); - if (node.second == "0") { - attrs->addAttr(node.first->type() + "." + attr.first, attr.second); - if (nonUniqueGlobalAttrs.find(attr.first) == nonUniqueGlobalAttrs.end()) { - if (!attrs->hasAttr(attr.first)) { - attrs->addAttr(attr.first, attr.second); - } - else { - attrs->delAttr(attr.first); - nonUniqueGlobalAttrs.insert(attr.first); - } - } - } + const auto nodeAttrs = DynamicAttributes(node.first->getOperator()->attributes()->getAttrs()); + attrs->addAttr(node.first->type() + "#" + node.second, nodeAttrs); + if (node.second == "0") { + attrs->addAttr(node.first->type(), nodeAttrs); } } -- GitLab