Replace the Tesseract specific data types in header files which are
part of Debian package libtesseract-dev by POSIX data types.
Update also matching cpp files.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* Replace log2(n) by faster local function
This also adds support for environments without a log2 function (Android).
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* Provide local log2 function on platforms without log2 function
The existing implementation in wordrec/language_model.cpp is modified
to use a local inline function in the tesseract namespace and copied
to lstm/weightmatrix.cpp, too.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Builds without support for OpenMP failed with the old code. Fix this:
* Add OPENMP_CXXFLAGS for ccmain.
* Replace unconditional -fopenmp by OPENMP_CXXFLAGS for lstm.
* Always use _OPENMP for conditional compilation.
* Remove OPENMP as there is already _OPENMP.
* Include omp.h conditionally.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Coverity report:
CID 1366452 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
18. uninit_member: Non-static class member input_width_ is not initialized
in this constructor nor in any functions that it calls.
Signed-off-by: Stefan Weil <sw@weilnetz.de>