1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-09-20 01:05:38 +01:00

Drop f16c from SSE because of a macos compile error on travis

This commit is contained in:
paboyle 2017-04-13 11:23:41 +01:00
parent 1c25773319
commit 73cdf0fffe
2 changed files with 11 additions and 7 deletions

View File

@ -176,7 +176,8 @@ case ${ax_cv_cxx_compiler_vendor} in
case ${ac_SIMD} in
SSE4)
AC_DEFINE([SSE4],[1],[SSE4 intrinsics])
SIMD_FLAGS='-msse4.2 -mf16c';;
# SIMD_FLAGS='-msse4.2 -mf16c';;
SIMD_FLAGS='-msse4.2';;
AVX)
AC_DEFINE([AVX1],[1],[AVX intrinsics])
SIMD_FLAGS='-mavx -mf16c';;

View File

@ -336,15 +336,18 @@ namespace Optimization {
#endif
struct PrecisionChange {
static inline __m128i StoH (__m128 a,__m128 b) {
__m128i ha = _mm_cvtps_ph(a,0);
__m128i hb = _mm_cvtps_ph(b,0);
__m128i h =(__m128i) _mm_shuffle_ps((__m128)ha,(__m128)hb,_MM_SELECT_FOUR_FOUR(1,0,1,0));
// __m128i ha = _mm_cvtps_ph(a,0);
// __m128i hb = _mm_cvtps_ph(b,0);
// __m128i h =(__m128i) _mm_shuffle_ps((__m128)ha,(__m128)hb,_MM_SELECT_FOUR_FOUR(1,0,1,0));
__m128i h = (__m128i)a;
assert(0);
return h;
}
static inline void HtoS (__m128i h,__m128 &sa,__m128 &sb) {
sa = _mm_cvtph_ps(h);
h = (__m128i)_mm_alignr_epi32((__m128i)h,(__m128i)h,2);
sb = _mm_cvtph_ps(h);
// sa = _mm_cvtph_ps(h);
// h = (__m128i)_mm_alignr_epi32((__m128i)h,(__m128i)h,2);
// sb = _mm_cvtph_ps(h);
assert(0);
}
static inline __m128 DtoS (__m128d a,__m128d b) {
__m128 sa = _mm_cvtpd_ps(a);