Back to home page

EIC code displayed by LXR

 
 

    


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

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_CPU_FEATURES_HPP
0013 #define XSIMD_CPU_FEATURES_HPP
0014 
0015 #include "./xsimd_cpu_features_arm.hpp"
0016 #include "./xsimd_cpu_features_ppc.hpp"
0017 #include "./xsimd_cpu_features_riscv.hpp"
0018 #include "./xsimd_cpu_features_s390x.hpp"
0019 #include "./xsimd_cpu_features_x86.hpp"
0020 
0021 namespace xsimd
0022 {
0023 
0024     /**
0025      * Cross-platform CPU feature detection class.
0026      *
0027      * All member functions are safe to work on with all platforms.
0028      *
0029      * @warning This class is *not* thread safe.
0030      * Its internal lazy querying structure makes even `const` member function prone to data race.
0031      * The structure is also generally not appropriate for directly branching (e.g. on
0032      * ``cpu_features::avx2``) because it include a branch that the compiler cannot optimize.
0033      * The current appropriate way to use this class for dynamic dispatching is to store the
0034      * result of the function calls (e.g. @ref cpu_features) into (static) constants.
0035      * This is done in @ref xsimd::available_architectures.
0036      *
0037      * @see xsimd::dispatch
0038      * @see xsimd::available_architectures
0039      */
0040     class cpu_features : public s390x_cpu_features,
0041                          public ppc_cpu_features,
0042                          public riscv_cpu_features,
0043                          public arm_cpu_features,
0044                          public x86_cpu_features
0045     {
0046     };
0047 
0048 }
0049 
0050 #endif