Commit Graph

10 Commits

Author SHA1 Message Date
Stefan Weil
73db84d674 Fix typo in comment
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-04-28 06:59:00 +02:00
Stefan Weil
e663d00fbe Support AVX for 32 bit platforms
_mm256_extract_epi64 is not available for 32 bit platforms,
but it can be replaced by "a very simple workaround".

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-02-27 11:15:28 +01:00
Egor Pugin
e376ffc5fe Fix avx on windows. 2017-02-23 19:29:48 +03:00
James R. Barlow
fa677f1ba1 Implement SIMD detection on macOS-gcc; complain if no SIMD detection
Change SIMD detection to instead check for compilers with __get_cpuid.
Verified that this compiles and runs on macOS El Capitan with homebrew gcc.

Also added an #error if SIMD checking is missing. Compilers that have no
SIMD should make that explicit.

[sw: Merged original commits and slightly polished the commit message]
[sw: Removed test for __MINGW32__ which is no longer needed]

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-01-23 13:41:03 +01:00
Egor Pugin
3817aa3079 Fix windows dll build. 2016-12-28 23:32:52 +03:00
Stefan Weil
534a237015 Move AVX / SSE messages to function PrintVersionInfo (crash fix)
This information is not needed for normal runs, so it is sufficient
to show it on request (like versions and OpenCL information).

This also fixes a crash caused by undefined order of global constructors:

When the global variable SIMDDetect::detector is initialized before the
global variable debug_file, the first tprintf call in simddetect.cpp
crashes because of a NULL pointer in debug_file. This was only seen when
running with a shared library (libtesseract.so).

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-28 13:35:44 +01:00
Stefan Weil
19616b07ba lstm: Move class SIMDDetect to new source file and improve code
Modify also the code to use a singleton. This simplifies the code as
no locking is needed. It also slightly improves the performance because
no check whether the architecture was tested is needed.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-27 13:25:08 +01:00
Zdenko Podobný
02a6970cf3 autotools: test if compiler support -mavx and -msse4.1 2016-12-23 10:20:08 +01:00
Stefan Weil
b54894a088 Fix 32 bit builds (missing _mm256_extract_epi64)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-11-24 07:32:49 +01:00
Ray Smith
c1c1e426b3 Added new LSTM-based neural network line recognizer 2016-11-07 15:38:07 -08:00