Do not redefine _mm_cvtsi128_si16 when building with VS 2022

Fixes the following warnings/errors when building:
```
1>bitutil.h(193,31): warning C4391: 'uint16_t _mm_cvtsi128_si16(__m128i)': incorrect return type for intrinsic function, expected 'short' (compiling source file ..\..\bitpack.c)
1>bitutil.h(193,60): error C2169: '_mm_cvtsi128_si16': intrinsic function, cannot be defined (compiling source file ..\..\bitpack.c)
```
This commit is contained in:
Pavel P
2022-03-09 17:26:43 +03:00
parent 44393c1023
commit 1e2f5932e6
3 changed files with 8 additions and 8 deletions

View File

@ -187,9 +187,9 @@ static ALWAYS_INLINE uint64_t mm_hor_epi64( __m128i v) { v = _mm_or_si128( v, _m
#define ADDI16x8(_v_, _sv_, _vi_) _sv_ = _mm_add_epi16(_mm_add_epi16(_sv_, _vi_),_v_)
#define ADDI32x4(_v_, _sv_, _vi_) _sv_ = _mm_add_epi32(_mm_add_epi32(_sv_, _vi_),_v_)
//---------------- Convert _mm_cvtsi128_siXX -------------------------------------------
static ALWAYS_INLINE uint8_t _mm_cvtsi128_si8 (__m128i v) { return (uint8_t )_mm_cvtsi128_si32(v); }
static ALWAYS_INLINE uint16_t _mm_cvtsi128_si16(__m128i v) { return (uint16_t)_mm_cvtsi128_si32(v); }
//---------------- Convert mm_cvtsi128_siXX -------------------------------------------
static ALWAYS_INLINE uint8_t mm_cvtsi128_si8 (__m128i v) { return (uint8_t )_mm_cvtsi128_si32(v); }
static ALWAYS_INLINE uint16_t mm_cvtsi128_si16(__m128i v) { return (uint16_t)_mm_cvtsi128_si32(v); }
#endif
//--------- memset -----------------------------------------