Skip to content

Commit

Permalink
indnetat9pojn
Browse files Browse the repository at this point in the history
  • Loading branch information
xu-shawn committed Dec 24, 2024
1 parent e736c63 commit 0ddc124
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/nnue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,20 +151,20 @@ void NNUE::Pov_Accumulator::refresh(Position *pos) {
}
}
while (added) {
auto square = popLsb(added);
auto index = GetIndex(piece, square, kingSq, flip);
const auto Add = &net.FTWeights[index * L1_SIZE];
for (int i = 0; i < L1_SIZE; i++) {
this->values[i] += Add[i];
}
auto square = popLsb(added);
auto index = GetIndex(piece, square, kingSq, flip);
const auto Add = &net.FTWeights[index * L1_SIZE];
for (int i = 0; i < L1_SIZE; i++) {
this->values[i] += Add[i];
}
}
while (removed) {
auto square = popLsb(removed);
auto index = GetIndex(piece, square, kingSq, flip);
const auto Sub = &net.FTWeights[index * L1_SIZE];
for (int i = 0; i < L1_SIZE; i++) {
this->values[i] -= Sub[i];
}
auto square = popLsb(removed);
auto index = GetIndex(piece, square, kingSq, flip);
const auto Sub = &net.FTWeights[index * L1_SIZE];
for (int i = 0; i < L1_SIZE; i++) {
this->values[i] -= Sub[i];
}
}
}

Expand Down

0 comments on commit 0ddc124

Please sign in to comment.