Skip to content

Commit

Permalink
Testing pos.get_mlb()
Browse files Browse the repository at this point in the history
  • Loading branch information
dpldgr committed Nov 26, 2024
1 parent a5a8c7e commit 1f7ec75
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
3 changes: 2 additions & 1 deletion src/movegen.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ struct MoveList {

explicit MoveList(const Position& pos)
{
this->mlb = get_thread_mlb(pos);
//this->mlb = get_thread_mlb(pos);
this->mlb = pos.get_mlb();
this->moveList = this->mlb->acquire();
this->last = generate<T>(pos, this->moveList);
}
Expand Down
9 changes: 6 additions & 3 deletions src/movepick.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ MovePicker::MovePicker(const Position& p, Move ttm, Depth d, const ButterflyHist
ttMove(ttm), refutations{{killers[0], 0}, {killers[1], 0}, {cm, 0}}, depth(d), ply(pl) {

assert(d > 0);
this->mlb = get_thread_mlb(pos);
//this->mlb = get_thread_mlb(pos);
this->mlb = pos.get_mlb();
this->moves = this->mlb->acquire();

stage = (pos.checkers() ? EVASION_TT : MAIN_TT) +
Expand All @@ -82,7 +83,8 @@ MovePicker::MovePicker(const Position& p, Move ttm, Depth d, const ButterflyHist
: pos(p), mainHistory(mh), gateHistory(dh), captureHistory(cph), continuationHistory(ch), ttMove(ttm), recaptureSquare(rs), depth(d) {

assert(d <= 0);
this->mlb = get_thread_mlb(pos);
//this->mlb = get_thread_mlb(pos);
this->mlb = pos.get_mlb();
this->moves = this->mlb->acquire();

stage = (pos.checkers() ? EVASION_TT : QSEARCH_TT) +
Expand All @@ -97,7 +99,8 @@ MovePicker::MovePicker(const Position& p, Move ttm, Value th, const GateHistory*
: pos(p), gateHistory(dh), captureHistory(cph), ttMove(ttm), threshold(th) {

assert(!pos.checkers());
this->mlb = get_thread_mlb(pos);
//this->mlb = get_thread_mlb(pos);
this->mlb = pos.get_mlb();
this->moves = this->mlb->acquire();

stage = PROBCUT_TT + !(ttm && pos.capture(ttm)
Expand Down
5 changes: 0 additions & 5 deletions src/position.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,6 @@ Key cuckoo[8192];
Move cuckooMove[8192];
#endif

size_t get_thread_id( const Position& pos )
{
return pos.thread_id;
}

/// Position::init() initializes at startup the various arrays used to compute hash keys

void Position::init() {
Expand Down
1 change: 0 additions & 1 deletion src/position.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ namespace Stockfish {

class movelist_buf;

size_t get_thread_id( const Position& pos );
movelist_buf* get_thread_mlb( const Position& pos );

/// StateInfo struct stores information needed to restore a Position object to
Expand Down

0 comments on commit 1f7ec75

Please sign in to comment.