File indexing completed on 2025-08-28 09:11:40
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef XSIMD_SSE2_REGISTER_HPP
0013 #define XSIMD_SSE2_REGISTER_HPP
0014
0015 #include "./xsimd_generic_arch.hpp"
0016 #include "./xsimd_register.hpp"
0017
0018 #if XSIMD_WITH_SSE2
0019 #include <emmintrin.h>
0020 #include <xmmintrin.h>
0021 #endif
0022
0023 namespace xsimd
0024 {
0025
0026
0027
0028
0029
0030 struct sse2 : generic
0031 {
0032 static constexpr bool supported() noexcept { return XSIMD_WITH_SSE2; }
0033 static constexpr bool available() noexcept { return true; }
0034 static constexpr bool requires_alignment() noexcept { return true; }
0035 static constexpr std::size_t alignment() noexcept { return 16; }
0036 static constexpr char const* name() noexcept { return "sse2"; }
0037 };
0038
0039 #if XSIMD_WITH_SSE2
0040 namespace types
0041 {
0042 XSIMD_DECLARE_SIMD_REGISTER(signed char, sse2, __m128i);
0043 XSIMD_DECLARE_SIMD_REGISTER(unsigned char, sse2, __m128i);
0044 XSIMD_DECLARE_SIMD_REGISTER(char, sse2, __m128i);
0045 XSIMD_DECLARE_SIMD_REGISTER(unsigned short, sse2, __m128i);
0046 XSIMD_DECLARE_SIMD_REGISTER(short, sse2, __m128i);
0047 XSIMD_DECLARE_SIMD_REGISTER(unsigned int, sse2, __m128i);
0048 XSIMD_DECLARE_SIMD_REGISTER(int, sse2, __m128i);
0049 XSIMD_DECLARE_SIMD_REGISTER(unsigned long int, sse2, __m128i);
0050 XSIMD_DECLARE_SIMD_REGISTER(long int, sse2, __m128i);
0051 XSIMD_DECLARE_SIMD_REGISTER(unsigned long long int, sse2, __m128i);
0052 XSIMD_DECLARE_SIMD_REGISTER(long long int, sse2, __m128i);
0053 XSIMD_DECLARE_SIMD_REGISTER(float, sse2, __m128);
0054 XSIMD_DECLARE_SIMD_REGISTER(double, sse2, __m128d);
0055 }
0056 #endif
0057 }
0058
0059 #endif