We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 22ca7a6 commit 7614501Copy full SHA for 7614501
2 files changed
src/bitcount.h
@@ -85,6 +85,8 @@ template<>
85
inline int count_1s<CNT_POPCNT>(Bitboard b) {
86
#if !defined(USE_POPCNT)
87
return int(b != 0); // Avoid 'b not used' warning
88
+#elif defined(_MSC_VER) && defined(__INTEL_COMPILER)
89
+ return _mm_popcnt_u64(b);
90
#elif defined(_MSC_VER)
91
return __popcnt64(b);
92
#elif defined(__GNUC__)
src/types.h
@@ -86,6 +86,11 @@ typedef uint64_t Bitboard;
#define USE_BSFQ
#endif
+// Intel header for _mm_popcnt_u64() intrinsic
+#if defined(USE_POPCNT) && defined(_MSC_VER) && defined(__INTEL_COMPILER)
+#include <nmmintrin.h>
+#endif
93
+
94
// Cache line alignment specification
95
#if defined(_MSC_VER) || defined(__INTEL_COMPILER)
96
#define CACHE_LINE_ALIGNMENT __declspec(align(64))
0 commit comments