- // update_pv() is called whenever a search returns a value > alpha.
- // It updates the PV in the SearchStack object corresponding to the
- // current node.
-
- void update_pv(SearchStack* ss) {
-
- Move* src = (ss+1)->pv;
- Move* dst = ss->pv;
-
- *dst = ss->currentMove;
-
- do
- *++dst = *src;
- while (*src++ != MOVE_NONE);
- }
-
-
- // sp_update_pv() is a variant of update_pv for use at split points. The
- // difference between the two functions is that sp_update_pv also updates
- // the PV at the parent node.
-
- void sp_update_pv(SearchStack* pss, SearchStack* ss) {
-
- Move* src = (ss+1)->pv;
- Move* dst = ss->pv;
- Move* pdst = pss->pv;
-
- *dst = *pdst = ss->currentMove;
-
- do
- *++dst = *++pdst = *src;
- while (*src++ != MOVE_NONE);
- }
-