Back to home page

EIC code displayed by LXR

 
 

    


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

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_AVX_REGISTER_HPP
0013 #define XSIMD_AVX_REGISTER_HPP
0014 
0015 #include "./xsimd_generic_arch.hpp"
0016 
0017 namespace xsimd
0018 {
0019 
0020     /**
0021      * @ingroup architectures
0022      *
0023      * AVX instructions
0024      */
0025     struct avx : generic
0026     {
0027         static constexpr bool supported() noexcept { return XSIMD_WITH_AVX; }
0028         static constexpr bool available() noexcept { return true; }
0029         static constexpr std::size_t alignment() noexcept { return 32; }
0030         static constexpr bool requires_alignment() noexcept { return true; }
0031         static constexpr char const* name() noexcept { return "avx"; }
0032     };
0033 }
0034 
0035 #if XSIMD_WITH_AVX
0036 
0037 #include <immintrin.h>
0038 
0039 namespace xsimd
0040 {
0041     namespace types
0042     {
0043 
0044         XSIMD_DECLARE_SIMD_REGISTER(signed char, avx, __m256i);
0045         XSIMD_DECLARE_SIMD_REGISTER(unsigned char, avx, __m256i);
0046         XSIMD_DECLARE_SIMD_REGISTER(char, avx, __m256i);
0047         XSIMD_DECLARE_SIMD_REGISTER(unsigned short, avx, __m256i);
0048         XSIMD_DECLARE_SIMD_REGISTER(short, avx, __m256i);
0049         XSIMD_DECLARE_SIMD_REGISTER(unsigned int, avx, __m256i);
0050         XSIMD_DECLARE_SIMD_REGISTER(int, avx, __m256i);
0051         XSIMD_DECLARE_SIMD_REGISTER(unsigned long int, avx, __m256i);
0052         XSIMD_DECLARE_SIMD_REGISTER(long int, avx, __m256i);
0053         XSIMD_DECLARE_SIMD_REGISTER(unsigned long long int, avx, __m256i);
0054         XSIMD_DECLARE_SIMD_REGISTER(long long int, avx, __m256i);
0055         XSIMD_DECLARE_SIMD_REGISTER(float, avx, __m256);
0056         XSIMD_DECLARE_SIMD_REGISTER(double, avx, __m256d);
0057     }
0058 }
0059 #endif
0060 #endif