mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 00:33:09 +00:00
Add auto configuration for 32/64 bits
Instead of manually adjust defines in bitboard.h now proper ones are automatically set. It is anyhow possible to still set them manually in case of problems. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
3ee3cdc09b
commit
d6618d7325
1 changed files with 18 additions and 0 deletions
|
@ -25,6 +25,18 @@
|
||||||
//// Defines
|
//// Defines
|
||||||
////
|
////
|
||||||
|
|
||||||
|
// Comment following define if you prefer manually adjust
|
||||||
|
// platform macros defined below
|
||||||
|
#define AUTO_CONFIGURATION
|
||||||
|
|
||||||
|
|
||||||
|
// Check for 64 bits for different compilers: Intel, MSVC and gcc
|
||||||
|
#if defined(__x86_64) || defined(_WIN64) || (__SIZEOF_INT__ > 4)
|
||||||
|
#define IS_64BIT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(AUTO_CONFIGURATION) || defined(IS_64BIT)
|
||||||
|
|
||||||
//#define USE_COMPACT_ROOK_ATTACKS
|
//#define USE_COMPACT_ROOK_ATTACKS
|
||||||
//#define USE_32BIT_ATTACKS
|
//#define USE_32BIT_ATTACKS
|
||||||
#define USE_FOLDED_BITSCAN
|
#define USE_FOLDED_BITSCAN
|
||||||
|
@ -33,7 +45,13 @@
|
||||||
//#define BITCOUNT_SWAR_32
|
//#define BITCOUNT_SWAR_32
|
||||||
//#define BITCOUNT_LOOP
|
//#define BITCOUNT_LOOP
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#define USE_32BIT_ATTACKS
|
||||||
|
#define USE_FOLDED_BITSCAN
|
||||||
|
#define BITCOUNT_SWAR_32
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
////
|
////
|
||||||
//// Includes
|
//// Includes
|
||||||
|
|
Loading…
Add table
Reference in a new issue