From 6110d525bf56e6a7857578596cb957c5fded8767 Mon Sep 17 00:00:00 2001
From: NAUD Maxence <maxence.naud@cea.fr>
Date: Wed, 2 Aug 2023 08:31:52 +0000
Subject: [PATCH] Make some arguments const for data flow functions

---
 include/aidge/backend/OperatorImpl.hpp | 8 ++++----
 include/aidge/operator/Operator.hpp    | 6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/include/aidge/backend/OperatorImpl.hpp b/include/aidge/backend/OperatorImpl.hpp
index a8b4b0938..7e022145d 100644
--- a/include/aidge/backend/OperatorImpl.hpp
+++ b/include/aidge/backend/OperatorImpl.hpp
@@ -29,10 +29,10 @@ public:
      * @param inputIdx Index of the input analysed.
      * @return std::size_t
      */
-    virtual NbElts_t getNbRequiredData(IOIndex_t inputIdx) const = 0;
+    virtual NbElts_t getNbRequiredData(const IOIndex_t inputIdx) const = 0;
 
     // Amount of input data that cannot be overwritten during the execution.
-    virtual NbElts_t getNbRequiredProtected(IOIndex_t inputIdx) const = 0;
+    virtual NbElts_t getNbRequiredProtected(const IOIndex_t inputIdx) const = 0;
 
     // Memory required at an output for a given input size.
     virtual NbElts_t getRequiredMemory(const IOIndex_t outputIdx, const std::vector<DimSize_t> &inputsSize) const = 0;
@@ -43,7 +43,7 @@ public:
      * @param inputIdx Index of the input analysed.
      * @return DimSize_t
      */
-    virtual NbElts_t getNbConsumedData(IOIndex_t inputIdx) const = 0;
+    virtual NbElts_t getNbConsumedData(const IOIndex_t inputIdx) const = 0;
 
     /**
      * @brief TOtal amount of produced data ready to be used on a specific output.
@@ -51,7 +51,7 @@ public:
      * @param outputIdx Index of the output analysed.
      * @return DimSize_t
      */
-    virtual NbElts_t getNbProducedData(IOIndex_t outputIdx) const = 0;
+    virtual NbElts_t getNbProducedData(const IOIndex_t outputIdx) const = 0;
 
     virtual ~OperatorImpl() = default;
 };
diff --git a/include/aidge/operator/Operator.hpp b/include/aidge/operator/Operator.hpp
index e8ce72228..bb20177b1 100644
--- a/include/aidge/operator/Operator.hpp
+++ b/include/aidge/operator/Operator.hpp
@@ -60,7 +60,7 @@ public:
      * @param inputIdx Index of the input analysed.
      * @return NbElts_t 
      */
-    NbElts_t getNbRequiredData(IOIndex_t inputIdx) const;
+    NbElts_t getNbRequiredData(const IOIndex_t inputIdx) const;
 
     /**
      * @brief Amount of data from a specific input actually used in one computation pass.
@@ -68,7 +68,7 @@ public:
      * @param inputIdx Index of the input analysed.
      * @return NbElts_t 
      */
-    NbElts_t getNbConsumedData(IOIndex_t inputIdx) const;
+    NbElts_t getNbConsumedData(const IOIndex_t inputIdx) const;
 
     /**
      * @brief Amount of data ready to be used on a specific output.
@@ -76,7 +76,7 @@ public:
      * @param outputIdx Index of the output analysed.
      * @return NbElts_t 
      */
-    NbElts_t getNbProducedData(IOIndex_t outputIdx) const;
+    NbElts_t getNbProducedData(const IOIndex_t outputIdx) const;
 
     virtual void forward();
 
-- 
GitLab