Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-08-28 09:11:40

0001 /***************************************************************************
0002  * Copyright (c) Johan Mabille, Sylvain Corlay, Wolf Vollprecht and         *
0003  * Martin Renou                                                             *
0004  * Copyright (c) QuantStack                                                 *
0005  * Copyright (c) Serge Guelton                                              *
0006  *                                                                          *
0007  * Distributed under the terms of the BSD 3-Clause License.                 *
0008  *                                                                          *
0009  * The full license is in the file LICENSE, distributed with this software. *
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      * @ingroup architectures
0027      *
0028      * SSE2 instructions
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