diff --git a/src/nnue/simd.h b/src/nnue/simd.h index 9a60e33cb..812ac4f4b 100644 --- a/src/nnue/simd.h +++ b/src/nnue/simd.h @@ -340,64 +340,6 @@ inline __m128i vec_convert_8_16(u64 x) { #endif -struct Vec16Wrapper { -#ifdef VECTOR - using type = vec_t; - static type add(const type& lhs, const type& rhs) { return vec_add_16(lhs, rhs); } - static type sub(const type& lhs, const type& rhs) { return vec_sub_16(lhs, rhs); } -#else - using type = BiasType; - static type add(const type& lhs, const type& rhs) { return lhs + rhs; } - static type sub(const type& lhs, const type& rhs) { return lhs - rhs; } -#endif -}; - -struct Vec32Wrapper { -#ifdef VECTOR - using type = psqt_vec_t; - static type add(const type& lhs, const type& rhs) { return vec_add_psqt_32(lhs, rhs); } - static type sub(const type& lhs, const type& rhs) { return vec_sub_psqt_32(lhs, rhs); } -#else - using type = PSQTWeightType; - static type add(const type& lhs, const type& rhs) { return lhs + rhs; } - static type sub(const type& lhs, const type& rhs) { return lhs - rhs; } -#endif -}; - -enum UpdateOperation { - Add, - Sub -}; - -template = true> -typename VecWrapper::type fused(const typename VecWrapper::type& in) { - return in; -} - -template, bool> = true, - std::enable_if_t = true> -typename VecWrapper::type -fused(const typename VecWrapper::type& in, const T& operand, const Ts&... operands) { - switch (update_op) - { - case Add : - return fused(VecWrapper::add(in, operand), operands...); - case Sub : - return fused(VecWrapper::sub(in, operand), operands...); - default : - static_assert(update_op == Add || update_op == Sub, - "Only Add and Sub are currently supported."); - return typename VecWrapper::type(); - } -} - #if defined(USE_AVX512) [[maybe_unused]] static int m512_hadd(__m512i sum, int bias) { diff --git a/src/types.h b/src/types.h index 71bc90812..6a2fcc694 100644 --- a/src/types.h +++ b/src/types.h @@ -39,7 +39,6 @@ #include #include #include - #include #include "misc.h" #if defined(_MSC_VER) @@ -481,14 +480,6 @@ class Move { u16 data; }; -template -struct is_all_same { - static constexpr bool value = (std::is_same_v && ...); -}; - -template -constexpr auto is_all_same_v = is_all_same::value; - } // namespace Stockfish #endif // #ifndef TYPES_H_INCLUDED