Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-11-07 10:37:16

0001 /***************************************************************************
0002  * Copyright (c) Johan Mabille, Sylvain Corlay, Wolf Vollprecht and         *
0003  * Martin Renou                                                             *
0004  * Copyright (c) QuantStack                                                 *
0005  * Copyright (c) Serge Guelton                                              *
0006  * Copyright (c) Marco Barbone                                              *
0007  *                                                                          *
0008  * Distributed under the terms of the BSD 3-Clause License.                 *
0009  *                                                                          *
0010  * The full license is in the file LICENSE, distributed with this software. *
0011  ****************************************************************************/
0012 
0013 #ifndef XSIMD_AVX512VL_REGISTER_HPP
0014 #define XSIMD_AVX512VL_REGISTER_HPP
0015 
0016 #include "./xsimd_avx512cd_register.hpp"
0017 #include "./xsimd_fma3_avx2_128_register.hpp"
0018 
0019 namespace xsimd
0020 {
0021 
0022     /**
0023      * @ingroup architectures
0024      *
0025      * AVX512VL instructions
0026      */
0027     struct avx512vl : avx512cd
0028     {
0029         static constexpr bool supported() noexcept { return XSIMD_WITH_AVX512VL; }
0030         static constexpr bool available() noexcept { return true; }
0031         static constexpr char const* name() noexcept { return "avx512vl"; }
0032     };
0033 
0034     /**
0035      * @ingroup architectures
0036      *
0037      * AVX512VL instructions extension for 128 bits registers
0038      */
0039     struct avx512vl_128 : fma3<avx2_128>
0040     {
0041         static constexpr bool supported() noexcept { return XSIMD_WITH_AVX512VL; }
0042         static constexpr bool available() noexcept { return true; }
0043         static constexpr char const* name() noexcept { return "avx512vl/128"; }
0044     };
0045 
0046     /**
0047      * @ingroup architectures
0048      *
0049      * AVX512VL instructions extension for 256 bits registers
0050      */
0051     struct avx512vl_256 : fma3<avx2>
0052     {
0053         static constexpr bool supported() noexcept { return XSIMD_WITH_AVX512VL; }
0054         static constexpr bool available() noexcept { return true; }
0055         static constexpr char const* name() noexcept { return "avx512vl/256"; }
0056     };
0057 
0058 #if XSIMD_WITH_AVX512VL
0059 
0060 #if !XSIMD_WITH_AVX512CD
0061 #error "architecture inconsistency: avx512vl requires avx512cd"
0062 #endif
0063 
0064     namespace types
0065     {
0066         template <class T>
0067         struct get_bool_simd_register<T, avx512vl>
0068         {
0069             using type = simd_avx512_bool_register<T>;
0070         };
0071 
0072         XSIMD_DECLARE_SIMD_REGISTER_ALIAS(avx512vl, avx512cd);
0073 
0074         template <class T>
0075         struct get_bool_simd_register<T, avx512vl_128>
0076         {
0077             using type = simd_avx512_bool_register<T>;
0078         };
0079         XSIMD_DECLARE_SIMD_REGISTER_ALIAS(avx512vl_128, avx2_128);
0080 
0081         template <class T>
0082         struct get_bool_simd_register<T, avx512vl_256>
0083         {
0084             using type = simd_avx512_bool_register<T>;
0085         };
0086         XSIMD_DECLARE_SIMD_REGISTER_ALIAS(avx512vl_256, avx2);
0087     }
0088 #endif
0089 }
0090 #endif