mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-20 12:14:46 +03:00
SIMD. MSVC compiler
This commit is contained in:
parent
1e70975dc1
commit
000dafeb6d
|
@ -9,6 +9,11 @@
|
||||||
|
|
||||||
#include "Python.h"
|
#include "Python.h"
|
||||||
|
|
||||||
|
/* 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__)
|
#if defined(__SSE4_2__)
|
||||||
#include <emmintrin.h>
|
#include <emmintrin.h>
|
||||||
#include <mmintrin.h>
|
#include <mmintrin.h>
|
||||||
|
|
|
@ -52,6 +52,6 @@ mm_cvtepu8_epi32(void *ptr) {
|
||||||
#if defined(__AVX2__)
|
#if defined(__AVX2__)
|
||||||
static __m256i inline
|
static __m256i inline
|
||||||
mm256_cvtepu8_epi32(void *ptr) {
|
mm256_cvtepu8_epi32(void *ptr) {
|
||||||
return _mm256_cvtepu8_epi32(_mm_cvtsi64_si128(*(int64_t *) ptr));
|
return _mm256_cvtepu8_epi32(_mm_loadl_epi64((__m128i *) ptr));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue
Block a user