Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-08-27 09:54: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_HPP
0013 #define XSIMD_HPP
0014 
0015 #if defined(__has_cpp_attribute)
0016 // if this check passes, then the compiler supports feature test macros
0017 #if __has_cpp_attribute(nodiscard) >= 201603L
0018 // if this check passes, then the compiler supports [[nodiscard]] without a message
0019 #define XSIMD_NO_DISCARD [[nodiscard]]
0020 #endif
0021 #endif
0022 
0023 #if !defined(XSIMD_NO_DISCARD) && __cplusplus >= 201703L
0024 // this means that the previous tests failed, but we are using C++17 or higher
0025 #define XSIMD_NO_DISCARD [[nodiscard]]
0026 #endif
0027 
0028 #if !defined(XSIMD_NO_DISCARD) && (defined(__GNUC__) || defined(__clang__))
0029 // this means that the previous checks failed, but we are using GCC or Clang
0030 #define XSIMD_NO_DISCARD __attribute__((warn_unused_result))
0031 #endif
0032 
0033 #if !defined(XSIMD_NO_DISCARD)
0034 // this means that all the previous checks failed, so we fallback to doing nothing
0035 #define XSIMD_NO_DISCARD
0036 #endif
0037 
0038 #ifdef __cpp_if_constexpr
0039 // this means that the compiler supports the `if constexpr` construct
0040 #define XSIMD_IF_CONSTEXPR if constexpr
0041 #endif
0042 
0043 #if !defined(XSIMD_IF_CONSTEXPR) && __cplusplus >= 201703L
0044 // this means that the previous test failed, but we are using C++17 or higher
0045 #define XSIMD_IF_CONSTEXPR if constexpr
0046 #endif
0047 
0048 #if !defined(XSIMD_IF_CONSTEXPR)
0049 // this means that all the previous checks failed, so we fallback to a normal `if`
0050 #define XSIMD_IF_CONSTEXPR if
0051 #endif
0052 
0053 #include "config/xsimd_config.hpp"
0054 #include "config/xsimd_inline.hpp"
0055 
0056 #include "arch/xsimd_scalar.hpp"
0057 #include "memory/xsimd_aligned_allocator.hpp"
0058 
0059 #if defined(XSIMD_NO_SUPPORTED_ARCHITECTURE)
0060 // to type definition or anything appart from scalar definition and aligned allocator
0061 #else
0062 #include "types/xsimd_batch.hpp"
0063 #include "types/xsimd_batch_constant.hpp"
0064 #include "types/xsimd_traits.hpp"
0065 
0066 // This include must come last
0067 #include "types/xsimd_api.hpp"
0068 #endif
0069 #endif