No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
int nps(const Position& pos);
void poll(const Position& pos);
void wait_for_stop_or_ponderhit();
int nps(const Position& pos);
void poll(const Position& pos);
void wait_for_stop_or_ponderhit();
- void init_ss_array(SearchStack* ss, int size);
#if !defined(_MSC_VER)
void* init_thread(void* threadID);
#if !defined(_MSC_VER)
void* init_thread(void* threadID);
// Initialize FIXME move before Rml.init()
TT.new_search();
H.clear();
// Initialize FIXME move before Rml.init()
TT.new_search();
H.clear();
- init_ss_array(ss, PLY_MAX_PLUS_2);
+ memset(ss, 0, PLY_MAX_PLUS_2 * sizeof(SearchStack));
alpha = -VALUE_INFINITE, beta = VALUE_INFINITE;
EasyMove = MOVE_NONE;
aspirationDelta = 0;
alpha = -VALUE_INFINITE, beta = VALUE_INFINITE;
EasyMove = MOVE_NONE;
aspirationDelta = 0;
- // init_ss_array() does a fast reset of the first entries of a SearchStack
- // array and of all the excludedMove and skipNullMove entries.
-
- void init_ss_array(SearchStack* ss, int size) {
-
- for (int i = 0; i < size; i++, ss++)
- {
- ss->excludedMove = MOVE_NONE;
- ss->skipNullMove = false;
- ss->reduction = DEPTH_ZERO;
- ss->sp = NULL;
-
- if (i < 3)
- ss->killers[0] = ss->killers[1] = ss->mateKiller = MOVE_NONE;
- }
- }
-
-
// value_to_uci() converts a value to a string suitable for use with the UCI
// protocol specifications:
//
// value_to_uci() converts a value to a string suitable for use with the UCI
// protocol specifications:
//
Move* sm;
// Initialize search stack
Move* sm;
// Initialize search stack
- init_ss_array(ss, PLY_MAX_PLUS_2);
+ memset(ss, 0, PLY_MAX_PLUS_2 * sizeof(SearchStack));
ss[0].eval = ss[0].evalMargin = VALUE_NONE;
bestMoveChanges = 0;
clear();
ss[0].eval = ss[0].evalMargin = VALUE_NONE;
bestMoveChanges = 0;
clear();