Skip to content
Snippets Groups Projects
Commit 9db70b1e authored by Olivier BICHLER's avatar Olivier BICHLER
Browse files

Fixed BitShift with MR

parent acc6473b
No related branches found
No related tags found
2 merge requests!212Version 0.3.0,!186Refactor OperatorImpl for backend/export
Pipeline #55422 canceled
...@@ -31,7 +31,7 @@ namespace Aidge { ...@@ -31,7 +31,7 @@ namespace Aidge {
* @brief Tensor BitShift Operator * @brief Tensor BitShift Operator
*/ */
class BitShift_Op : public OperatorTensor, 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: public:
enum BitShiftDirection {left,right}; enum BitShiftDirection {left,right};
static const std::string Type; static const std::string Type;
...@@ -79,6 +79,7 @@ public: ...@@ -79,6 +79,7 @@ public:
* @return Boolean * @return Boolean
*/ */
void setBackend(const std::string& name, DeviceIdx_t device = 0) override; 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 * @brief Getter to retrieve Attributes of the bitshift class
......
...@@ -58,3 +58,7 @@ void Aidge::BitShift_Op::setBackend(const std::string &name, Aidge::DeviceIdx_t ...@@ -58,3 +58,7 @@ void Aidge::BitShift_Op::setBackend(const std::string &name, Aidge::DeviceIdx_t
SET_IMPL_MACRO(BitShift_Op, *this, name); SET_IMPL_MACRO(BitShift_Op, *this, name);
mOutputs[0]->setBackend(name, device); mOutputs[0]->setBackend(name, device);
} }
std::set<std::string> Aidge::BitShift_Op::getAvailableBackends() const {
return Registrar<BitShift_Op>::getKeys();
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment