Skip to content
Snippets Groups Projects
Commit eeba5ca4 authored by Thibault Allenet's avatar Thibault Allenet
Browse files

Merge branch 'TensorImpl' into 'dev'

Update TensorImpl constructor to take the tensor  dimensions instead of the number of elements.

See merge request eclipse/aidge/aidge_backend_cuda!9
parents 3025e25c 4a725553
No related branches found
No related tags found
No related merge requests found
Pipeline #40137 failed
...@@ -69,12 +69,13 @@ private: ...@@ -69,12 +69,13 @@ private:
public: public:
static constexpr const char *Backend = "cuda"; static constexpr const char *Backend = "cuda";
TensorImpl_cuda(DeviceIdx_t device, NbElts_t length) : TensorImpl(Backend, device, length), mDataOwner(nullptr, cudaDelete) {} TensorImpl_cuda(DeviceIdx_t device, std::vector<DimSize_t> dims) : TensorImpl(Backend, device, dims), mDataOwner(nullptr, cudaDelete) {}
bool operator==(const TensorImpl &otherImpl) const override final; bool operator==(const TensorImpl &otherImpl) const override final;
static std::shared_ptr<TensorImpl_cuda> create(DeviceIdx_t device, NbElts_t length) { static std::shared_ptr<TensorImpl_cuda> create(DeviceIdx_t device, std::vector<DimSize_t> dims) {
return std::make_shared<TensorImpl_cuda<T>>(device, length); return std::make_shared<TensorImpl_cuda<T>>(device, dims);
} }
// native interface // native interface
......
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