forked from python-pillow/Pillow
-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
29 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* Microsoft compiler doesn't limit intrinsics for an architecture. | ||
This macro is set only on x86 and means SSE2 and above including AVX2. */ | ||
#if defined(_M_X64) || _M_IX86_FP == 2 | ||
#define __SSE4_2__ | ||
#endif | ||
#if defined(__SSE4_2__) | ||
#include <emmintrin.h> | ||
#include <mmintrin.h> | ||
#include <smmintrin.h> | ||
#endif | ||
#if defined(__AVX2__) | ||
#include <immintrin.h> | ||
#endif | ||
|
||
#if defined(__SSE4_2__) | ||
static __m128i inline | ||
mm_cvtepu8_epi32(void *ptr) { | ||
return _mm_cvtepu8_epi32(_mm_cvtsi32_si128(*(INT32 *) ptr)); | ||
} | ||
#endif | ||
|
||
#if defined(__AVX2__) | ||
static __m256i inline | ||
mm256_cvtepu8_epi32(void *ptr) { | ||
return _mm256_cvtepu8_epi32(_mm_loadl_epi64((__m128i *) ptr)); | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters