typedef std::vector<std::pair<std::size_t, std::size_t>> so it looks less stupid.
Rewrite the entire inference to just iterate over the change lists, IE:
using CiekceISveryCool = std::vector<std::pair<std::size_t, std::size_t>>;
void NNUE::update(NNUE::accumulator& board_accumulator, PleaseCiekce& NNUEAdd, PleaseCiekce& NNUESub) {
for (const auto [whiteAddIdx, blackAddIdx] : NNUEAdd) {
add(board_accumulator, whiteAddIdx, blackAddIdx);
}
for (const auto [whiteSubIdx, blackSubIdx] : NNUESub) {
sub(board_accumulator, whiteSubIdx, blackSubIdx);
}
// Reset the add and sub vectors
NNUEAdd.clear();
NNUESub.clear();
}
what is actually left to do: what a proper sub and add function.
typedef
std::vector<std::pair<std::size_t, std::size_t>>
so it looks less stupid. Rewrite the entire inference to just iterate over the change lists, IE:what is actually left to do: what a proper sub and add function.