#ifndef NNUE_COMMON_H_INCLUDED
#define NNUE_COMMON_H_INCLUDED
+#include <algorithm>
+#include <cassert>
+#include <cstdint>
#include <cstring>
#include <iostream>
+#include <type_traits>
-#include "../misc.h" // for IsLittleEndian
+#include "../misc.h"
#if defined(USE_AVX2)
#include <immintrin.h>
#elif defined(USE_SSE2)
#include <emmintrin.h>
-#elif defined(USE_MMX)
-#include <mmintrin.h>
-
#elif defined(USE_NEON)
#include <arm_neon.h>
#endif
#elif defined(USE_SSE2)
constexpr std::size_t SimdWidth = 16;
- #elif defined(USE_MMX)
- constexpr std::size_t SimdWidth = 8;
-
#elif defined(USE_NEON)
constexpr std::size_t SimdWidth = 16;
#endif
else
{
std::uint8_t u[sizeof(IntType)];
- typename std::make_unsigned<IntType>::type v = 0;
+ std::make_unsigned_t<IntType> v = 0;
stream.read(reinterpret_cast<char*>(u), sizeof(IntType));
for (std::size_t i = 0; i < sizeof(IntType); ++i)
else
{
std::uint8_t u[sizeof(IntType)];
- typename std::make_unsigned<IntType>::type v = value;
+ std::make_unsigned_t<IntType> v = value;
std::size_t i = 0;
// if constexpr to silence the warning about shift by 8