diff --git a/include/aidge/data/Tensor.hpp b/include/aidge/data/Tensor.hpp index a5d59e3894cb22f059a4116a38294098024ab371..2503c01b385a7a28eda0490a0715ef2de3a1f1db 100644 --- a/include/aidge/data/Tensor.hpp +++ b/include/aidge/data/Tensor.hpp @@ -348,6 +348,10 @@ public: return newTensor; } + const std::string backend() const { + return hasImpl() ? getImpl()->backend() : ""; + } + /** * @brief Set the backend of the Tensor associated implementation. If there * was no previous implementation set, data will be allocated, but it will @@ -410,8 +414,8 @@ public: * @brief Get the Impl object * @return constexpr const std::shared_ptr<TensorImpl>& */ - constexpr const std::shared_ptr<TensorImpl> &getImpl() const { return mImpl; } - constexpr std::size_t getImplOffset() const { return mImplOffset; } + constexpr const std::shared_ptr<TensorImpl>& getImpl() const noexcept { return mImpl; } + constexpr std::size_t getImplOffset() const noexcept { return mImplOffset; } /** * @brief Set the Impl object