From ee232ad775f440e66b1116f05e459788368b3f70 Mon Sep 17 00:00:00 2001
From: Olivier BICHLER <olivier.bichler@cea.fr>
Date: Wed, 4 Oct 2023 18:25:32 +0200
Subject: [PATCH] Added missing getRaw

---
 include/aidge/backend/cuda/data/TensorImpl.hpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/include/aidge/backend/cuda/data/TensorImpl.hpp b/include/aidge/backend/cuda/data/TensorImpl.hpp
index ea63f58..73b2111 100644
--- a/include/aidge/backend/cuda/data/TensorImpl.hpp
+++ b/include/aidge/backend/cuda/data/TensorImpl.hpp
@@ -58,7 +58,11 @@ class TensorImpl_cuda : public TensorImpl, public TensorImpl_cuda_  {
     void *rawPtr() override {
         lazyInit(reinterpret_cast<void**>(&mData));
         return mData;
-    };
+    }
+
+    void* getRaw(std::size_t idx) {
+        return static_cast<void*>(static_cast<T*>(rawPtr()) + idx);
+    }
 
     const cudnnTensorDescriptor_t& getCudnnTensorDesc() const override {
         if (mCudnnTensor == nullptr) {
-- 
GitLab