mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-20 12:14:46 +03:00
SIMD. sse only when needed
This commit is contained in:
parent
be70e9eded
commit
1b8030989f
|
@ -9,9 +9,11 @@
|
|||
|
||||
#include "Python.h"
|
||||
|
||||
#if defined(__SSE4_2__)
|
||||
#include <emmintrin.h>
|
||||
#include <mmintrin.h>
|
||||
#include <smmintrin.h>
|
||||
#endif
|
||||
#if defined(__AVX2__)
|
||||
#include <immintrin.h>
|
||||
#endif
|
||||
|
|
|
@ -42,13 +42,15 @@ static float inline _i2f(int v) { return (float)v; }
|
|||
#endif
|
||||
|
||||
|
||||
__m128i inline
|
||||
#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__)
|
||||
__m256i inline
|
||||
static __m256i inline
|
||||
mm256_cvtepu8_epi32(void *ptr) {
|
||||
return _mm256_cvtepu8_epi32(_mm_cvtsi64_si128(*(int64_t *) ptr));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user