From 7ec8b5d652942d3903befb1f02a26bc645bb465e Mon Sep 17 00:00:00 2001
From: hrouis <houssemeddine.rouis92@gmail.com>
Date: Thu, 25 Jan 2024 15:51:20 +0100
Subject: [PATCH] changed attrs to int32

---
 .../aidge/backend/cpu/operator/GatherImpl_forward_kernels.hpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/aidge/backend/cpu/operator/GatherImpl_forward_kernels.hpp b/include/aidge/backend/cpu/operator/GatherImpl_forward_kernels.hpp
index 1373c8a6..7cb1f6c0 100644
--- a/include/aidge/backend/cpu/operator/GatherImpl_forward_kernels.hpp
+++ b/include/aidge/backend/cpu/operator/GatherImpl_forward_kernels.hpp
@@ -40,12 +40,12 @@ void GatherImpl_cpu_forward_kernel(const typename Gather_Op::Attrs& attrs, const
         preAxisElems *= inputDims[i];
     }
 
-    const std::vector<std::int64_t> indices = std::get<0>(attrs);
+    const std::vector<std::int32_t> indices = std::get<0>(attrs);
     for (std::size_t i=0; i<preAxisElems; ++i)
     {
         for(std::size_t j=0; j<indices.size(); ++j)
         {
-            const std::size_t idx = indices[j] >= 0 ? indices[j] : indices[j] + inputDims[axisIdx];
+            const std::size_t idx = indices[j] >= 0 ? indices[j] : static_cast<std::size_t>(indices[j]) + inputDims[axisIdx];
             const I* startPtr = std::next(input, i * postAxisElems * inputDims[axisIdx] + idx * postAxisElems);
             std::copy_n(startPtr, postAxisElems, output);
             output += postAxisElems;
-- 
GitLab