diff options
| author | Scott Gasch <[email protected]> | 2026-08-26 06:58:26 -0700 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2026-08-26 06:58:26 -0700 |
| commit | df0135e11e9ea3dd0acab94fdf437451ef7e522b (patch) | |
| tree | eb480504ff578878ee4de17778601f1ffc042827 /src | |
| parent | dd40b5e159ebcf029ee0c36711a5a74a8370b18d (diff) | |
Make EVAL_HASH optional.
Diffstat (limited to 'src')
| -rwxr-xr-x | src/chess.h | 2 | ||||
| -rw-r--r-- | src/evalhash.c | 13 | ||||
| -rwxr-xr-x | src/main.c | 8 |
3 files changed, 18 insertions, 5 deletions
diff --git a/src/chess.h b/src/chess.h index 8861ef1..e47279d 100755 --- a/src/chess.h +++ b/src/chess.h @@ -947,7 +947,7 @@ typedef struct _PLY_INFO } PLY_INFO; -#define EVAL_HASH +// #define EVAL_HASH #ifdef EVAL_HASH #define EVAL_HASH_TABLE_SIZE (2097152) // 32Mb (per thread) diff --git a/src/evalhash.c b/src/evalhash.c index 210c369..bd95b99 100644 --- a/src/evalhash.c +++ b/src/evalhash.c @@ -19,12 +19,11 @@ Revision History: --*/ #include "chess.h" -#ifdef EVAL_HASH extern ULONG g_uIterateDepth; -SCORE -GetRoughEvalScore(IN OUT SEARCHER_THREAD_CONTEXT *ctx, +SCORE +GetRoughEvalScore(IN OUT SEARCHER_THREAD_CONTEXT *ctx, IN SCORE iAlpha, IN SCORE iBeta, IN FLAG fUseHash) @@ -67,6 +66,7 @@ Return value: { return Eval(ctx, iAlpha, iBeta); } +#ifdef EVAL_HASH else if ((fUseHash) || (ctx->uPly <= (g_uIterateDepth / 2))) { u64Key = (pos->u64PawnSig ^ pos->u64NonPawnSig); @@ -93,9 +93,16 @@ Return value: } } } +#else + (void)u64Key; + (void)u; + (void)fUseHash; +#endif return(pos->iMaterialBalance[pos->uToMove] + ctx->uPositional); } +#ifdef EVAL_HASH + SCORE ProbeEvalHash(IN OUT SEARCHER_THREAD_CONTEXT *ctx, IN SCORE iAlpha, IN SCORE iBeta) @@ -79,10 +79,16 @@ Return value: #ifdef DUMP_TREE Trace(" Search tree dumpfile generation enabled\n"); #endif - Trace(" Hash sizes: %u Mb (main), %u Mb / thread (pawn), %u Mb / thread (eval)\n", +#ifdef EVAL_HASH + Trace(" Hash sizes: %u Mb (main), %u Mb / thread (pawn), %u Mb / thread (eval)\n", (g_uHashTableSizeEntries * sizeof(HASH_ENTRY)) / MB, PAWN_HASH_TABLE_SIZE * sizeof(PAWN_HASH_ENTRY) / MB, EVAL_HASH_TABLE_SIZE * sizeof(EVAL_HASH_ENTRY) / MB); +#else + Trace(" Hash sizes: %u Mb (main), %u Mb / thread (pawn)\n", + (g_uHashTableSizeEntries * sizeof(HASH_ENTRY)) / MB, + PAWN_HASH_TABLE_SIZE * sizeof(PAWN_HASH_ENTRY) / MB); +#endif Trace(" QCheckPlies: %u\n", QPLIES_OF_NON_CAPTURE_CHECKS); Trace(" FutilityBase: %u\n", FUTILITY_BASE_MARGIN); p = ExportEvalDNA(); |
