X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Ftypes.h;h=02b651dd9b124df4fc66d4e8c15dddd36afa2d76;hp=ea52fe6cb5216c5c85cc5a6910b86e0ef3662812;hb=057c3d60cd1037c6c54ae86414d9282bfc8a9afa;hpb=9350d0dce5190fc88b4770ece79299c6d3edd2ed diff --git a/src/types.h b/src/types.h index ea52fe6c..02b651dd 100644 --- a/src/types.h +++ b/src/types.h @@ -54,6 +54,12 @@ # include // Intel header for _mm_popcnt_u64() intrinsic #endif +#if defined(USE_PEXT) +# include // Header for _pext_u64() intrinsic +#else +# define _pext_u64(b, m) (0) +#endif + # if !defined(NO_PREFETCH) && (defined(__INTEL_COMPILER) || defined(_MSC_VER)) # include // Intel and Microsoft header for _mm_prefetch() # endif @@ -79,6 +85,12 @@ const bool HasPopCnt = true; const bool HasPopCnt = false; #endif +#ifdef USE_PEXT +const bool HasPext = true; +#else +const bool HasPext = false; +#endif + #ifdef IS_64BIT const bool Is64Bit = true; #else @@ -179,7 +191,9 @@ enum Value { KnightValueMg = 817, KnightValueEg = 846, BishopValueMg = 836, BishopValueEg = 857, RookValueMg = 1270, RookValueEg = 1278, - QueenValueMg = 2521, QueenValueEg = 2558 + QueenValueMg = 2521, QueenValueEg = 2558, + + MidgameLimit = 15581, EndgameLimit = 3998 }; enum PieceType { @@ -357,13 +371,13 @@ inline Piece make_piece(Color c, PieceType pt) { return Piece((c << 3) | pt); } -inline PieceType type_of(Piece p) { - return PieceType(p & 7); +inline PieceType type_of(Piece pc) { + return PieceType(pc & 7); } -inline Color color_of(Piece p) { - assert(p != NO_PIECE); - return Color(p >> 3); +inline Color color_of(Piece pc) { + assert(pc != NO_PIECE); + return Color(pc >> 3); } inline bool is_ok(Square s) {