aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-03-02 19:10:51 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-03-02 19:10:51 +0000
commit845460a852f48af2bd506af647c5d3b9ac62622a (patch)
treeb612f409300a051cc5d28b0209a50c443e3525a9
parentaceb49d5f1b018ed7dd6baa75eb9616caeca941d (diff)
downloadrspamd-845460a852f48af2bd506af647c5d3b9ac62622a.tar.gz
rspamd-845460a852f48af2bd506af647c5d3b9ac62622a.zip
[Fix] Fix brain-damaged torch build system
-rw-r--r--contrib/torch/torch7/lib/TH/generic/simd/convolve.c4
-rw-r--r--contrib/torch/torch7/lib/TH/vector/AVX.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/contrib/torch/torch7/lib/TH/generic/simd/convolve.c b/contrib/torch/torch7/lib/TH/generic/simd/convolve.c
index bf07bbed6..da7a4bb20 100644
--- a/contrib/torch/torch7/lib/TH/generic/simd/convolve.c
+++ b/contrib/torch/torch7/lib/TH/generic/simd/convolve.c
@@ -1,4 +1,4 @@
-#if defined(__AVX__)
+#if defined(USE_AVX) && defined(__AVX__)
#ifdef _MSC_VER
#include <intrin.h>
@@ -113,7 +113,7 @@ void convolve_5x5_sse(float* output, float* input, float* kernel, long outRows,
void convolve_5x5_avx(float* output, float* input, float* kernel, long outRows, long outCols, long outStride, long inCols);
void convolve_5x5(float* output, float* input, float* kernel, long outRows, long outCols, long inCols) {
-#if defined(__AVX__)
+#if defined(USE_AVX) && defined(__AVX__)
int avx = haveCPUFeature(kCPUFeature_AVX);
if (avx)
{
diff --git a/contrib/torch/torch7/lib/TH/vector/AVX.c b/contrib/torch/torch7/lib/TH/vector/AVX.c
index b7d5dd1d6..58c4e6d35 100644
--- a/contrib/torch/torch7/lib/TH/vector/AVX.c
+++ b/contrib/torch/torch7/lib/TH/vector/AVX.c
@@ -1,4 +1,4 @@
-#if defined(__AVX__)
+#if defined(USE_AVX) && defined(__AVX__)
#ifndef _MSC_VER
#include <x86intrin.h>
#else