diff --git a/src/arch/dotproductavx.cpp b/src/arch/dotproductavx.cpp index 59191909ca..f6b132f251 100644 --- a/src/arch/dotproductavx.cpp +++ b/src/arch/dotproductavx.cpp @@ -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 #include @@ -57,3 +59,5 @@ double DotProductAVX(const double* u, const double* v, int n) { } } // namespace tesseract. + +#endif diff --git a/src/arch/dotproductfma.cpp b/src/arch/dotproductfma.cpp index 69865f59c2..6e16f192cc 100644 --- a/src/arch/dotproductfma.cpp +++ b/src/arch/dotproductfma.cpp @@ -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 #include @@ -55,3 +57,5 @@ double DotProductFMA(const double* u, const double* v, int n) { } } // namespace tesseract. + +#endif diff --git a/src/arch/dotproductsse.cpp b/src/arch/dotproductsse.cpp index 63a2e54619..050bf0d326 100644 --- a/src/arch/dotproductsse.cpp +++ b/src/arch/dotproductsse.cpp @@ -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 #include @@ -79,3 +81,5 @@ double DotProductSSE(const double* u, const double* v, int n) { } } // namespace tesseract. + +#endif diff --git a/src/arch/intsimdmatrixavx2.cpp b/src/arch/intsimdmatrixavx2.cpp index 6c6902ae2e..85a0049a7e 100644 --- a/src/arch/intsimdmatrixavx2.cpp +++ b/src/arch/intsimdmatrixavx2.cpp @@ -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 diff --git a/src/arch/intsimdmatrixsse.cpp b/src/arch/intsimdmatrixsse.cpp index cb1d5c8bea..9da4f3fb41 100644 --- a/src/arch/intsimdmatrixsse.cpp +++ b/src/arch/intsimdmatrixsse.cpp @@ -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