From 230796c3637d740194bc19a9942819b99200db00 Mon Sep 17 00:00:00 2001
From: NAUD Maxence <maxence.naud@cea.fr>
Date: Tue, 8 Aug 2023 08:58:49 +0000
Subject: [PATCH] [Upd] rm warning of unused parameter. [Add] some info of
 usage in imports

---
 include/aidge/operator/ConvDepthWiseImpl.hpp |  2 +-
 include/aidge/operator/ConvImpl.hpp          |  2 +-
 include/aidge/operator/FCImpl.hpp            |  2 +-
 include/aidge/operator/LeakyReLUImpl.hpp     |  2 +-
 include/aidge/operator/ProducerImpl.hpp      |  2 +-
 include/aidge/operator/ReLUImpl.hpp          |  2 +-
 include/aidge/operator/SoftmaxImpl.hpp       |  2 +-
 src/operator/AddImpl.cpp                     |  6 +++---
 src/operator/BatchNormImpl.cpp               |  7 +++----
 src/operator/ConvDepthWiseImpl.cpp           | 10 +++++-----
 src/operator/ConvImpl.cpp                    | 10 +++++-----
 src/operator/FCImpl.cpp                      |  8 ++++----
 src/operator/LeakyReLUImpl.cpp               |  8 ++++----
 src/operator/ProducerImpl.cpp                |  4 ++--
 src/operator/ReLUImpl.cpp                    |  8 ++++----
 src/operator/SoftmaxImpl.cpp                 |  8 ++++----
 16 files changed, 41 insertions(+), 42 deletions(-)

