From 7c2af9ad1950e4da99165d0c50c5461c6aee582a Mon Sep 17 00:00:00 2001
From: Michael Kuron <mkuron@icp.uni-stuttgart.de>
Date: Mon, 16 Sep 2019 10:12:50 +0200
Subject: [PATCH] Philox: correct AVX512 guards

---
 pystencils/include/philox_rand.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pystencils/include/philox_rand.h b/pystencils/include/philox_rand.h
index d2567f543..423dbfab2 100644
--- a/pystencils/include/philox_rand.h
+++ b/pystencils/include/philox_rand.h
@@ -146,7 +146,7 @@ QUALIFIERS void _philox4x32bumpkey(__m128i* key)
 
 QUALIFIERS __m128 _my_cvtepu32_ps(const __m128i v)
 {
-#if defined(__AVX512VL__) || defined(__AVX512F__)
+#ifdef __AVX512VL__
     return _mm_cvtepu32_ps(v);
 #else
     __m128i v2 = _mm_srli_epi32(v, 1);
@@ -157,7 +157,7 @@ QUALIFIERS __m128 _my_cvtepu32_ps(const __m128i v)
 #endif
 }
 
-#if !defined(__AVX512VL__)&& !defined(__AVX512F__) && defined(__GNUC__) && __GNUC__ >= 5
+#if !defined(__AVX512VL__) && defined(__GNUC__) && __GNUC__ >= 5
 __attribute__((optimize("no-associative-math")))
 #endif
 QUALIFIERS __m128d _my_cvtepu64_pd(const __m128i x)
@@ -303,7 +303,7 @@ QUALIFIERS void _philox4x32bumpkey(__m256i* key)
 
 QUALIFIERS __m256 _my256_cvtepu32_ps(const __m256i v)
 {
-#if defined(__AVX512VL__) || defined(__AVX512F__)
+#ifdef __AVX512VL__
     return _mm256_cvtepu32_ps(v);
 #else
     __m256i v2 = _mm256_srli_epi32(v, 1);
@@ -314,7 +314,7 @@ QUALIFIERS __m256 _my256_cvtepu32_ps(const __m256i v)
 #endif
 }
 
-#if !defined(__AVX512VL__) && !defined(__AVX512F__) && defined(__GNUC__) && __GNUC__ >= 5
+#if !defined(__AVX512VL__) && defined(__GNUC__) && __GNUC__ >= 5
 __attribute__((optimize("no-associative-math")))
 #endif
 QUALIFIERS __m256d _my256_cvtepu64_pd(const __m256i x)
-- 
GitLab