1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
|
From 96a98f8bd1c514b257868d06cb07c9c149c38940 Mon Sep 17 00:00:00 2001
From: serge-sans-paille <sergesanspaille@free.fr>
Date: Mon, 5 Jan 2026 11:57:17 +0100
Subject: [PATCH 1/3] [ci] Add gcc 14 validation for arm
Related to #1232
---
.github/workflows/cross-arm.yml | 1 +
1 file changed, 1 insertion(+)
Index: xsimd/.github/workflows/cross-arm.yml
===================================================================
--- xsimd.orig/.github/workflows/cross-arm.yml 2026-02-09 15:46:20.512770778 +0100
+++ xsimd/.github/workflows/cross-arm.yml 2026-02-09 15:46:20.507045305 +0100
@@ -15,6 +15,7 @@
- { platform: 'aarch64', arch: 'armv8-a', dir: 'aarch64-linux-gnu', flags: '', full: 'ON' }
sys:
- { compiler: 'gcc', version: '10' }
+ - { compiler: 'gcc', version: '14' }
steps:
- name: Setup compiler
if: ${{ matrix.sys.compiler == 'gcc' }}
Index: xsimd/test/test_api.cpp
===================================================================
--- xsimd.orig/test/test_api.cpp 2026-02-09 15:46:20.512770778 +0100
+++ xsimd/test/test_api.cpp 2026-02-09 15:46:20.507761138 +0100
@@ -138,29 +138,31 @@
batch_type b = batch_type::load(v.data(), xsimd::aligned_mode());
V res(size);
- bool* b_data = new bool[size];
+ std::array<bool, size> b_data;
+
+ std::array<bool, size> b_ref;
+ std::fill(b_ref.begin(), b_ref.end(), true);
xsimd::store_as(res.data(), b, xsimd::unaligned_mode());
INFO(name, " unaligned");
CHECK_VECTOR_EQ(res, v);
- std::fill(b_data, b_data + size, false);
+ std::fill(b_data.begin(), b_data.end(), false);
batch_bool_type bb = (b == b);
- xsimd::store_as(b_data, bb, xsimd::unaligned_mode());
+ xsimd::store_as(&b_data[0], bb, xsimd::unaligned_mode());
+
INFO(name, " batch_bool unaligned");
- CHECK_UNARY(std::accumulate(b_data, b_data + size, true, std::logical_and<bool>()));
+ CHECK_ARRAY_EQ(b_ref, b_data);
xsimd::store_as(res.data(), b, xsimd::aligned_mode());
INFO(name, " aligned");
CHECK_VECTOR_EQ(res, v);
- std::fill(b_data, b_data + size, false);
+ std::fill(b_data.begin(), b_data.end(), false);
bb = (b == b);
- xsimd::store_as(b_data, bb, xsimd::aligned_mode());
+ xsimd::store_as(&b_data[0], bb, xsimd::aligned_mode());
INFO(name, " batch_bool aligned");
- CHECK_UNARY(std::accumulate(b_data, b_data + size, true, std::logical_and<bool>()));
-
- delete[] b_data;
+ CHECK_ARRAY_EQ(b_ref, b_data);
}
template <class T>
Index: xsimd/test/test_utils.hpp
===================================================================
--- xsimd.orig/test/test_utils.hpp 2026-02-09 15:46:20.512770778 +0100
+++ xsimd/test/test_utils.hpp 2026-02-09 15:46:20.508125279 +0100
@@ -538,6 +538,13 @@
INFO(#v2 ":", v2); \
CHECK_UNARY(::detail::expect_vector_near(v1, v2)); \
} while (0)
+#define CHECK_ARRAY_EQ(v1, v2) \
+ do \
+ { \
+ INFO(#v1 ":", v1); \
+ INFO(#v2 ":", v2); \
+ CHECK_UNARY(::detail::expect_array_near(v1, v2)); \
+ } while (0)
namespace xsimd
{
Index: xsimd/include/xsimd/arch/xsimd_neon64.hpp
===================================================================
--- xsimd.orig/include/xsimd/arch/xsimd_neon64.hpp 2026-02-09 15:46:20.512770778 +0100
+++ xsimd/include/xsimd/arch/xsimd_neon64.hpp 2026-02-09 15:46:20.510306807 +0100
@@ -181,11 +181,15 @@
* store<batch_bool> *
*********************/
+#if !defined(__GNUC__) && !defined(__clang__)
+ // FIXME: reproduce the issue and understand why it fails, see
+ // https://github.com/xtensor-stack/xsimd/issues/1232
template <class A>
XSIMD_INLINE void store(batch_bool<double, A> b, bool* mem, requires_arch<neon>) noexcept
{
store(batch_bool<uint64_t, A>(b.data), mem, A {});
}
+#endif
/****************
* load_complex *
|