Skip to content

Commit 7eeaf2f

Browse files
authored
Merge pull request xtensor-stack#1297 from AntoinePrv/fix-ci-test-shuffle
Fix Qemu avx512 build
2 parents 6b61b1a + 7f34804 commit 7eeaf2f

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

test/test_shuffle.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
* The full license is in the file LICENSE, distributed with this software. *
1010
****************************************************************************/
1111

12+
#include <vector>
13+
1214
#include "xsimd/xsimd.hpp"
1315
#ifndef XSIMD_NO_SUPPORTED_ARCHITECTURE
1416

@@ -620,13 +622,14 @@ struct shuffle_test
620622
void transpose()
621623
{
622624
B b_lhs = B::load_unaligned(lhs.data());
623-
std::array<B, size> b_matrix;
625+
// Due to issue with Qemu AVX512, we rely on vector for this otherwise static array
626+
std::vector<B, xsimd::aligned_allocator<B>> b_matrix = {};
624627
for (size_t i = 0; i < size; ++i)
625-
b_matrix[i] = b_lhs;
626-
std::array<value_type, size * size> ref_matrix;
628+
b_matrix.emplace_back(b_lhs);
629+
std::vector<value_type, xsimd::aligned_allocator<value_type>> ref_matrix = {};
627630
for (size_t i = 0; i < size; ++i)
628631
for (size_t j = 0; j < size; ++j)
629-
ref_matrix[i * size + j] = lhs[i];
632+
ref_matrix.emplace_back(lhs[i]);
630633

631634
INFO("transpose");
632635
xsimd::transpose(b_matrix.data(), b_matrix.data() + b_matrix.size());

0 commit comments

Comments
 (0)