]> git.sesse.net Git - stockfish/blobdiff - src/bitcount.h
Enable POPCNT at runtime
[stockfish] / src / bitcount.h
index 12826a9f9a05472c6e48066c202b55e0eea158ea..4016063383938fe7fbcc9309ff9767a2bfec6a7c 100644 (file)
@@ -159,4 +159,9 @@ inline int count_1s_max_15(Bitboard b) {
 }
 
 
+// Global variable initialized at startup that is set to true if
+// CPU on which application runs support POPCNT intrinsic.
+
+const bool CpuHasPOPCNT = cpu_has_popcnt();
+
 #endif // !defined(BITCOUNT_H_INCLUDED)