From 9db70b1e3553b296654a08fe8bd0d4bc50482f3c Mon Sep 17 00:00:00 2001
From: Olivier BICHLER <olivier.bichler@cea.fr>
Date: Tue, 24 Sep 2024 14:16:40 +0200
Subject: [PATCH] Fixed BitShift with MR

---
 include/aidge/operator/BitShift.hpp | 3 ++-
 src/operator/BitShift.cpp           | 4 ++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/include/aidge/operator/BitShift.hpp b/include/aidge/operator/BitShift.hpp
index ad96f6f55..bd14bea76 100644
--- a/include/aidge/operator/BitShift.hpp
+++ b/include/aidge/operator/BitShift.hpp
@@ -31,7 +31,7 @@ namespace Aidge {
  * @brief Tensor BitShift Operator
  */
 class BitShift_Op : public OperatorTensor,
-    public Registrable<BitShift_Op, std::string, std::shared_ptr<OperatorImpl>(const BitShift_Op&)> {
+    public Registrable<BitShift_Op, std::string, std::function<std::shared_ptr<OperatorImpl>(const BitShift_Op&)>> {
 public:
     enum BitShiftDirection {left,right};
     static const std::string Type;
@@ -79,6 +79,7 @@ public:
      * @return Boolean
      */
     void setBackend(const std::string& name, DeviceIdx_t device = 0) override;
+    std::set<std::string> getAvailableBackends() const override;
     
     /**
      * @brief Getter to retrieve Attributes of the bitshift class
diff --git a/src/operator/BitShift.cpp b/src/operator/BitShift.cpp
index b21722a6e..7595590f7 100644
--- a/src/operator/BitShift.cpp
+++ b/src/operator/BitShift.cpp
@@ -58,3 +58,7 @@ void Aidge::BitShift_Op::setBackend(const std::string &name, Aidge::DeviceIdx_t
     SET_IMPL_MACRO(BitShift_Op, *this, name);
     mOutputs[0]->setBackend(name, device);
 }
+
+std::set<std::string> Aidge::BitShift_Op::getAvailableBackends() const {
+    return Registrar<BitShift_Op>::getKeys();
+}
-- 
GitLab