Skip to content

Commit 7bca54b

Browse files
committed
hotfix for gcc-10 tests
1 parent 8fbdd6f commit 7bca54b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/test_shuffle.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -672,10 +672,15 @@ struct shuffle_test
672672
}
673673
};
674674

675+
#if defined(__GNUC__) && (__GNUC__ == 10) && XSIMD_WITH_AVX512F
676+
// Use zip_lo as a stable reference for the expected interleave.
677+
B b_ref_lo = xsimd::zip_lo(b_lhs, b_rhs);
678+
#else
675679
std::array<value_type, size> ref_lo;
676680
for (size_t i = 0; i < size; ++i)
677681
ref_lo[i] = (i & 1) ? rhs[i / 2] : lhs[i / 2];
678682
B b_ref_lo = B::load_unaligned(ref_lo.data());
683+
#endif
679684

680685
INFO("zip_lo");
681686
B b_res_lo = xsimd::shuffle(b_lhs, b_rhs, xsimd::make_batch_constant<mask_type, zip_lo_generator, arch_type>());
@@ -689,12 +694,17 @@ struct shuffle_test
689694
}
690695
};
691696

697+
#if defined(__GNUC__) && (__GNUC__ == 10) && XSIMD_WITH_AVX512F
698+
// Use zip_hi as a stable reference for the expected interleave.
699+
B b_ref_hi = xsimd::zip_hi(b_lhs, b_rhs);
700+
#else
692701
std::array<value_type, size> ref_hi;
693702
for (size_t i = 0; i < size; ++i)
694703
{
695704
ref_hi[i] = (i & 1) ? rhs[size / 2 + i / 2] : lhs[size / 2 + i / 2];
696705
}
697706
B b_ref_hi = B::load_unaligned(ref_hi.data());
707+
#endif
698708

699709
INFO("zip_hi");
700710
B b_res_hi = xsimd::shuffle(b_lhs, b_rhs, xsimd::make_batch_constant<mask_type, zip_hi_generator, arch_type>());

0 commit comments

Comments
 (0)