void search_clear(void) { if (!settings.ttSize) { delayedSettings.clear = true; return; } Time.availableNodes = 0; tt_clear(); for (int i = 0; i < numCmhTables; i++) if (cmhTables[i]) { stats_clear(cmhTables[i]); for (int j = 0; j < 16; j++) for (int k = 0; k < 64; k++) (*cmhTables[i])[0][0][j][k] = CounterMovePruneThreshold - 1; } for (int idx = 0; idx < Threads.numThreads; idx++) { Pos *pos = Threads.pos[idx]; stats_clear(pos->counterMoves); stats_clear(pos->history); stats_clear(pos->captureHistory); } mainThread.previousScore = VALUE_INFINITE; mainThread.previousTimeReduction = 1; }
int com_spec_clear(char* arg) { clear_instance_tree(); tt_clear(); return 0; }
static void tt_init(Transposition_table *table, int memsize) { int num_entries; /* Make sure the hash system is initialized. */ hash_init(); keyhash_init(); if (memsize > 0) num_entries = memsize / sizeof(table->entries[0]); else num_entries = DEFAULT_NUMBER_OF_CACHE_ENTRIES; table->num_entries = num_entries; table->entries = malloc(num_entries * sizeof(table->entries[0])); if (table->entries == NULL) { perror("Couldn't allocate memory for transposition table. \n"); exit(1); } table->is_clean = 0; tt_clear(table); }
int com_spec_load(char* arg) { // Start by clearing the current hierarcy clear_instance_tree(); tt_clear(); // Open the file FILE* spec_file = fopen(arg, "r"); if (spec_file == NULL) { printf("Could not open file: %s\n", arg); return 1; } // Parse the specification spec_import(spec_file); fclose(spec_file); return 0; }
/* Clear the cache for read results. */ void reading_cache_clear() { tt_clear(&ttable); }