Apply the settings which are selected by environment variable DOTPRODUCT
after the autodetection which detects the available SIMD hardware.
'accelerate', 'fma' and 'std::inner_product' now no longer change
the setting for intSimdMatrix to 'generic' because they don't provide
their own implementation for it.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Up to now Tesseract used double for training and recognition
with "best" models.
This commit replaces double by a new data type TFloat which
is double by default, but float if FAST_FLOAT is defined.
Ideally this should allow faster training.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
The new header file ccutils/tesstypes.h also prepares support
for larger images by introducing a new data type for image
size and coordinates (still unused).
FloatToDouble is now a local function.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This reverts commit 122daf1d64, reversing
changes made to 4cd56dc5f5.
Those changes caused two regressions which resulted in an assertion
or a segmentation fault.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
These fixes got through while I manually extracted the template work
from my mainline (warnings due to running MSVC at Level 4)
[sw]: Format commit message and use different fix for blamer.cpp
Signed-off-by: Stefan Weil <sw@weilnetz.de>
When neon_available_ is ON, the DotProduct was set to point to DotProduct,
which should have been DotProductNative, as dotProduct is the *target* global itself:
see simddetect.h --> effectively making that part of the SetDotProduct() call
identical to this (no-op) statement: `DotProduct = DotProduct;`
Also added the Neon check in the Update() API, where it exists together
with the other checks (for AVX/SSE/etc.)
[sw: formatted commit message and merged into main branch]
Signed-off-by: Stefan Weil <sw@weilnetz.de>
When the --reset_learning_rate option is specified,
it resets the learning rate stored in each layer of the network
loaded with --continue_from to the value specified by the --learning_rate option.
If checkpoint is available, it does nothing.
* Null check for GetSourceYResolution
Added missing NULL check to avoid crash when we read property in our tesseract wrapper.
* Added missing return value.
added -1 to return if undefined.
The fact that this method uses tiles is implementation detail. It does not change the result compared to Sauvola without tiles. The use of tiles minimize memory consumption.