diff options
author | Josh Blum <josh@joshknows.com> | 2011-05-06 14:27:48 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-05-06 14:27:48 -0700 |
commit | c40ef84defaeed0c9ec70e45a7e4019fa6d6e1b2 (patch) | |
tree | c90f168fda80a883ee0120fec938eb75a13c2663 /volk/include | |
parent | 5b4c7d27e9d49ab58df1f1d9350dcaf64c60a1ce (diff) |
volk: various backports from MSVC building
1) Added support for __cpuid intrinsic under MSVC
2) Fixed disambiguation for std::abs overload in qa code
3) Fixed bit128 union, the ifdefs were completely wrong
Diffstat (limited to 'volk/include')
-rw-r--r-- | volk/include/volk/volk_common.h | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/volk/include/volk/volk_common.h b/volk/include/volk/volk_common.h index 1e868561e2..12623073c3 100644 --- a/volk/include/volk/volk_common.h +++ b/volk/include/volk/volk_common.h @@ -57,18 +57,30 @@ //////////////////////////////////////////////////////////////////////// // The bit128 union used by some //////////////////////////////////////////////////////////////////////// -#include<inttypes.h> -#ifdef LV_HAVE_MMX -#include<xmmintrin.h> +#include <inttypes.h> + +#ifdef LV_HAVE_SSE +#include <xmmintrin.h> +#endif + +#ifdef LV_HAVE_SSE2 +#include <emmintrin.h> +#endif + union bit128{ uint16_t i16[8]; uint32_t i[4]; float f[4]; double d[2]; - __m128i int_vec; + + #ifdef LV_HAVE_SSE __m128 float_vec; + #endif + + #ifdef LV_HAVE_SSE2 + __m128i int_vec; __m128d double_vec; + #endif }; -#endif /*LV_HAVE_MMX*/ #endif /*INCLUDED_LIBVOLK_COMMON_H*/ |