From aee1bbe656c9ae7d2b617cf1ae23d4444e59a1b9 Mon Sep 17 00:00:00 2001 From: thibault allenet <thibault.allenet@cea.fr> Date: Mon, 12 Feb 2024 16:07:11 +0000 Subject: [PATCH] Update tensorimpl_cpu with dimensions --- include/aidge/backend/cpu/data/TensorImpl.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/aidge/backend/cpu/data/TensorImpl.hpp b/include/aidge/backend/cpu/data/TensorImpl.hpp index 46dfae3d5..a1fbfa336 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); } -- GitLab