mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 00:56:39 +08:00
Enable POPCNT at runtime
Runtime detect POPCNT instruction support and use it. Also if POPCNT is not supported we don't add _any_ overhead so that we don't lose any speed in standard case. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user