From e0a416fdb4644548420c025aa6b43d9502043aa0 Mon Sep 17 00:00:00 2001
From: NAUD Maxence <maxence.naud@cea.fr>
Date: Thu, 29 Feb 2024 19:24:59 +0000
Subject: [PATCH] [Fix] Quick fix for TensorImpl unit-tests

---
 include/aidge/utils/ArrayHelpers.hpp   | 42 +++++++++++++-------------
 unit_tests/backend/Test_TensorImpl.cpp |  2 +-
 2 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/include/aidge/utils/ArrayHelpers.hpp b/include/aidge/utils/ArrayHelpers.hpp
index bd9f2e650..3f241fa6a 100644
--- a/include/aidge/utils/ArrayHelpers.hpp
+++ b/include/aidge/utils/ArrayHelpers.hpp
@@ -103,32 +103,32 @@ constexpr std::array<T, N + 1> append(T t, std::array<T, N> a) {
 // Generic helper for initializing a Tensor
 template <typename T, std::size_t SIZE_0>
 struct Array1D {
-    Array1D(std::initializer_list<T> list) {
-        auto it = list.begin();
-        for (std::size_t i = 0; i < SIZE_0; ++i, ++it) {
-            data[i] = *it;
-        }
-    }
-    Array1D(const T (&dataArray)[SIZE_0]) {
-        std::copy_n(&dataArray[0], SIZE_0, &data[0]);
-    }
+    // Array1D(std::initializer_list<T> list) {
+    //     auto it = list.begin();
+    //     for (std::size_t i = 0; i < SIZE_0; ++i, ++it) {
+    //         data[i] = *it;
+    //     }
+    // }
+    // Array1D(const T (&dataArray)[SIZE_0]) {
+    //     std::copy_n(&dataArray[0], SIZE_0, &data[0]);
+    // }
     T data[SIZE_0];
 };
 
 template <typename T, std::size_t SIZE_0, std::size_t SIZE_1>
 struct Array2D {
-    Array2D(std::initializer_list<std::initializer_list<T>> list) {
-        auto it1 = list.begin();
-        for (std::size_t i = 0; i < SIZE_0; ++i, ++it1) {
-            auto it2 = it1->begin();
-            for (std::size_t j = 0; j < SIZE_1; ++j, ++it2) {
-                data[i][j] = *it2;
-            }
-        }
-    }
-    Array2D(const T (&dataArray)[SIZE_0][SIZE_1]) {
-        std::copy_n(&dataArray[0][0], SIZE_0 * SIZE_1, &data[0][0]);
-    }
+    // Array2D(std::initializer_list<std::initializer_list<T>> list) {
+    //     auto it1 = list.begin();
+    //     for (std::size_t i = 0; i < SIZE_0; ++i, ++it1) {
+    //         auto it2 = it1->begin();
+    //         for (std::size_t j = 0; j < SIZE_1; ++j, ++it2) {
+    //             data[i][j] = *it2;
+    //         }
+    //     }
+    // }
+    // Array2D(const T (&dataArray)[SIZE_0][SIZE_1]) {
+    //     std::copy_n(&dataArray[0][0], SIZE_0 * SIZE_1, &data[0][0]);
+    // }
     T data[SIZE_0][SIZE_1];
 };
 
diff --git a/unit_tests/backend/Test_TensorImpl.cpp b/unit_tests/backend/Test_TensorImpl.cpp
index fef9c7d20..43e25092a 100644
--- a/unit_tests/backend/Test_TensorImpl.cpp
+++ b/unit_tests/backend/Test_TensorImpl.cpp
@@ -33,7 +33,7 @@ TEST_CASE("[backend/cpu/data] Tensor", "[TensorImpl]") {
     }
 }
 
-TEST_CASE("Tensor fill") {
+TEST_CASE("Tensor fill", "[TensorImpl][fill]") {
   SECTION("Instantiate batches independantly") {
     // initialization with 0s
     std::shared_ptr<Tensor> concatenatedTensor= std::make_shared<Tensor>(Array2D<int, 3, 5>{});
-- 
GitLab