diff --git a/include/aidge/backend/cpu/data/TensorImpl.hpp b/include/aidge/backend/cpu/data/TensorImpl.hpp index 46dfae3d53b4b201507290bd538ea13737919c3e..a1fbfa336ae2148f687d5181a77e0dafa7466cf2 100644 --- a/include/aidge/backend/cpu/data/TensorImpl.hpp +++ b/include/aidge/backend/cpu/data/TensorImpl.hpp @@ -33,7 +33,7 @@ private: public: static constexpr const char *Backend = "cpu"; - TensorImpl_cpu(DeviceIdx_t device, NbElts_t length) : TensorImpl(Backend, device, length) {} + TensorImpl_cpu(DeviceIdx_t device, std::vector<DimSize_t> dims) : TensorImpl(Backend, device, dims) {} bool operator==(const TensorImpl &otherImpl) const override final { const auto& typedOtherImpl = reinterpret_cast<const TensorImpl_cpu<T> &>(otherImpl); @@ -47,8 +47,8 @@ public: return i == mNbElts; } - static std::shared_ptr<TensorImpl_cpu> create(DeviceIdx_t device, NbElts_t length) { - return std::make_shared<TensorImpl_cpu<T>>(device, length); + static std::shared_ptr<TensorImpl_cpu> create(DeviceIdx_t device, std::vector<DimSize_t> dims) { + return std::make_shared<TensorImpl_cpu<T>>(device, dims); } inline std::size_t scalarSize() const noexcept override final { return sizeof(T); }