From 29373c4226dbd72b37be63e77cadb90d1f129b55 Mon Sep 17 00:00:00 2001 From: Tony Butler Date: Fri, 15 Mar 2019 07:13:14 -0600 Subject: [PATCH] Fix compilation with Clang 3.5 for those with limited compiler choices Performance similar to gcc7+ on systems where gcc4 is the only alternative --- src/crypto/cn_gpu_avx.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/crypto/cn_gpu_avx.cpp b/src/crypto/cn_gpu_avx.cpp index 3dc7cacb..9f801c80 100644 --- a/src/crypto/cn_gpu_avx.cpp +++ b/src/crypto/cn_gpu_avx.cpp @@ -30,6 +30,12 @@ # include # define __restrict__ __restrict #endif +#ifndef _mm256_bslli_epi128 + #define _mm256_bslli_epi128(a, count) _mm256_slli_si256((a), (count)) +#endif +#ifndef _mm256_bsrli_epi128 + #define _mm256_bsrli_epi128(a, count) _mm256_srli_si256((a), (count)) +#endif inline void prep_dv_avx(__m256i* idx, __m256i& v, __m256& n01) {