Use modulo instead of bitwise and.
@@ -207,7 +207,7 @@ DenseTensorAttribute::onLoad()
// This ensures that get_vector() (via getTensor()) is able to find the newly added tensor.
setCommittedDocIdLimit(lid + 1);
_index->add_document(lid);
- if ((lid & ((1u << 8) - 1)) == 0) {
+ if ((lid % (1u << 8)) == 0) {
commit();
}
}
