std::memset(scores, 0, sizeof(scores));
// Reset any global variable used in eval
- pos.this_thread()->depth = 0;
pos.this_thread()->trend = SCORE_ZERO;
pos.this_thread()->bestValue = VALUE_ZERO;
pos.this_thread()->optimism[WHITE] = VALUE_ZERO;
public:
std::size_t size() const { return size_; }
- void resize(std::size_t newSize) { size_ = newSize; }
void push_back(const T& value) { values_[size_++] = value; }
- T& operator[](std::size_t index) { return values_[index]; }
- T* begin() { return values_; }
- T* end() { return values_ + size_; }
- const T& operator[](std::size_t index) const { return values_[index]; }
const T* begin() const { return values_; }
const T* end() const { return values_ + size_; }
- void swap(ValueList& other) {
- const std::size_t maxSize = std::max(size_, other.size_);
- for (std::size_t i = 0; i < maxSize; ++i) {
- std::swap(values_[i], other.values_[i]);
- }
- std::swap(size_, other.size_);
- }
-
private:
T values_[MaxSize];
std::size_t size_ = 0;
// Don't allow pinned pieces to attack as long as there are
// pinners on their original square.
if (pinners(~stm) & occupied)
+ {
stmAttackers &= ~blockers_for_king(stm);
- if (!stmAttackers)
- break;
+ if (!stmAttackers)
+ break;
+ }
res ^= 1;
// Step 1. Initialize node
Thread* thisThread = pos.this_thread();
- thisThread->depth = depth;
ss->inCheck = pos.checkers();
priorCapture = pos.captured_piece();
Color us = pos.side_to_move();
Position rootPos;
StateInfo rootState;
Search::RootMoves rootMoves;
- Depth rootDepth, completedDepth, depth, previousDepth;
+ Depth rootDepth, completedDepth, previousDepth;
Value rootDelta;
CounterMoveHistory counterMoves;
ButterflyHistory mainHistory;