diff --git a/include/aidge/operator/ConvDepthWiseImpl.hpp b/include/aidge/operator/ConvDepthWiseImpl.hpp
index e9822ffa..64f5df8c 100644
--- a/include/aidge/operator/ConvDepthWiseImpl.hpp
+++ b/include/aidge/operator/ConvDepthWiseImpl.hpp
@@ -53,7 +53,7 @@ class ConvDepthWiseImpl2D_cpu : public OperatorImpl {
    public:
     NbElts_t getNbRequiredData(const IOIndex_t inputIdx) const override final;
     NbElts_t getNbRequiredProtected(const IOIndex_t inputIdx) const override final;
-    NbElts_t getRequiredMemory(__attribute__((unused)) const IOIndex_t outputIdx, const std::vector<DimSize_t> &inputsSize) const override final;
+    NbElts_t getRequiredMemory(__attribute__((unused)) const IOIndex_t outputIdx, __attribute__((unused)) const std::vector<DimSize_t> &inputsSize) const override final;
     NbElts_t getNbConsumedData(const IOIndex_t inputIdx) const override final;
     NbElts_t getNbProducedData(const IOIndex_t outputIdx) const override final;
 
diff --git a/include/aidge/operator/ConvImpl.hpp b/include/aidge/operator/ConvImpl.hpp
index d3fea6ac..7bdeb059 100644
--- a/include/aidge/operator/ConvImpl.hpp
+++ b/include/aidge/operator/ConvImpl.hpp
@@ -53,7 +53,7 @@ class ConvImpl2D_cpu : public OperatorImpl {
    public:
     NbElts_t getNbRequiredData(const IOIndex_t inputIdx) const override final;
     NbElts_t getNbRequiredProtected(const IOIndex_t inputIdx) const override final;
-    NbElts_t getRequiredMemory(__attribute__((unused)) const IOIndex_t outputIdx, const std::vector<DimSize_t> &inputsSize) const override final;
+    NbElts_t getRequiredMemory(__attribute__((unused)) const IOIndex_t outputIdx, __attribute__((unused)) const std::vector<DimSize_t> &inputsSize) const override final;
     NbElts_t getNbConsumedData(const IOIndex_t inputIdx) const override final;
     NbElts_t getNbProducedData(const IOIndex_t outputIdx) const override final;
 
diff --git a/include/aidge/operator/FCImpl.hpp b/include/aidge/operator/FCImpl.hpp
index a0135d96..44f53a57 100644
--- a/include/aidge/operator/FCImpl.hpp
+++ b/include/aidge/operator/FCImpl.hpp
@@ -47,7 +47,7 @@ class FCImpl_cpu : public OperatorImpl {
    public:
     NbElts_t getNbRequiredData(const IOIndex_t inputIdx) const override final;
     NbElts_t getNbRequiredProtected(const IOIndex_t inputIdx) const override final;
-    NbElts_t getRequiredMemory(__attribute__((unused)) const IOIndex_t outputIdx, const std::vector<DimSize_t> &inputsSize) const override final;
+    NbElts_t getRequiredMemory(__attribute__((unused)) const IOIndex_t outputIdx, __attribute__((unused)) const std::vector<DimSize_t> &inputsSize) const override final;
     NbElts_t getNbConsumedData(const IOIndex_t inputIdx) const override final;
     NbElts_t getNbProducedData(const IOIndex_t outputIdx) const override final;
 
diff --git a/include/aidge/operator/LeakyReLUImpl.hpp b/include/aidge/operator/LeakyReLUImpl.hpp
index a04b810b..dd5bc4d9 100644
--- a/include/aidge/operator/LeakyReLUImpl.hpp
+++ b/include/aidge/operator/LeakyReLUImpl.hpp
@@ -46,7 +46,7 @@ class LeakyReLUImpl_cpu : public OperatorImpl {
    public:
     NbElts_t getNbRequiredData(const IOIndex_t inputIdx) const override final;
     NbElts_t getNbRequiredProtected(const IOIndex_t inputIdx) const override final;
-    NbElts_t getRequiredMemory(__attribute__((unused)) const IOIndex_t outputIdx, const std::vector<DimSize_t>& inputsSize) const override final;
+    NbElts_t getRequiredMemory(__attribute__((unused)) const IOIndex_t outputIdx, __attribute__((unused)) const std::vector<DimSize_t>& inputsSize) const override final;
     NbElts_t getNbConsumedData(const IOIndex_t inputIdx) const override final;
     NbElts_t getNbProducedData(const IOIndex_t outputIdx) const override final;
 
diff --git a/include/aidge/operator/ProducerImpl.hpp b/include/aidge/operator/ProducerImpl.hpp
index 9cce69c6..d1376df3 100644
--- a/include/aidge/operator/ProducerImpl.hpp
+++ b/include/aidge/operator/ProducerImpl.hpp
@@ -34,7 +34,7 @@ class ProducerImpl_cpu : public OperatorImpl {
    public:
     NbElts_t getNbRequiredData(const IOIndex_t inputIdx) const override final;
     NbElts_t getNbRequiredProtected(const IOIndex_t inputIdx) const override final;
-    NbElts_t getRequiredMemory(__attribute__((unused)) const IOIndex_t outputIdx, const std::vector<DimSize_t> &inputsSize) const override final;
+    NbElts_t getRequiredMemory(__attribute__((unused)) const IOIndex_t outputIdx, __attribute__((unused)) const std::vector<DimSize_t> &inputsSize) const override final;
     NbElts_t getNbConsumedData(const IOIndex_t inputIdx) const override final;
     NbElts_t getNbProducedData(const IOIndex_t outputIdx) const override final;
 
diff --git a/include/aidge/operator/ReLUImpl.hpp b/include/aidge/operator/ReLUImpl.hpp
index 2b556bc1..905a7691 100644
--- a/include/aidge/operator/ReLUImpl.hpp
+++ b/include/aidge/operator/ReLUImpl.hpp
@@ -46,7 +46,7 @@ class ReLUImpl_cpu : public OperatorImpl {
    public:
     NbElts_t getNbRequiredData(const IOIndex_t inputIdx) const override final;
     NbElts_t getNbRequiredProtected(const IOIndex_t inputIdx) const override final;
-    NbElts_t getRequiredMemory(__attribute__((unused)) const IOIndex_t outputIdx, const std::vector<DimSize_t>& inputsSize) const override final;
+    NbElts_t getRequiredMemory(__attribute__((unused)) const IOIndex_t outputIdx, __attribute__((unused)) const std::vector<DimSize_t>& inputsSize) const override final;
     NbElts_t getNbConsumedData(const IOIndex_t inputIdx) const override final;
     NbElts_t getNbProducedData(const IOIndex_t outputIdx) const override final;
 
diff --git a/include/aidge/operator/SoftmaxImpl.hpp b/include/aidge/operator/SoftmaxImpl.hpp
index 5020802c..c4d718bb 100644
--- a/include/aidge/operator/SoftmaxImpl.hpp
+++ b/include/aidge/operator/SoftmaxImpl.hpp
@@ -46,7 +46,7 @@ class SoftmaxImpl_cpu : public OperatorImpl {
    public:
     NbElts_t getNbRequiredData(const IOIndex_t inputIdx) const override final;
     NbElts_t getNbRequiredProtected(const IOIndex_t inputIdx) const override final;
-    NbElts_t getRequiredMemory(__attribute__((unused)) const IOIndex_t outputIdx, const std::vector<DimSize_t>& inputsSize) const override final;
+    NbElts_t getRequiredMemory(__attribute__((unused)) const IOIndex_t outputIdx, __attribute__((unused)) const std::vector<DimSize_t>& inputsSize) const override final;
     NbElts_t getNbConsumedData(const IOIndex_t inputIdx) const override final;
     NbElts_t getNbProducedData(const IOIndex_t outputIdx) const override final;
 
diff --git a/src/operator/AddImpl.cpp b/src/operator/AddImpl.cpp
index 47717cef..f4e08ba5 100644
--- a/src/operator/AddImpl.cpp
+++ b/src/operator/AddImpl.cpp
@@ -10,9 +10,9 @@
  ********************************************************************************/
 
 #include <cassert>
-#include <numeric>
-#include <chrono>
-#include <thread>
+#include <chrono>  // std::chrono::milliseconds
+#include <numeric> // std::accumulate
+#include <thread>  // std::this_thread::sleep_for
 #include <vector>
 
 #include "aidge/operator/Conv.hpp"
diff --git a/src/operator/BatchNormImpl.cpp b/src/operator/BatchNormImpl.cpp
index 2b104f3c..5bb7d0a9 100644
--- a/src/operator/BatchNormImpl.cpp
+++ b/src/operator/BatchNormImpl.cpp
@@ -12,8 +12,7 @@
 #include "aidge/operator/BatchNormImpl.hpp"
 
 #include <cassert>
-#include <numeric>
-#include <thread>
+#include <numeric> // std::accumulate
 #include <vector>
 
 #include "aidge/operator/BatchNormImpl_forward_kernels.hpp"
@@ -35,8 +34,8 @@ Aidge::NbElts_t Aidge::BatchNormImpl2D_cpu::getNbRequiredProtected(IOIndex_t /*i
     return 0;
 }
 
-Aidge::NbElts_t Aidge::BatchNormImpl2D_cpu::getRequiredMemory(const Aidge::IOIndex_t outputIdx,
-                                                              const std::vector<Aidge::DimSize_t> &inputsSize) const {
+Aidge::NbElts_t Aidge::BatchNormImpl2D_cpu::getRequiredMemory(__attribute__((unused)) const Aidge::IOIndex_t outputIdx,
+                                                              __attribute__((unused)) const std::vector<Aidge::DimSize_t> &inputsSize) const {
     // Requires the whole tensors, regardless of available data on inputs
     assert(outputIdx == 0 && "operator has only one output");
 
diff --git a/src/operator/ConvDepthWiseImpl.cpp b/src/operator/ConvDepthWiseImpl.cpp
index 4dd687fd..178d602f 100644
--- a/src/operator/ConvDepthWiseImpl.cpp
+++ b/src/operator/ConvDepthWiseImpl.cpp
@@ -12,9 +12,9 @@
 #include "aidge/operator/ConvDepthWiseImpl.hpp"
 
 #include <cassert>
-#include <chrono>
-#include <numeric>
-#include <thread>
+#include <chrono>  // std::chrono::milliseconds
+#include <numeric> // std::accumulate
+#include <thread>  // std::this_thread::sleep_for
 #include <vector>
 
 #include "aidge/operator/ConvDepthWiseImpl_forward_kernels.hpp"
@@ -36,8 +36,8 @@ Aidge::NbElts_t Aidge::ConvDepthWiseImpl2D_cpu::getNbRequiredProtected(IOIndex_t
     return 0;
 }
 
-Aidge::NbElts_t Aidge::ConvDepthWiseImpl2D_cpu::getRequiredMemory(const Aidge::IOIndex_t outputIdx,
-                                                           const std::vector<Aidge::DimSize_t> &inputsSize) const {
+Aidge::NbElts_t Aidge::ConvDepthWiseImpl2D_cpu::getRequiredMemory(__attribute__((unused)) const Aidge::IOIndex_t outputIdx,
+                                                           __attribute__((unused)) const std::vector<Aidge::DimSize_t> &inputsSize) const {
     // Requires the whole tensors, regardless of available data on inputs
     assert(outputIdx == 0 && "operator has only one output");
 
diff --git a/src/operator/ConvImpl.cpp b/src/operator/ConvImpl.cpp
index 0c892673..58c83da1 100644
--- a/src/operator/ConvImpl.cpp
+++ b/src/operator/ConvImpl.cpp
@@ -12,9 +12,9 @@
 #include "aidge/operator/ConvImpl.hpp"
 
 #include <cassert>
-#include <chrono>
-#include <numeric>
-#include <thread>
+#include <chrono>  // std::chrono::milliseconds
+#include <numeric> // std::accumulate
+#include <thread>  // std::this_thread::sleep_for
 #include <vector>
 
 #include "aidge/operator/ConvImpl_forward_kernels.hpp"
@@ -36,8 +36,8 @@ Aidge::NbElts_t Aidge::ConvImpl2D_cpu::getNbRequiredProtected(IOIndex_t /*inputI
     return 0;
 }
 
-Aidge::NbElts_t Aidge::ConvImpl2D_cpu::getRequiredMemory(const Aidge::IOIndex_t outputIdx,
-                                                        const std::vector<Aidge::DimSize_t> &inputsSize) const {
+Aidge::NbElts_t Aidge::ConvImpl2D_cpu::getRequiredMemory(__attribute__((unused)) const Aidge::IOIndex_t outputIdx,
+                                                         __attribute__((unused)) const std::vector<Aidge::DimSize_t> &inputsSize) const {
     // Requires the whole tensors, regardless of available data on inputs
     assert(outputIdx == 0 && "operator has only one output");
 
diff --git a/src/operator/FCImpl.cpp b/src/operator/FCImpl.cpp
index 3195aa99..aa472969 100644
--- a/src/operator/FCImpl.cpp
+++ b/src/operator/FCImpl.cpp
@@ -10,9 +10,9 @@
  ********************************************************************************/
 
 #include <cassert>
-#include <chrono>
-#include <numeric>
-#include <thread>
+#include <chrono>  // std::chrono::milliseconds
+#include <numeric> // std::accumulate
+#include <thread>  // std::this_thread::sleep_for
 #include <vector>
 
 #include "aidge/operator/FC.hpp"
@@ -44,7 +44,7 @@ Aidge::NbElts_t
 }
 
 Aidge::NbElts_t Aidge::FCImpl_cpu::getRequiredMemory(
-    const IOIndex_t outputIdx, const std::vector<DimSize_t> &inputsSize) const
+    __attribute__((unused)) const IOIndex_t outputIdx, __attribute__((unused)) const std::vector<DimSize_t> &inputsSize) const
 {
     // Requires the whole tensors, regardless of available data on inputs
     assert(outputIdx == 0 && "operator has only one output");
diff --git a/src/operator/LeakyReLUImpl.cpp b/src/operator/LeakyReLUImpl.cpp
index c7493f12..8c88e1f7 100644
--- a/src/operator/LeakyReLUImpl.cpp
+++ b/src/operator/LeakyReLUImpl.cpp
@@ -10,9 +10,9 @@
  ********************************************************************************/
 
 #include <cassert>
-#include <numeric>
-#include <chrono>
-#include <thread>
+#include <chrono>  // std::chrono::milliseconds
+#include <numeric> // std::accumulate
+#include <thread>  // std::this_thread::sleep_for
 
 #include "aidge/operator/LeakyReLU.hpp"
 
@@ -38,7 +38,7 @@ Aidge::NbElts_t Aidge::LeakyReLUImpl_cpu::getNbRequiredProtected(const Aidge::IO
     return 0;
 }
 
-Aidge::NbElts_t Aidge::LeakyReLUImpl_cpu::getRequiredMemory(const Aidge::IOIndex_t outputIdx, const std::vector<Aidge::DimSize_t> &inputsSize) const {
+Aidge::NbElts_t Aidge::LeakyReLUImpl_cpu::getRequiredMemory(__attribute__((unused)) const Aidge::IOIndex_t outputIdx, __attribute__((unused)) const std::vector<Aidge::DimSize_t> &inputsSize) const {
     const auto& outputDims = mOp.getOutput(0)->dims();
     return std::accumulate(outputDims.begin(), outputDims.end(),
                         static_cast<NbElts_t>(1), std::multiplies<NbElts_t>());
diff --git a/src/operator/ProducerImpl.cpp b/src/operator/ProducerImpl.cpp
index b2abcdf3..69e4ba28 100644
--- a/src/operator/ProducerImpl.cpp
+++ b/src/operator/ProducerImpl.cpp
@@ -10,7 +10,7 @@
  ********************************************************************************/
 
 #include <cassert>
-#include <numeric>
+#include <numeric> // std::accumulate
 #include <vector>
 
 #include "aidge/data/Tensor.hpp"
@@ -42,7 +42,7 @@ std::size_t Aidge::ProducerImpl_cpu::getNbRequiredProtected(
 
 
 std::size_t Aidge::ProducerImpl_cpu::getRequiredMemory(
-    const IOIndex_t outputIdx, const std::vector<DimSize_t> &inputsSize) const
+    __attribute__((unused)) const IOIndex_t outputIdx, __attribute__((unused)) const std::vector<DimSize_t> &inputsSize) const
 {
     // Requires the whole tensors, regardless of available data on inputs
     assert(outputIdx == 0 && "operator has only one output");
diff --git a/src/operator/ReLUImpl.cpp b/src/operator/ReLUImpl.cpp
index 90763a91..9cbf0efe 100644
--- a/src/operator/ReLUImpl.cpp
+++ b/src/operator/ReLUImpl.cpp
@@ -10,9 +10,9 @@
  ********************************************************************************/
 
 #include <cassert>
-#include <numeric>
-#include <chrono>
-#include <thread>
+#include <chrono>  // std::chrono::milliseconds
+#include <numeric> // std::accumulate
+#include <thread>  // std::this_thread::sleep_for
 
 #include "aidge/operator/ReLU.hpp"
 
@@ -38,7 +38,7 @@ Aidge::NbElts_t Aidge::ReLUImpl_cpu::getNbRequiredProtected(const Aidge::IOIndex
     return 0;
 }
 
-Aidge::NbElts_t Aidge::ReLUImpl_cpu::getRequiredMemory(const Aidge::IOIndex_t outputIdx, const std::vector<Aidge::DimSize_t> &inputsSize) const {
+Aidge::NbElts_t Aidge::ReLUImpl_cpu::getRequiredMemory(__attribute__((unused)) const Aidge::IOIndex_t outputIdx, __attribute__((unused)) const std::vector<Aidge::DimSize_t> &inputsSize) const {
     const auto& outputDims = std::static_pointer_cast<Tensor>(mOp.getOutput(0))->dims();
     return std::accumulate(outputDims.begin(), outputDims.end(),
                         static_cast<NbElts_t>(1), std::multiplies<NbElts_t>());
diff --git a/src/operator/SoftmaxImpl.cpp b/src/operator/SoftmaxImpl.cpp
index 860ee791..b0f978c9 100644
--- a/src/operator/SoftmaxImpl.cpp
+++ b/src/operator/SoftmaxImpl.cpp
@@ -10,9 +10,9 @@
  ********************************************************************************/
 
 #include <cassert>
-#include <numeric>
-#include <chrono>
-#include <thread>
+#include <chrono>  // std::chrono::milliseconds
+#include <numeric> // std::accumulate
+#include <thread>  // std::this_thread::sleep_for
 
 #include "aidge/operator/Softmax.hpp"
 
@@ -38,7 +38,7 @@ Aidge::NbElts_t Aidge::SoftmaxImpl_cpu::getNbRequiredProtected(const Aidge::IOIn
     return 0;
 }
 
-Aidge::NbElts_t Aidge::SoftmaxImpl_cpu::getRequiredMemory(const Aidge::IOIndex_t outputIdx, const std::vector<Aidge::DimSize_t> &inputsSize) const {
+Aidge::NbElts_t Aidge::SoftmaxImpl_cpu::getRequiredMemory(__attribute__((unused)) const Aidge::IOIndex_t outputIdx, __attribute__((unused)) const std::vector<Aidge::DimSize_t> &inputsSize) const {
     const auto& outputDims = std::static_pointer_cast<Tensor>(mOp.getOutput(0))->dims();
     return std::accumulate(outputDims.begin(), outputDims.end(),
                         static_cast<NbElts_t>(1), std::multiplies<NbElts_t>());
-- 
GitLab