File indexing completed on 2026-11-07 10:37:15
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef XSIMD_MACROS_HPP
0013 #define XSIMD_MACROS_HPP
0014
0015 #include "./xsimd_config.hpp"
0016
0017 #if defined(__VEC__)
0018 #define XSIMD_INLINE inline
0019 #elif defined __has_attribute
0020 #if __has_attribute(always_inline)
0021 #define XSIMD_INLINE inline __attribute__((always_inline))
0022 #else
0023 #define XSIMD_INLINE inline
0024 #endif
0025 #elif defined(_MSC_VER)
0026 #define XSIMD_INLINE inline __forceinline
0027 #else
0028 #define XSIMD_INLINE inline
0029 #endif
0030
0031 #define XSIMD_CONCAT_INNER(a, b) a##b
0032 #define XSIMD_CONCAT(a, b) XSIMD_CONCAT_INNER(a, b)
0033
0034 #if defined(__FAST_MATH__)
0035 #define XSIMD_NO_DENORMALS
0036 #define XSIMD_NO_INFINITIES
0037 #define XSIMD_NO_NANS
0038 #endif
0039
0040 #if defined(__has_cpp_attribute)
0041
0042 #if __has_cpp_attribute(nodiscard) >= 201603L
0043
0044 #define XSIMD_NO_DISCARD [[nodiscard]]
0045 #endif
0046 #endif
0047
0048 #if !defined(XSIMD_NO_DISCARD) && XSIMD_CPP_VERSION >= 201703L
0049
0050 #define XSIMD_NO_DISCARD [[nodiscard]]
0051 #endif
0052
0053 #if !defined(XSIMD_NO_DISCARD) && (defined(__GNUC__) || defined(__clang__))
0054
0055 #define XSIMD_NO_DISCARD __attribute__((warn_unused_result))
0056 #endif
0057
0058 #if !defined(XSIMD_NO_DISCARD)
0059
0060 #define XSIMD_NO_DISCARD
0061 #endif
0062
0063 #ifdef __cpp_if_constexpr
0064
0065 #define XSIMD_IF_CONSTEXPR if constexpr
0066 #endif
0067
0068 #if !defined(XSIMD_IF_CONSTEXPR) && XSIMD_CPP_VERSION >= 201703L
0069
0070 #define XSIMD_IF_CONSTEXPR if constexpr
0071 #endif
0072
0073 #if !defined(XSIMD_IF_CONSTEXPR)
0074
0075 #define XSIMD_IF_CONSTEXPR if
0076 #endif
0077
0078 #endif