if (npages > 0) {
pixDestroy(&pix);
//francesco
//modified to use omp:
//define lpage = local page variable to initialize the loop;
//modify branch logic to exclude break statement
#pragma omp parallel for private(pix)
for (int lpage = page; lpage < npages; ++lpage) {
// only use opencl if compiled w/ OpenCL and selected device is opencl
#ifdef USE_OPENCL
if ( od.selectedDeviceIsOpenCL() ) {
pix = od.pixReadTiffCl(filename, lpage);
} else {
#endif
pix = pixReadTiff(filename, lpage);
#ifdef USE_OPENCL
}
#endif
if (pix == NULL) //was break. Now it keeps cycling doing nothing useful
bool dummy_var = true;
else{
if ((lpage >= 0) && (npages > 1))
tprintf("Page %d of %d\n", lpage + 1, npages);
char page_str[kMaxIntSize];
snprintf(page_str, kMaxIntSize - 1, "%d", lpage);
SetVariable("applybox_page", page_str);
success &= ProcessPage(pix, lpage, filename, retry_config,
timeout_millisec, renderer);
pixDestroy(&pix);
}
//commented out
/* if (tesseract_->tessedit_page_number >= 0 || npages == 1) {
break;
}*/
#0 0x00007ffff7829779 in ELIST_ITERATOR::forward (this=0x7fffffffb4d0) at elst.cpp:237
#1 0x00007ffff7640648 in C_BLOB_IT::forward (this=0x7fffffffb4d0) at ../ccstruct/stepblob.h:28
#2 0x00007ffff776356a in assign_blobs_to_blocks2 (pix=0x83f530, blocks=0x7fffdc000960,
port_blocks=0x7fffffffb950) at tordmain.cpp:173