change some bit macros, fix pst_init bug (thx gcc!), TT mask 64 bits

This commit is contained in:
2024-09-04 20:07:19 +02:00
parent cf77a78aa6
commit 7e65fbc205
5 changed files with 18 additions and 13 deletions

View File

@@ -76,15 +76,15 @@ typedef struct {
/* memory size in bytes/mb */
size_t bytes;
u32 mb;
u32 mb;
/* size in buckets/keys */
size_t nbuckets;
size_t nkeys; /* nbuckets * NBUCKETS */
/* internal representation */
u32 nbits; /* #buckets in bits, power of 2 */
u32 mask; /* nbuckets - 1, key mask */
u32 nbits; /* #buckets in bits, power of 2 */
u64 mask; /* nbuckets - 1, bucket mask */
/* stats - unsure about usage */
//size_t used_buckets;
@@ -106,8 +106,8 @@ typedef struct {
extern hkey_t zobrist_pieces[16][64];
extern hkey_t zobrist_castling[4 * 4 + 1];
extern hkey_t zobrist_turn; /* for black, XOR each ply */
extern hkey_t zobrist_ep[9]; /* 0-7: ep file, 8: SQUARE_NONE */
extern hkey_t zobrist_turn; /* for black, XOR each ply */
extern hkey_t zobrist_ep[9]; /* 0-7: ep file, 8: SQUARE_NONE */
extern hasht_t hash_tt; /* main transposition table */