From 9a6798c42f4a6185512f73d7b13e6fcbd9a5d639 Mon Sep 17 00:00:00 2001 From: NAUD Maxence <maxence.naud@cea.fr> Date: Wed, 26 Feb 2025 12:41:55 +0000 Subject: [PATCH] solve an inlining fail by removing inline --- include/aidge/graph/Node.hpp | 9 +++------ include/aidge/utils/Directories.hpp | 3 +-- src/graph/Node.cpp | 6 ++++++ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/include/aidge/graph/Node.hpp b/include/aidge/graph/Node.hpp index d71d095e7..9b16f76d5 100644 --- a/include/aidge/graph/Node.hpp +++ b/include/aidge/graph/Node.hpp @@ -213,10 +213,7 @@ public: * @param inID * @return std::pair<std::shared_ptr<Node>, IOIndex_t> */ - inline std::pair<NodePtr, IOIndex_t> input(const IOIndex_t inID) const { - AIDGE_ASSERT((inID != gk_IODefaultIndex) && (inID < nbInputs()), "Input index out of bound."); - return std::pair<NodePtr, IOIndex_t>(mParents[inID], mIdOutParents[inID]); - } + std::pair<std::shared_ptr<Node>, IOIndex_t> input(const IOIndex_t inID) const; /** @@ -328,7 +325,7 @@ public: * Default to 0. * @param otherInId ID of the other Node input to connect to the current Node. * Default to the first available data input. - * + * * @note otherNode shared_ptr is passed by refenrece in order to be able to detect * possible dangling connection situations in debug using ref counting. */ @@ -509,7 +506,7 @@ private: * @param otherNode * @param outId * @param otherInId - * + * * @note otherNode shared_ptr is passed by refenrece in order to be able to detect * possible dangling connection situations in debug using ref counting. */ diff --git a/include/aidge/utils/Directories.hpp b/include/aidge/utils/Directories.hpp index 783783946..c42280a6d 100644 --- a/include/aidge/utils/Directories.hpp +++ b/include/aidge/utils/Directories.hpp @@ -11,11 +11,10 @@ #ifndef AIDGE_DIRECTORIES_H_ #define AIDGE_DIRECTORIES_H_ -#include <algorithm> +#include <algorithm> // std::replace_if #include <errno.h> #include <string> // #include <string_view> available in c++-17 -#include <vector> #include <fmt/core.h> #include <fmt/format.h> diff --git a/src/graph/Node.cpp b/src/graph/Node.cpp index 1c8585d1d..0dec30c2f 100644 --- a/src/graph/Node.cpp +++ b/src/graph/Node.cpp @@ -173,6 +173,12 @@ std::vector<std::pair<std::shared_ptr<Aidge::Node>, Aidge::IOIndex_t>> Aidge::No return res; } +std::pair<std::shared_ptr<Aidge::Node>, Aidge::IOIndex_t> Aidge::Node::input(const Aidge::IOIndex_t inID) const { + // nbInputs already < gk_IODefaultIndex + AIDGE_ASSERT((inID < nbInputs()), "Input index out of bound."); + return std::pair<NodePtr, IOIndex_t>(mParents[inID], mIdOutParents[inID]); +} + // void Aidge::Node::setInput(const Aidge::IOIndex_t idx, const std::shared_ptr<Aidge::Tensor> // tensor) { // assert(((idx != gk_IODefaultIndex) && (idx < nbInputs())) && "Parent index out of bound."); -- GitLab