Use a per-thread array for generated moves

This greately reduces stack usage and is a
prerequisite for next patch.

Verified with 40K games both in single and SMP
case that there are no regressions.

No functional change.
This commit is contained in:
Marco Costalba
2013-09-26 19:25:50 +02:00
parent 7b2cda95d9
commit 800410eef1
4 changed files with 14 additions and 6 deletions

View File

@@ -87,6 +87,7 @@ public:
MovePicker(const Position&, Move, Depth, const HistoryStats&, Square);
MovePicker(const Position&, Move, const HistoryStats&, PieceType);
MovePicker(const Position&, Move, Depth, const HistoryStats&, Move*, Search::Stack*);
~MovePicker();
template<bool SpNode> Move next_move();
@@ -103,8 +104,7 @@ private:
ExtMove killers[4];
Square recaptureSquare;
int captureThreshold, stage;
ExtMove *cur, *end, *endQuiets, *endBadCaptures;
ExtMove moves[MAX_MOVES];
ExtMove *moves, *cur, *end, *endQuiets, *endBadCaptures;
};
#endif // #ifndef MOVEPICK_H_INCLUDED