1#ifndef KORE_SIMD_TYPES_HEADER
2#define KORE_SIMD_TYPES_HEADER
29#if defined(__SSE4_2__)
33#if defined(__SSE4_1__) || defined(KORE_SSE4_2)
37#if defined(__SSSE3__) || defined(KORE_SSE4_1)
41#if defined(__SSE3__) || defined(KORE_SSSE3)
49#if defined(__SSE2__) || (_M_IX86_FP == 2) || ((defined(KORE_WINDOWS) || defined(KORE_WINDOWSAPP)) && defined(KORE_64) && !defined(__aarch64__)) || \
55#if defined(__SSE__) || _M_IX86_FP == 2 || _M_IX86_FP == 1 || (defined(KORE_WINDOWS) && !defined(__aarch64__)) || \
56 (defined(KORE_WINDOWSAPP) && !defined(__aarch64__)) || (defined(KORE_MACOS) && __x86_64) || defined(KORE_SSE2)
63#if defined(KORE_IOS) || defined(KORE_SWITCH) || defined(__aarch64__) || defined(KORE_NEON)
68#if !defined(KORE_SSE4_2) && !defined(KORE_SSE4_1) && !defined(KORE_SSSE3) && !defined(KORE_SSE3) && !defined(KORE_SSE2) && !defined(KORE_SSE) && \
74#define KORE_SHUFFLE_TABLE(LANE_A1, LANE_A2, LANE_B1, LANE_B2) \
75 ((((LANE_B2) & 0x3) << 6) | (((LANE_B1) & 0x3) << 4) | (((LANE_A2) & 0x3) << 2) | (((LANE_A1) & 0x3) << 0))
82#if defined(KORE_SSE4_2)
84#elif defined(KORE_SSE4_1)
86#elif defined(KORE_SSSE3)
88#elif defined(KORE_SSE3)
95typedef __m128 kore_float32x4_mask;
98typedef __m128i kore_int8x16_mask;
100typedef __m128i kore_uint8x16_mask;
102typedef __m128i kore_int16x8_mask;
104typedef __m128i kore_uint16x8_mask;
106typedef __m128i kore_int32x4_mask;
108typedef __m128i kore_uint32x4_mask;
110#elif defined(KORE_SSE)
112#include <xmmintrin.h>
115typedef __m128 kore_float32x4_mask;
148#elif defined(KORE_NEON)
153typedef uint32x4_t kore_float32x4_mask;
156typedef uint8x16_t kore_int8x16_mask;
158typedef uint8x16_t kore_uint8x16_mask;
160typedef uint16x8_t kore_int16x8_mask;
162typedef uint16x8_t kore_uint16x8_mask;
164typedef uint32x4_t kore_int32x4_mask;
166typedef uint32x4_t kore_uint32x4_mask;
Just a few very simple additions to math.h.
Provides basic functionality that's used all over the place. There's usually no need to manually incl...