Fixed a bug in noise reduction when build with gcc 4.7.x

This commit is contained in:
Ingo 2014-12-30 18:19:28 +01:00
parent cb54a15b58
commit 750cd87047
2 changed files with 17 additions and 3 deletions

View File

@ -25,8 +25,18 @@ typedef __m128 vfloat;
typedef __m128i vint2;
//
#ifdef __GNUC__
#if __GNUC__ == 4 && __GNUC_MINOR__ >= 8
#define LVF(x) _mm_load_ps(&x)
#define LVFU(x) _mm_loadu_ps(&x)
#else // there is a bug in gcc 4.7.x when using openmp and aligned memory and -O3
#define LVF(x) _mm_loadu_ps(&x)
#define LVFU(x) _mm_loadu_ps(&x)
#endif
#else
#define LVF(x) _mm_load_ps(&x)
#define LVFU(x) _mm_loadu_ps(&x)
#endif
#define LC2VFU(a) _mm_shuffle_ps( LVFU(a), _mm_loadu_ps( (&a) + 4 ), _MM_SHUFFLE( 2,0,2,0 ) )
#define ZEROV _mm_setzero_ps()

View File

@ -55,9 +55,13 @@
#define RESTRICT __restrict__
#define LIKELY(x) __builtin_expect (!!(x), 1)
#define UNLIKELY(x) __builtin_expect (!!(x), 0)
#if __GNUC__ == 4 && __GNUC_MINOR__ >= 8
#define ALIGNED64 __attribute__ ((aligned (64)))
#define ALIGNED16 __attribute__ ((aligned (16)))
#else // there is a bug in gcc 4.7.x when using openmp and aligned memory and -O3
#define ALIGNED64
#define ALIGNED16
#endif
#else
#define RESTRICT
#define LIKELY(x) (x)