1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-29 16:23:09 +00:00

fix clang compiler warning for avx512 build

Initialize variable in constexpr function to get rid of clang compiler warning for avx512 build.

closes https://github.com/official-stockfish/Stockfish/pull/5176

Non-functional change
This commit is contained in:
Gahtan Nahdi 2024-04-15 11:55:28 +07:00 committed by Joost VandeVondele
parent 9021a61807
commit d0e72c19fa

View file

@ -229,8 +229,7 @@ class FeatureTransformer {
static constexpr void order_packs([[maybe_unused]] uint64_t* v) {
#if defined(USE_AVX512) // _mm512_packs_epi16 ordering
uint64_t tmp0, tmp1;
tmp0 = v[2], tmp1 = v[3];
uint64_t tmp0 = v[2], tmp1 = v[3];
v[2] = v[8], v[3] = v[9];
v[8] = v[4], v[9] = v[5];
v[4] = tmp0, v[5] = tmp1;
@ -246,8 +245,7 @@ class FeatureTransformer {
static constexpr void inverse_order_packs([[maybe_unused]] uint64_t* v) {
#if defined(USE_AVX512) // Inverse _mm512_packs_epi16 ordering
uint64_t tmp0, tmp1;
tmp0 = v[2], tmp1 = v[3];
uint64_t tmp0 = v[2], tmp1 = v[3];
v[2] = v[4], v[3] = v[5];
v[4] = v[8], v[5] = v[9];
v[8] = tmp0, v[9] = tmp1;