fix: index variable in OpenMP 'for' statement must have signed integral type

This commit is contained in:
zdenop 2022-12-04 18:56:30 +01:00
parent 51cf430899
commit bc7a7eea2f
2 changed files with 2 additions and 2 deletions

View File

@ -55,7 +55,7 @@ void Tesseract::PrerecAllWordsPar(const std::vector<WordData> &words) {
# pragma omp parallel for num_threads(10)
#endif // _OPENMP
// NOLINTNEXTLINE(modernize-loop-convert)
for (size_t b = 0; b < blobs.size(); ++b) {
for (auto b = 0; b < blobs.size(); ++b) {
*blobs[b].choices =
blobs[b].tesseract->classify_blob(blobs[b].blob, "par", ScrollView::WHITE, nullptr);
}

View File

@ -137,7 +137,7 @@ bool Parallel::Backward(bool debug, const NetworkIO &fwd_deltas, NetworkScratch
#ifdef _OPENMP
# pragma omp parallel for num_threads(stack_size)
#endif
for (unsigned i = 0; i < stack_size; ++i) {
for (auto i = 0; i < stack_size; ++i) {
stack_[i]->Backward(debug, *in_deltas[i], scratch, i == 0 ? back_deltas : out_deltas[i]);
}
if (needs_to_backprop_) {