From 966e274bc80420badd76c4d2d6c541214b46acb3 Mon Sep 17 00:00:00 2001
From: Noam Zerah <noam.zerah@cea.fr>
Date: Wed, 4 Dec 2024 21:18:46 +0000
Subject: [PATCH] Deprecate Scaling Node

---
 include/aidge/operator/Scaling.hpp | 3 +++
 src/operator/Scaling.cpp           | 9 ++++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/include/aidge/operator/Scaling.hpp b/include/aidge/operator/Scaling.hpp
index 4ef39f63a..9465667ba 100644
--- a/include/aidge/operator/Scaling.hpp
+++ b/include/aidge/operator/Scaling.hpp
@@ -23,6 +23,9 @@
 #include "aidge/utils/StaticAttributes.hpp"
 #include "aidge/utils/Types.h"
 
+//Caution: This operator is now deprecated and should no longer be used. 
+//It has been replaced by the MetaOperator "Quantizer" (located directly in aidge_quantization).
+
 namespace Aidge {
 enum class ScalingAttr {
     ScalingFactor, QuantizedNbBits, IsOutputUnsigned
diff --git a/src/operator/Scaling.cpp b/src/operator/Scaling.cpp
index 5ac08cd22..268a14cf9 100644
--- a/src/operator/Scaling.cpp
+++ b/src/operator/Scaling.cpp
@@ -18,6 +18,10 @@
 #include "aidge/utils/Registrar.hpp"
 #include "aidge/utils/Types.h"
 
+
+//Caution: This operator is now deprecated and should no longer be used. 
+//It has been replaced by the MetaOperator "Quantizer" (located directly in aidge_quantization).
+
 const std::string Aidge::Scaling_Op::Type = "Scaling";
 
 Aidge::Scaling_Op::Scaling_Op(float scalingFactor, std::size_t nbBits, bool isOutputUnsigned)
@@ -26,12 +30,15 @@ Aidge::Scaling_Op::Scaling_Op(float scalingFactor, std::size_t nbBits, bool isOu
         attr<ScalingAttr::ScalingFactor>(scalingFactor),
         attr<ScalingAttr::QuantizedNbBits>(nbBits),
         attr<ScalingAttr::IsOutputUnsigned>(isOutputUnsigned)))
-{}
+{
+    Log::warn("Caution: The [Scaling] operator is now deprecated and should no longer be used.\nIt has been replaced by the MetaOperator [Quantizer] (located directly in aidge_quantization).");
+} 
 
 Aidge::Scaling_Op::Scaling_Op(const Aidge::Scaling_Op& op)
     : OperatorTensor(op),
     mAttributes(op.mAttributes)
 {
+    Log::warn("Caution: The [Scaling] operator is now deprecated and should no longer be used. \nIt has been replaced by the MetaOperator [Quantizer] (located directly in aidge_quantization).");
     if (op.mImpl){
         SET_IMPL_MACRO(Scaling_Op, *this, op.backend());
     } else {
-- 
GitLab