+ else
+ {
+ // Refresh the accumulator
+ auto& accumulator = pos.state()->accumulator;
+ accumulator.state[c] = COMPUTED;
+ Features::IndexList active;
+ Features::HalfKP<Features::Side::kFriend>::AppendActiveIndices(pos, c, &active);
+
+ #ifdef VECTOR
+ for (IndexType j = 0; j < kHalfDimensions / kTileHeight; ++j)
+ {
+ auto biasesTile = reinterpret_cast<const vec_t*>(
+ &biases_[j * kTileHeight]);
+ for (IndexType k = 0; k < kNumRegs; ++k)
+ acc[k] = biasesTile[k];
+
+ for (const auto index : active)
+ {
+ const IndexType offset = kHalfDimensions * index + j * kTileHeight;
+ auto column = reinterpret_cast<const vec_t*>(&weights_[offset]);
+
+ for (unsigned k = 0; k < kNumRegs; ++k)
+ acc[k] = vec_add_16(acc[k], column[k]);
+ }
+
+ auto accTile = reinterpret_cast<vec_t*>(
+ &accumulator.accumulation[c][0][j * kTileHeight]);
+ for (unsigned k = 0; k < kNumRegs; k++)
+ vec_store(&accTile[k], acc[k]);
+ }
+
+ #else
+ std::memcpy(accumulator.accumulation[c][0], biases_,
+ kHalfDimensions * sizeof(BiasType));
+
+ for (const auto index : active)
+ {
+ const IndexType offset = kHalfDimensions * index;
+
+ for (IndexType j = 0; j < kHalfDimensions; ++j)
+ accumulator.accumulation[c][0][j] += weights_[offset + j];
+ }