diff --git a/src/movepick.cpp b/src/movepick.cpp index 4529af7d..77c42efa 100644 --- a/src/movepick.cpp +++ b/src/movepick.cpp @@ -42,12 +42,12 @@ namespace { /// Variables - MovePicker::MovegenPhase PhaseTable[32]; + CACHE_LINE_ALIGNMENT int MainSearchPhaseIndex; int EvasionsPhaseIndex; int QsearchWithChecksPhaseIndex; int QsearchWithoutChecksPhaseIndex; - + uint8_t PhaseTable[32]; } diff --git a/src/types.h b/src/types.h index 95e3f6ee..a9badca0 100644 --- a/src/types.h +++ b/src/types.h @@ -66,4 +66,11 @@ typedef uint64_t Bitboard; #define USE_BSFQ #endif +// Cache line alignment specification +#if defined(_MSC_VER) || defined(__INTEL_COMPILER) +#define CACHE_LINE_ALIGNMENT __declspec(align(64)) +#else +#define CACHE_LINE_ALIGNMENT __attribute__ ((aligned(64))) +#endif + #endif // !defined(TYPES_H_INCLUDED)