+ // In SpNodes use split point's shared MovePicker object as move source
+ template<> struct MovePickerExt<true, false> : public MovePicker {
+
+ MovePickerExt(const Position& p, Move ttm, Depth d, const History& h, SearchStack* ss, Value b)
+ : MovePicker(p, ttm, d, h, ss, b), mp(ss->sp->mp) {}
+
+ Move get_next_move() { return mp->get_next_move(); }
+
+ RootMoveList::iterator rm; // Dummy, needed to compile
+ MovePicker* mp;
+ };
+
+ // Default case, create and use a MovePicker object as source
+ template<> struct MovePickerExt<false, false> : public MovePicker {
+
+ MovePickerExt(const Position& p, Move ttm, Depth d, const History& h, SearchStack* ss, Value b)
+ : MovePicker(p, ttm, d, h, ss, b) {}
+
+ RootMoveList::iterator rm; // Dummy, needed to compile
+ };
+
+} // namespace
+
+
+/// init_threads() is called during startup. It initializes various lookup tables
+/// and creates and launches search threads.
+
+void init_threads() {