mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-01-19 15:03:45 +08:00
Merge pull request #2975 from robinwatts/pushback5
Tweak architecture specific SIMD files for ease of compilation
This commit is contained in:
commit
d3a0768c32
@ -16,8 +16,10 @@
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined(__AVX__)
|
||||
#error Implementation only for AVX capable architectures
|
||||
#endif
|
||||
#if defined(__i686__) || defined(__x86_64__)
|
||||
#error Implementation only for AVX capable architectures
|
||||
#endif
|
||||
#else
|
||||
|
||||
#include <immintrin.h>
|
||||
#include <cstdint>
|
||||
@ -57,3 +59,5 @@ double DotProductAVX(const double* u, const double* v, int n) {
|
||||
}
|
||||
|
||||
} // namespace tesseract.
|
||||
|
||||
#endif
|
||||
|
@ -16,8 +16,10 @@
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined(__FMA__)
|
||||
#error Implementation only for FMA capable architectures
|
||||
#endif
|
||||
#if defined(__i686__) || defined(__x86_64__)
|
||||
#error Implementation only for FMA capable architectures
|
||||
#endif
|
||||
#else
|
||||
|
||||
#include <immintrin.h>
|
||||
#include <cstdint>
|
||||
@ -55,3 +57,5 @@ double DotProductFMA(const double* u, const double* v, int n) {
|
||||
}
|
||||
|
||||
} // namespace tesseract.
|
||||
|
||||
#endif
|
||||
|
@ -16,8 +16,10 @@
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined(__SSE4_1__)
|
||||
#error Implementation only for SSE 4.1 capable architectures
|
||||
#endif
|
||||
#if defined(__i686__) || defined(__x86_64__)
|
||||
#error Implementation only for SSE 4.1 capable architectures
|
||||
#endif
|
||||
#else
|
||||
|
||||
#include <emmintrin.h>
|
||||
#include <smmintrin.h>
|
||||
@ -79,3 +81,5 @@ double DotProductSSE(const double* u, const double* v, int n) {
|
||||
}
|
||||
|
||||
} // namespace tesseract.
|
||||
|
||||
#endif
|
||||
|
@ -17,8 +17,10 @@
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined(__AVX2__)
|
||||
#error Implementation only for AVX2 capable architectures
|
||||
#endif
|
||||
#if defined(__i686__) || defined(__x86_64__)
|
||||
#error Implementation only for AVX2 capable architectures
|
||||
#endif
|
||||
#else
|
||||
|
||||
#include "intsimdmatrix.h"
|
||||
|
||||
@ -340,3 +342,5 @@ const IntSimdMatrix IntSimdMatrix::intSimdMatrixAVX2 = {
|
||||
};
|
||||
|
||||
} // namespace tesseract.
|
||||
|
||||
#endif
|
||||
|
@ -16,8 +16,10 @@
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined(__SSE4_1__)
|
||||
#error Implementation only for SSE 4.1 capable architectures
|
||||
#endif
|
||||
#if defined(__i686__) || defined(__x86_64__)
|
||||
#error Implementation only for SSE 4.1 capable architectures
|
||||
#endif
|
||||
#else
|
||||
|
||||
#include "intsimdmatrix.h"
|
||||
|
||||
@ -102,3 +104,5 @@ const IntSimdMatrix IntSimdMatrix::intSimdMatrixSSE = {
|
||||
};
|
||||
|
||||
} // namespace tesseract.
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user