mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-30 23:49:05 +08:00
commit
da50e561af
@ -81,9 +81,7 @@ tesseract_LDADD = libtesseract.la
|
|||||||
|
|
||||||
tesseract_LDFLAGS = $(OPENCL_LDFLAGS)
|
tesseract_LDFLAGS = $(OPENCL_LDFLAGS)
|
||||||
|
|
||||||
if OPENMP
|
tesseract_LDADD += $(OPENMP_CXXFLAGS)
|
||||||
tesseract_LDADD += $(OPENMP_CFLAGS)
|
|
||||||
endif
|
|
||||||
|
|
||||||
if T_WIN
|
if T_WIN
|
||||||
tesseract_LDADD += -lws2_32
|
tesseract_LDADD += -lws2_32
|
||||||
@ -92,4 +90,3 @@ endif
|
|||||||
if ADD_RT
|
if ADD_RT
|
||||||
tesseract_LDADD += -lrt
|
tesseract_LDADD += -lrt
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@ AM_CPPFLAGS += \
|
|||||||
-I$(top_srcdir)/textord -I$(top_srcdir)/opencl
|
-I$(top_srcdir)/textord -I$(top_srcdir)/opencl
|
||||||
|
|
||||||
AM_CPPFLAGS += $(OPENCL_CPPFLAGS)
|
AM_CPPFLAGS += $(OPENCL_CPPFLAGS)
|
||||||
|
AM_CPPFLAGS += $(OPENMP_CXXFLAGS)
|
||||||
|
|
||||||
if VISIBILITY
|
if VISIBILITY
|
||||||
AM_CPPFLAGS += -DTESS_EXPORTS \
|
AM_CPPFLAGS += -DTESS_EXPORTS \
|
||||||
|
@ -18,9 +18,9 @@
|
|||||||
///////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "tesseractclass.h"
|
#include "tesseractclass.h"
|
||||||
#ifdef OPENMP
|
#ifdef _OPENMP
|
||||||
#include <omp.h>
|
#include <omp.h>
|
||||||
#endif // OPENMP
|
#endif // _OPENMP
|
||||||
|
|
||||||
namespace tesseract {
|
namespace tesseract {
|
||||||
|
|
||||||
@ -53,7 +53,9 @@ void Tesseract::PrerecAllWordsPar(const GenericVector<WordData>& words) {
|
|||||||
}
|
}
|
||||||
// Pre-classify all the blobs.
|
// Pre-classify all the blobs.
|
||||||
if (tessedit_parallelize > 1) {
|
if (tessedit_parallelize > 1) {
|
||||||
|
#ifdef _OPENMP
|
||||||
#pragma omp parallel for num_threads(10)
|
#pragma omp parallel for num_threads(10)
|
||||||
|
#endif // _OPENMP
|
||||||
for (int b = 0; b < blobs.size(); ++b) {
|
for (int b = 0; b < blobs.size(); ++b) {
|
||||||
*blobs[b].choices =
|
*blobs[b].choices =
|
||||||
blobs[b].tesseract->classify_blob(blobs[b].blob, "par", White, NULL);
|
blobs[b].tesseract->classify_blob(blobs[b].blob, "par", White, NULL);
|
||||||
|
@ -171,14 +171,7 @@ if test "$enable_embedded" = "yes"; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# check whether to build OpenMP support
|
# check whether to build OpenMP support
|
||||||
AM_CONDITIONAL([OPENMP], false)
|
|
||||||
AC_OPENMP
|
AC_OPENMP
|
||||||
AS_IF([test "x$OPENMP_CFLAGS" != "x"],
|
|
||||||
[AM_CONDITIONAL([OPENMP], true)
|
|
||||||
AM_CPPFLAGS="$OPENMP_CXXFLAGS $AM_CPPFLAGS"
|
|
||||||
AC_DEFINE([OPENMP], [], [Defined when compiled with OpenMP support])]
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
# check whether to build opencl version
|
# check whether to build opencl version
|
||||||
AC_MSG_CHECKING([--enable-opencl argument])
|
AC_MSG_CHECKING([--enable-opencl argument])
|
||||||
|
Loading…
Reference in New Issue
Block a user