Merge pull request #2975 from robinwatts/pushback5

Tweak architecture specific SIMD files for ease of compilation
This commit is contained in:
Stefan Weil 2020-05-12 14:55:32 +02:00 committed by GitHub
commit d3a0768c32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 30 additions and 10 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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