diff --git a/lib/simd/Grid_avx.h b/lib/simd/Grid_avx.h index 73792f84..5c16dd71 100644 --- a/lib/simd/Grid_avx.h +++ b/lib/simd/Grid_avx.h @@ -470,13 +470,14 @@ namespace Optimization { return in; }; }; - +#define USE_FP16 struct PrecisionChange { static inline __m256i StoH (__m256 a,__m256 b) { + __m256 h; #ifdef USE_FP16 __m128i ha = _mm256_cvtps_ph(a,0); __m128i hb = _mm256_cvtps_ph(b,0); - __m256 h = _mm256_castps128_ps256(ha); + h = _mm256_castps128_ps256(ha); h = _mm256_insertf128_ps(h,hb,1); #else assert(0); diff --git a/lib/simd/Grid_avx512.h b/lib/simd/Grid_avx512.h index 9156f113..ba054665 100644 --- a/lib/simd/Grid_avx512.h +++ b/lib/simd/Grid_avx512.h @@ -340,7 +340,7 @@ namespace Optimization { }; }; - +#define USE_FP16 struct PrecisionChange { static inline __m512i StoH (__m512 a,__m512 b) { __m512i h;