ycpp 0.1.0__cp315-cp315t-win_arm64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. ycpp/__init__.py +110 -0
  2. ycpp/_array.py +318 -0
  3. ycpp/_awareness.py +268 -0
  4. ycpp/_doc.py +718 -0
  5. ycpp/_event.py +188 -0
  6. ycpp/_id_map.py +620 -0
  7. ycpp/_map.py +267 -0
  8. ycpp/_provider.py +180 -0
  9. ycpp/_snapshot.py +28 -0
  10. ycpp/_sticky_index.py +59 -0
  11. ycpp/_stream.py +91 -0
  12. ycpp/_sync.py +192 -0
  13. ycpp/_text.py +239 -0
  14. ycpp/_transaction.py +287 -0
  15. ycpp/_typed.py +122 -0
  16. ycpp/_undo.py +201 -0
  17. ycpp/_update.py +18 -0
  18. ycpp/_xml.py +452 -0
  19. ycpp/_ycpp.cp315t-win_arm64.lib +0 -0
  20. ycpp/_ycpp.cp315t-win_arm64.pyd +0 -0
  21. ycpp-0.1.0.data/headers/fast_float/ascii_number.h +766 -0
  22. ycpp-0.1.0.data/headers/fast_float/bigint.h +638 -0
  23. ycpp-0.1.0.data/headers/fast_float/constexpr_feature_detect.h +53 -0
  24. ycpp-0.1.0.data/headers/fast_float/decimal_to_binary.h +212 -0
  25. ycpp-0.1.0.data/headers/fast_float/digit_comparison.h +455 -0
  26. ycpp-0.1.0.data/headers/fast_float/fast_float.h +91 -0
  27. ycpp-0.1.0.data/headers/fast_float/fast_table.h +708 -0
  28. ycpp-0.1.0.data/headers/fast_float/float_common.h +1432 -0
  29. ycpp-0.1.0.data/headers/fast_float/parse_number.h +488 -0
  30. ycpp-0.1.0.data/headers/xsimd/arch/common/xsimd_common_arithmetic.hpp +267 -0
  31. ycpp-0.1.0.data/headers/xsimd/arch/common/xsimd_common_bit.hpp +230 -0
  32. ycpp-0.1.0.data/headers/xsimd/arch/common/xsimd_common_cast.hpp +43 -0
  33. ycpp-0.1.0.data/headers/xsimd/arch/common/xsimd_common_complex.hpp +112 -0
  34. ycpp-0.1.0.data/headers/xsimd/arch/common/xsimd_common_details.hpp +386 -0
  35. ycpp-0.1.0.data/headers/xsimd/arch/common/xsimd_common_logical.hpp +240 -0
  36. ycpp-0.1.0.data/headers/xsimd/arch/common/xsimd_common_math.hpp +2601 -0
  37. ycpp-0.1.0.data/headers/xsimd/arch/common/xsimd_common_memory.hpp +1006 -0
  38. ycpp-0.1.0.data/headers/xsimd/arch/common/xsimd_common_rounding.hpp +72 -0
  39. ycpp-0.1.0.data/headers/xsimd/arch/common/xsimd_common_swizzle.hpp +260 -0
  40. ycpp-0.1.0.data/headers/xsimd/arch/common/xsimd_common_trigo.hpp +996 -0
  41. ycpp-0.1.0.data/headers/xsimd/arch/utils/shifts.hpp +82 -0
  42. ycpp-0.1.0.data/headers/xsimd/arch/xsimd_avx.hpp +2111 -0
  43. ycpp-0.1.0.data/headers/xsimd/arch/xsimd_avx2.hpp +1591 -0
  44. ycpp-0.1.0.data/headers/xsimd/arch/xsimd_avx512bw.hpp +724 -0
  45. ycpp-0.1.0.data/headers/xsimd/arch/xsimd_avx512cd.hpp +28 -0
  46. ycpp-0.1.0.data/headers/xsimd/arch/xsimd_avx512dq.hpp +270 -0
  47. ycpp-0.1.0.data/headers/xsimd/arch/xsimd_avx512er.hpp +17 -0
  48. ycpp-0.1.0.data/headers/xsimd/arch/xsimd_avx512f.hpp +2919 -0
  49. ycpp-0.1.0.data/headers/xsimd/arch/xsimd_avx512ifma.hpp +17 -0
  50. ycpp-0.1.0.data/headers/xsimd/arch/xsimd_avx512pf.hpp +17 -0
  51. ycpp-0.1.0.data/headers/xsimd/arch/xsimd_avx512vbmi.hpp +76 -0
  52. ycpp-0.1.0.data/headers/xsimd/arch/xsimd_avx512vbmi2.hpp +130 -0
  53. ycpp-0.1.0.data/headers/xsimd/arch/xsimd_avx512vnni_avx512bw.hpp +17 -0
  54. ycpp-0.1.0.data/headers/xsimd/arch/xsimd_avx512vnni_avx512vbmi2.hpp +17 -0
  55. ycpp-0.1.0.data/headers/xsimd/arch/xsimd_avxvnni.hpp +17 -0
  56. ycpp-0.1.0.data/headers/xsimd/arch/xsimd_common.hpp +26 -0
  57. ycpp-0.1.0.data/headers/xsimd/arch/xsimd_common_fwd.hpp +127 -0
  58. ycpp-0.1.0.data/headers/xsimd/arch/xsimd_constants.hpp +393 -0
  59. ycpp-0.1.0.data/headers/xsimd/arch/xsimd_emulated.hpp +787 -0
  60. ycpp-0.1.0.data/headers/xsimd/arch/xsimd_fma3_avx.hpp +93 -0
  61. ycpp-0.1.0.data/headers/xsimd/arch/xsimd_fma3_avx2.hpp +46 -0
  62. ycpp-0.1.0.data/headers/xsimd/arch/xsimd_fma3_sse.hpp +97 -0
  63. ycpp-0.1.0.data/headers/xsimd/arch/xsimd_fma4.hpp +92 -0
  64. ycpp-0.1.0.data/headers/xsimd/arch/xsimd_i8mm_neon64.hpp +17 -0
  65. ycpp-0.1.0.data/headers/xsimd/arch/xsimd_isa.hpp +146 -0
  66. ycpp-0.1.0.data/headers/xsimd/arch/xsimd_neon.hpp +3580 -0
  67. ycpp-0.1.0.data/headers/xsimd/arch/xsimd_neon64.hpp +1614 -0
  68. ycpp-0.1.0.data/headers/xsimd/arch/xsimd_rvv.hpp +1515 -0
  69. ycpp-0.1.0.data/headers/xsimd/arch/xsimd_scalar.hpp +1210 -0
  70. ycpp-0.1.0.data/headers/xsimd/arch/xsimd_sse2.hpp +2333 -0
  71. ycpp-0.1.0.data/headers/xsimd/arch/xsimd_sse3.hpp +66 -0
  72. ycpp-0.1.0.data/headers/xsimd/arch/xsimd_sse4_1.hpp +510 -0
  73. ycpp-0.1.0.data/headers/xsimd/arch/xsimd_sse4_2.hpp +44 -0
  74. ycpp-0.1.0.data/headers/xsimd/arch/xsimd_ssse3.hpp +186 -0
  75. ycpp-0.1.0.data/headers/xsimd/arch/xsimd_sve.hpp +1186 -0
  76. ycpp-0.1.0.data/headers/xsimd/arch/xsimd_vsx.hpp +916 -0
  77. ycpp-0.1.0.data/headers/xsimd/arch/xsimd_vxe.hpp +787 -0
  78. ycpp-0.1.0.data/headers/xsimd/arch/xsimd_wasm.hpp +1819 -0
  79. ycpp-0.1.0.data/headers/xsimd/config/xsimd_arch.hpp +242 -0
  80. ycpp-0.1.0.data/headers/xsimd/config/xsimd_config.hpp +620 -0
  81. ycpp-0.1.0.data/headers/xsimd/config/xsimd_cpu_features.hpp +50 -0
  82. ycpp-0.1.0.data/headers/xsimd/config/xsimd_cpu_features_arm.hpp +132 -0
  83. ycpp-0.1.0.data/headers/xsimd/config/xsimd_cpu_features_ppc.hpp +54 -0
  84. ycpp-0.1.0.data/headers/xsimd/config/xsimd_cpu_features_riscv.hpp +95 -0
  85. ycpp-0.1.0.data/headers/xsimd/config/xsimd_cpu_features_s390x.hpp +56 -0
  86. ycpp-0.1.0.data/headers/xsimd/config/xsimd_cpu_features_x86.hpp +1044 -0
  87. ycpp-0.1.0.data/headers/xsimd/config/xsimd_cpuid.hpp +144 -0
  88. ycpp-0.1.0.data/headers/xsimd/config/xsimd_getauxval.hpp +159 -0
  89. ycpp-0.1.0.data/headers/xsimd/config/xsimd_macros.hpp +76 -0
  90. ycpp-0.1.0.data/headers/xsimd/math/xsimd_rem_pio2.hpp +707 -0
  91. ycpp-0.1.0.data/headers/xsimd/memory/xsimd_aligned_allocator.hpp +349 -0
  92. ycpp-0.1.0.data/headers/xsimd/memory/xsimd_alignment.hpp +102 -0
  93. ycpp-0.1.0.data/headers/xsimd/types/xsimd_all_registers.hpp +57 -0
  94. ycpp-0.1.0.data/headers/xsimd/types/xsimd_api.hpp +3106 -0
  95. ycpp-0.1.0.data/headers/xsimd/types/xsimd_avx2_register.hpp +44 -0
  96. ycpp-0.1.0.data/headers/xsimd/types/xsimd_avx512bw_register.hpp +51 -0
  97. ycpp-0.1.0.data/headers/xsimd/types/xsimd_avx512cd_register.hpp +51 -0
  98. ycpp-0.1.0.data/headers/xsimd/types/xsimd_avx512dq_register.hpp +51 -0
  99. ycpp-0.1.0.data/headers/xsimd/types/xsimd_avx512er_register.hpp +51 -0
  100. ycpp-0.1.0.data/headers/xsimd/types/xsimd_avx512f_register.hpp +77 -0
  101. ycpp-0.1.0.data/headers/xsimd/types/xsimd_avx512ifma_register.hpp +51 -0
  102. ycpp-0.1.0.data/headers/xsimd/types/xsimd_avx512pf_register.hpp +51 -0
  103. ycpp-0.1.0.data/headers/xsimd/types/xsimd_avx512vbmi2_register.hpp +51 -0
  104. ycpp-0.1.0.data/headers/xsimd/types/xsimd_avx512vbmi_register.hpp +51 -0
  105. ycpp-0.1.0.data/headers/xsimd/types/xsimd_avx512vnni_avx512bw_register.hpp +54 -0
  106. ycpp-0.1.0.data/headers/xsimd/types/xsimd_avx512vnni_avx512vbmi2_register.hpp +53 -0
  107. ycpp-0.1.0.data/headers/xsimd/types/xsimd_avx_register.hpp +64 -0
  108. ycpp-0.1.0.data/headers/xsimd/types/xsimd_avxvnni_register.hpp +44 -0
  109. ycpp-0.1.0.data/headers/xsimd/types/xsimd_batch.hpp +1665 -0
  110. ycpp-0.1.0.data/headers/xsimd/types/xsimd_batch_constant.hpp +571 -0
  111. ycpp-0.1.0.data/headers/xsimd/types/xsimd_batch_fwd.hpp +41 -0
  112. ycpp-0.1.0.data/headers/xsimd/types/xsimd_common_arch.hpp +49 -0
  113. ycpp-0.1.0.data/headers/xsimd/types/xsimd_emulated_register.hpp +80 -0
  114. ycpp-0.1.0.data/headers/xsimd/types/xsimd_fma3_avx2_register.hpp +50 -0
  115. ycpp-0.1.0.data/headers/xsimd/types/xsimd_fma3_avx_register.hpp +50 -0
  116. ycpp-0.1.0.data/headers/xsimd/types/xsimd_fma3_sse_register.hpp +50 -0
  117. ycpp-0.1.0.data/headers/xsimd/types/xsimd_fma4_register.hpp +50 -0
  118. ycpp-0.1.0.data/headers/xsimd/types/xsimd_i8mm_neon64_register.hpp +55 -0
  119. ycpp-0.1.0.data/headers/xsimd/types/xsimd_neon64_register.hpp +55 -0
  120. ycpp-0.1.0.data/headers/xsimd/types/xsimd_neon_register.hpp +130 -0
  121. ycpp-0.1.0.data/headers/xsimd/types/xsimd_register.hpp +96 -0
  122. ycpp-0.1.0.data/headers/xsimd/types/xsimd_rvv_register.hpp +491 -0
  123. ycpp-0.1.0.data/headers/xsimd/types/xsimd_sse2_register.hpp +59 -0
  124. ycpp-0.1.0.data/headers/xsimd/types/xsimd_sse3_register.hpp +49 -0
  125. ycpp-0.1.0.data/headers/xsimd/types/xsimd_sse4_1_register.hpp +48 -0
  126. ycpp-0.1.0.data/headers/xsimd/types/xsimd_sse4_2_register.hpp +48 -0
  127. ycpp-0.1.0.data/headers/xsimd/types/xsimd_ssse3_register.hpp +48 -0
  128. ycpp-0.1.0.data/headers/xsimd/types/xsimd_sve_register.hpp +216 -0
  129. ycpp-0.1.0.data/headers/xsimd/types/xsimd_traits.hpp +408 -0
  130. ycpp-0.1.0.data/headers/xsimd/types/xsimd_utils.hpp +462 -0
  131. ycpp-0.1.0.data/headers/xsimd/types/xsimd_vsx_register.hpp +77 -0
  132. ycpp-0.1.0.data/headers/xsimd/types/xsimd_vxe_register.hpp +86 -0
  133. ycpp-0.1.0.data/headers/xsimd/types/xsimd_wasm_register.hpp +59 -0
  134. ycpp-0.1.0.data/headers/xsimd/utils/bits.hpp +122 -0
  135. ycpp-0.1.0.data/headers/xsimd/utils/xsimd_type_traits.hpp +145 -0
  136. ycpp-0.1.0.data/headers/xsimd/xsimd.hpp +43 -0
  137. ycpp-0.1.0.dist-info/DELVEWHEEL +2 -0
  138. ycpp-0.1.0.dist-info/METADATA +15 -0
  139. ycpp-0.1.0.dist-info/RECORD +142 -0
  140. ycpp-0.1.0.dist-info/WHEEL +4 -0
  141. ycpp.libs/msvcp140-9cb625fcbc2fbbd6fca1aee8b24b0ebe.dll +0 -0
  142. ycpp.libs/msvcp140_1-84ac1bc84e09d193dd6ad98c84c0fd94.dll +0 -0
@@ -0,0 +1,620 @@
1
+ /***************************************************************************
2
+ * Copyright (c) Johan Mabille, Sylvain Corlay, Wolf Vollprecht and *
3
+ * Martin Renou *
4
+ * Copyright (c) QuantStack *
5
+ * Copyright (c) Serge Guelton *
6
+ * *
7
+ * Distributed under the terms of the BSD 3-Clause License. *
8
+ * *
9
+ * The full license is in the file LICENSE, distributed with this software. *
10
+ ****************************************************************************/
11
+
12
+ #ifndef XSIMD_CONFIG_HPP
13
+ #define XSIMD_CONFIG_HPP
14
+
15
+ #define XSIMD_VERSION_MAJOR 14
16
+ #define XSIMD_VERSION_MINOR 2
17
+ #define XSIMD_VERSION_PATCH 0
18
+
19
+ #if defined(__GNUC__) && defined(__BYTE_ORDER__)
20
+ #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
21
+ #define XSIMD_LITTLE_ENDIAN
22
+ #endif
23
+ #elif defined(_WIN32)
24
+ // We can safely assume that Windows is always little endian
25
+ #define XSIMD_LITTLE_ENDIAN
26
+ #elif defined(i386) || defined(i486) || defined(intel) || defined(x86) || defined(i86pc) || defined(__alpha) || defined(__osf__)
27
+ #define XSIMD_LITTLE_ENDIAN
28
+ #endif
29
+
30
+ /**
31
+ * high level free functions
32
+ *
33
+ * @defgroup xsimd_config_macro Instruction Set Detection
34
+ */
35
+
36
+ /**
37
+ * @ingroup xsimd_config_macro
38
+ *
39
+ * Set to 1 if the target is the x86 architecture family.
40
+ */
41
+ #if defined(__x86_64__) || defined(__i386__) || defined(_M_AMD64) || defined(_M_IX86)
42
+ #define XSIMD_TARGET_X86 1
43
+ #else
44
+ #define XSIMD_TARGET_X86 0
45
+ #endif
46
+
47
+ /**
48
+ * @ingroup xsimd_config_macro
49
+ *
50
+ * Set to 1 if GNU-style inline assembly is available, to 0 otherwise.
51
+ */
52
+ /* Use __clang__ || __GNUC__ for GNU-style inline asm. clang-cl runs in
53
+ * MSVC-compatibility mode and does not define __GNUC__ by default, but it
54
+ * still defines __clang__. Clang documents __asm__/__asm__ support and broad
55
+ * GCC-extension compatibility:
56
+ * https://clang.llvm.org/docs/LanguageExtensions.html
57
+ * Clang only emits __GNUC__ when GNUCVersion != 0:
58
+ * https://raw.githubusercontent.com/llvm/llvm-project/main/clang/lib/Frontend/InitPreprocessor.cpp
59
+ * and GNUCVersion defaults to 0:
60
+ * https://raw.githubusercontent.com/llvm/llvm-project/main/clang/include/clang/Basic/LangOptions.def
61
+ */
62
+ #if defined(__clang__) || defined(__GNUC__)
63
+ #define XSIMD_WITH_INLINE_ASM 1
64
+ #else
65
+ #define XSIMD_WITH_INLINE_ASM 0
66
+ #endif
67
+
68
+ /**
69
+ * @ingroup xsimd_config_macro
70
+ *
71
+ * Set to 1 when the compiler is allowed to reassociate floating-point
72
+ * operations (e.g. -ffast-math, -fassociative-math). Detected
73
+ * automatically from __FAST_MATH__ (GCC/Clang) and __ASSOCIATIVE_MATH__
74
+ * (GCC). Clang does not define a macro for standalone
75
+ * -fassociative-math; users should define XSIMD_REASSOCIATIVE_MATH=1
76
+ * manually in that case.
77
+ */
78
+ #ifndef XSIMD_REASSOCIATIVE_MATH
79
+ #if defined(__FAST_MATH__) || defined(__ASSOCIATIVE_MATH__)
80
+ #define XSIMD_REASSOCIATIVE_MATH 1
81
+ #else
82
+ #define XSIMD_REASSOCIATIVE_MATH 0
83
+ #endif
84
+ #endif
85
+
86
+ /**
87
+ * @ingroup xsimd_config_macro
88
+ *
89
+ * Set to 1 if SSE2 is available at compile-time, to 0 otherwise.
90
+ */
91
+ #ifdef __SSE2__
92
+ #define XSIMD_WITH_SSE2 1
93
+ #else
94
+ #define XSIMD_WITH_SSE2 0
95
+ #endif
96
+
97
+ /**
98
+ * @ingroup xsimd_config_macro
99
+ *
100
+ * Set to 1 if SSE3 is available at compile-time, to 0 otherwise.
101
+ */
102
+ #ifdef __SSE3__
103
+ #define XSIMD_WITH_SSE3 1
104
+ #else
105
+ #define XSIMD_WITH_SSE3 0
106
+ #endif
107
+
108
+ /**
109
+ * @ingroup xsimd_config_macro
110
+ *
111
+ * Set to 1 if SSSE3 is available at compile-time, to 0 otherwise.
112
+ */
113
+ #ifdef __SSSE3__
114
+ #define XSIMD_WITH_SSSE3 1
115
+ #else
116
+ #define XSIMD_WITH_SSSE3 0
117
+ #endif
118
+
119
+ /**
120
+ * @ingroup xsimd_config_macro
121
+ *
122
+ * Set to 1 if SSE4.1 is available at compile-time, to 0 otherwise.
123
+ */
124
+ #ifdef __SSE4_1__
125
+ #define XSIMD_WITH_SSE4_1 1
126
+ #else
127
+ #define XSIMD_WITH_SSE4_1 0
128
+ #endif
129
+
130
+ /**
131
+ * @ingroup xsimd_config_macro
132
+ *
133
+ * Set to 1 if SSE4.2 is available at compile-time, to 0 otherwise.
134
+ */
135
+ #ifdef __SSE4_2__
136
+ #define XSIMD_WITH_SSE4_2 1
137
+ #else
138
+ #define XSIMD_WITH_SSE4_2 0
139
+ #endif
140
+
141
+ /**
142
+ * @ingroup xsimd_config_macro
143
+ *
144
+ * Set to 1 if AVX is available at compile-time, to 0 otherwise.
145
+ */
146
+ #ifdef __AVX__
147
+ #define XSIMD_WITH_AVX 1
148
+ #else
149
+ #define XSIMD_WITH_AVX 0
150
+ #endif
151
+
152
+ /**
153
+ * @ingroup xsimd_config_macro
154
+ *
155
+ * Set to 1 if AVX2 is available at compile-time, to 0 otherwise.
156
+ */
157
+ #ifdef __AVX2__
158
+ #define XSIMD_WITH_AVX2 1
159
+ #else
160
+ #define XSIMD_WITH_AVX2 0
161
+ #endif
162
+
163
+ /**
164
+ * @ingroup xsimd_config_macro
165
+ *
166
+ * Set to 1 if AVXVNNI is available at compile-time, to 0 otherwise.
167
+ */
168
+ #ifdef __AVXVNNI__
169
+ #define XSIMD_WITH_AVXVNNI 1
170
+ #else
171
+ #define XSIMD_WITH_AVXVNNI 0
172
+ #endif
173
+
174
+ /**
175
+ * @ingroup xsimd_config_macro
176
+ *
177
+ * Set to 1 if FMA3 for SSE is available at compile-time, to 0 otherwise.
178
+ */
179
+ #ifdef __FMA__
180
+
181
+ #if defined(__SSE__)
182
+ #ifndef XSIMD_WITH_FMA3_SSE // Leave the opportunity to manually disable it, see #643
183
+ #define XSIMD_WITH_FMA3_SSE 1
184
+ #endif
185
+ #else
186
+
187
+ #if XSIMD_WITH_FMA3_SSE
188
+ #error "Manually set XSIMD_WITH_FMA3_SSE is incompatible with current compiler flags"
189
+ #endif
190
+
191
+ #define XSIMD_WITH_FMA3_SSE 0
192
+ #endif
193
+
194
+ #else
195
+
196
+ #if XSIMD_WITH_FMA3_SSE
197
+ #error "Manually set XSIMD_WITH_FMA3_SSE is incompatible with current compiler flags"
198
+ #endif
199
+
200
+ #define XSIMD_WITH_FMA3_SSE 0
201
+ #endif
202
+
203
+ /**
204
+ * @ingroup xsimd_config_macro
205
+ *
206
+ * Set to 1 if FMA3 for AVX is available at compile-time, to 0 otherwise.
207
+ */
208
+ #ifdef __FMA__
209
+
210
+ #if defined(__AVX__)
211
+ #ifndef XSIMD_WITH_FMA3_AVX // Leave the opportunity to manually disable it, see #643
212
+ #define XSIMD_WITH_FMA3_AVX 1
213
+ #endif
214
+ #else
215
+
216
+ #if XSIMD_WITH_FMA3_AVX
217
+ #error "Manually set XSIMD_WITH_FMA3_AVX is incompatible with current compiler flags"
218
+ #endif
219
+
220
+ #define XSIMD_WITH_FMA3_AVX 0
221
+ #endif
222
+
223
+ #if defined(__AVX2__)
224
+ #ifndef XSIMD_WITH_FMA3_AVX2 // Leave the opportunity to manually disable it, see #643
225
+ #define XSIMD_WITH_FMA3_AVX2 1
226
+ #endif
227
+ #else
228
+
229
+ #if XSIMD_WITH_FMA3_AVX2
230
+ #error "Manually set XSIMD_WITH_FMA3_AVX2 is incompatible with current compiler flags"
231
+ #endif
232
+
233
+ #define XSIMD_WITH_FMA3_AVX2 0
234
+ #endif
235
+
236
+ #else
237
+
238
+ #if XSIMD_WITH_FMA3_AVX
239
+ #error "Manually set XSIMD_WITH_FMA3_AVX is incompatible with current compiler flags"
240
+ #endif
241
+
242
+ #if XSIMD_WITH_FMA3_AVX2
243
+ #error "Manually set XSIMD_WITH_FMA3_AVX2 is incompatible with current compiler flags"
244
+ #endif
245
+
246
+ #define XSIMD_WITH_FMA3_AVX 0
247
+ #define XSIMD_WITH_FMA3_AVX2 0
248
+
249
+ #endif
250
+
251
+ /**
252
+ * @ingroup xsimd_config_macro
253
+ *
254
+ * Set to 1 if FMA4 is available at compile-time, to 0 otherwise.
255
+ */
256
+ #ifdef __FMA4__
257
+ #define XSIMD_WITH_FMA4 1
258
+ #else
259
+ #define XSIMD_WITH_FMA4 0
260
+ #endif
261
+
262
+ /**
263
+ * @ingroup xsimd_config_macro
264
+ *
265
+ * Set to 1 if AVX512F is available at compile-time, to 0 otherwise.
266
+ */
267
+ #ifdef __AVX512F__
268
+ // AVX512 instructions are supported starting with gcc 6
269
+ // see https://www.gnu.org/software/gcc/gcc-6/changes.html
270
+ // check clang first, newer clang always defines __GNUC__ = 4
271
+ #if defined(__clang__) && __clang_major__ >= 6
272
+ #define XSIMD_WITH_AVX512F 1
273
+ #elif defined(__GNUC__) && __GNUC__ < 6
274
+ #define XSIMD_WITH_AVX512F 0
275
+ #else
276
+ #define XSIMD_WITH_AVX512F 1
277
+ #if __GNUC__ == 6
278
+ #define XSIMD_AVX512_SHIFT_INTRINSICS_IMM_ONLY 1
279
+ #endif
280
+ #endif
281
+ #else
282
+ #define XSIMD_WITH_AVX512F 0
283
+ #endif
284
+
285
+ /**
286
+ * @ingroup xsimd_config_macro
287
+ *
288
+ * Set to 1 if AVX512CD is available at compile-time, to 0 otherwise.
289
+ */
290
+ #ifdef __AVX512CD__
291
+ // Avoids repeating the GCC workaround over and over
292
+ #define XSIMD_WITH_AVX512CD XSIMD_WITH_AVX512F
293
+ #else
294
+ #define XSIMD_WITH_AVX512CD 0
295
+ #endif
296
+
297
+ /**
298
+ * @ingroup xsimd_config_macro
299
+ *
300
+ * Set to 1 if AVX512DQ is available at compile-time, to 0 otherwise.
301
+ */
302
+ #ifdef __AVX512DQ__
303
+ #define XSIMD_WITH_AVX512DQ XSIMD_WITH_AVX512F
304
+ #else
305
+ #define XSIMD_WITH_AVX512DQ 0
306
+ #endif
307
+
308
+ /**
309
+ * @ingroup xsimd_config_macro
310
+ *
311
+ * Set to 1 if AVX512BW is available at compile-time, to 0 otherwise.
312
+ */
313
+ #ifdef __AVX512BW__
314
+ #define XSIMD_WITH_AVX512BW XSIMD_WITH_AVX512F
315
+ #else
316
+ #define XSIMD_WITH_AVX512BW 0
317
+ #endif
318
+
319
+ /**
320
+ * @ingroup xsimd_config_macro
321
+ *
322
+ * Set to 1 if AVX512ER is available at compile-time, to 0 otherwise.
323
+ */
324
+ #ifdef __AVX512ER__
325
+ #define XSIMD_WITH_AVX512ER XSIMD_WITH_AVX512F
326
+ #else
327
+ #define XSIMD_WITH_AVX512ER 0
328
+ #endif
329
+
330
+ /**
331
+ * @ingroup xsimd_config_macro
332
+ *
333
+ * Set to 1 if AVX512PF is available at compile-time, to 0 otherwise.
334
+ */
335
+ #ifdef __AVX512PF__
336
+ #define XSIMD_WITH_AVX512PF XSIMD_WITH_AVX512F
337
+ #else
338
+ #define XSIMD_WITH_AVX512PF 0
339
+ #endif
340
+
341
+ /**
342
+ * @ingroup xsimd_config_macro
343
+ *
344
+ * Set to 1 if AVX512IFMA is available at compile-time, to 0 otherwise.
345
+ */
346
+ #ifdef __AVX512IFMA__
347
+ #define XSIMD_WITH_AVX512IFMA XSIMD_WITH_AVX512F
348
+ #else
349
+ #define XSIMD_WITH_AVX512IFMA 0
350
+ #endif
351
+
352
+ /**
353
+ * @ingroup xsimd_config_macro
354
+ *
355
+ * Set to 1 if AVX512VBMI is available at compile-time, to 0 otherwise.
356
+ */
357
+ #ifdef __AVX512VBMI__
358
+ #define XSIMD_WITH_AVX512VBMI XSIMD_WITH_AVX512F
359
+ #else
360
+ #define XSIMD_WITH_AVX512VBMI 0
361
+ #endif
362
+
363
+ /**
364
+ * @ingroup xsimd_config_macro
365
+ *
366
+ * Set to 1 if AVX512VBMI2 is available at compile-time, to 0 otherwise.
367
+ */
368
+ #ifdef __AVX512VBMI2__
369
+ #define XSIMD_WITH_AVX512VBMI2 XSIMD_WITH_AVX512F
370
+ #else
371
+ #define XSIMD_WITH_AVX512VBMI2 0
372
+ #endif
373
+
374
+ /**
375
+ * @ingroup xsimd_config_macro
376
+ *
377
+ * Set to 1 if AVX512VNNI is available at compile-time, to 0 otherwise.
378
+ */
379
+ #ifdef __AVX512VNNI__
380
+
381
+ #if XSIMD_WITH_AVX512VBMI2
382
+ #define XSIMD_WITH_AVX512VNNI_AVX512VBMI2 XSIMD_WITH_AVX512F
383
+ #define XSIMD_WITH_AVX512VNNI_AVX512BW XSIMD_WITH_AVX512F
384
+ #else
385
+ #define XSIMD_WITH_AVX512VNNI_AVX512VBMI2 0
386
+ #define XSIMD_WITH_AVX512VNNI_AVX512BW XSIMD_WITH_AVX512F
387
+ #endif
388
+
389
+ #else
390
+
391
+ #define XSIMD_WITH_AVX512VNNI_AVX512VBMI2 0
392
+ #define XSIMD_WITH_AVX512VNNI_AVX512BW 0
393
+
394
+ #endif
395
+
396
+ /**
397
+ * @ingroup xsimd_config_macro
398
+ *
399
+ * Set to 1 if the target is in the ARM architecture family in 64 bits, to 0 otherwise
400
+ */
401
+ #if defined(__aarch64__) || defined(_M_ARM64)
402
+ #define XSIMD_TARGET_ARM64 1
403
+ #else
404
+ #define XSIMD_TARGET_ARM64 0
405
+ #endif
406
+
407
+ /**
408
+ * @ingroup xsimd_config_macro
409
+ *
410
+ * Set to 1 if the target is in the ARM architecture family, to 0 otherwise
411
+ */
412
+ #if defined(__arm__) || defined(_M_ARM) || XSIMD_TARGET_ARM64
413
+ #define XSIMD_TARGET_ARM 1
414
+ #else
415
+ #define XSIMD_TARGET_ARM 0
416
+ #endif
417
+
418
+ /**
419
+ * @ingroup xsimd_config_macro
420
+ *
421
+ * Set to 1 if NEON is available at compile-time, to 0 otherwise.
422
+ */
423
+ #if (defined(__ARM_NEON) && (__ARM_ARCH >= 7)) || XSIMD_TARGET_ARM64
424
+ #define XSIMD_WITH_NEON 1
425
+ #else
426
+ #define XSIMD_WITH_NEON 0
427
+ #endif
428
+
429
+ // Neon is always available on Arm64, though it is theoritially possible to compile
430
+ // without it, such as -march=armv8-a+nosimd.
431
+ // Note that MSVC may never define __ARM_NEON even when available.
432
+ /**
433
+ * @ingroup xsimd_config_macro
434
+ *
435
+ * Set to 1 if NEON64 is available at compile-time, to 0 otherwise.
436
+ */
437
+ #if XSIMD_TARGET_ARM64
438
+ #define XSIMD_WITH_NEON64 1
439
+ #else
440
+ #define XSIMD_WITH_NEON64 0
441
+ #endif
442
+
443
+ /**
444
+ * @ingroup xsimd_config_macro
445
+ *
446
+ * Set to 1 if i8mm neon64 extension is available at compile-time, to 0 otherwise.
447
+ */
448
+ #if defined(__ARM_FEATURE_MATMUL_INT8)
449
+ #define XSIMD_WITH_I8MM_NEON64 1
450
+ #else
451
+ #define XSIMD_WITH_I8MM_NEON64 0
452
+ #endif
453
+
454
+ /**
455
+ * @ingroup xsimd_config_macro
456
+ *
457
+ * Set to 1 if SVE is available and bit width is pre-set at compile-time, to 0 otherwise.
458
+ */
459
+ #if defined(__ARM_FEATURE_SVE) && defined(__ARM_FEATURE_SVE_BITS) && __ARM_FEATURE_SVE_BITS > 0
460
+ #define XSIMD_WITH_SVE 1
461
+ #define XSIMD_SVE_BITS __ARM_FEATURE_SVE_BITS
462
+ #else
463
+ #define XSIMD_WITH_SVE 0
464
+ #define XSIMD_SVE_BITS 0
465
+ #endif
466
+
467
+ /**
468
+ * @ingroup xsimd_config_macro
469
+ *
470
+ * Set to 1 if the target is the RISC-V architecture family.
471
+ */
472
+ #ifdef __riscv
473
+ #define XSIMD_TARGET_RISCV 1
474
+ #else
475
+ #define XSIMD_TARGET_RISCV 0
476
+ #endif
477
+
478
+ /**
479
+ * @ingroup xsimd_config_macro
480
+ *
481
+ * Set to 1 if RVV is available and bit width is pre-set at compile-time, to 0 otherwise.
482
+ */
483
+ #if defined(__riscv_vector) && defined(__riscv_v_fixed_vlen) && __riscv_v_fixed_vlen > 0
484
+ #define XSIMD_WITH_RVV 1
485
+ #define XSIMD_RVV_BITS __riscv_v_fixed_vlen
486
+ #else
487
+ #define XSIMD_WITH_RVV 0
488
+ #define XSIMD_RVV_BITS 0
489
+ #endif
490
+
491
+ /**
492
+ * @ingroup xsimd_config_macro
493
+ *
494
+ * Set to 1 if WebAssembly SIMD is available at compile-time, to 0 otherwise.
495
+ */
496
+ #ifdef __EMSCRIPTEN__
497
+ #define XSIMD_WITH_WASM 1
498
+ #else
499
+ #define XSIMD_WITH_WASM 0
500
+ #endif
501
+
502
+ /**
503
+ * @ingroup xsimd_config_macro
504
+ *
505
+ * Set to 1 if the target is in the PowerPC architecture family, to 0 otherwise
506
+ */
507
+ #if defined(__powerpc__) || defined(__powerpc64__) || defined(_ARCH_PPC) || defined(_ARCH_PPC64)
508
+ #define XSIMD_TARGET_PPC 1
509
+ #else
510
+ #define XSIMD_TARGET_PPC 0
511
+ #endif
512
+
513
+ /**
514
+ * @ingroup xsimd_config_macro
515
+ *
516
+ * Set to 1 if VMX with VSX extension is available at compile-time, to 0 otherwise.
517
+ */
518
+ #if defined(__VEC__) && defined(__VSX__)
519
+ #define XSIMD_WITH_VSX 1
520
+ #else
521
+ #define XSIMD_WITH_VSX 0
522
+ #endif
523
+
524
+ /**
525
+ * @ingroup xsimd_config_macro
526
+ *
527
+ * Set to 1 if the target is in the IBM Z architecture family, to 0 otherwise
528
+ */
529
+ #if defined(__s390x__)
530
+ #define XSIMD_TARGET_S390X 1
531
+ #else
532
+ #define XSIMD_TARGET_S390X 0
533
+ #endif
534
+
535
+ /**
536
+ + * @ingroup xsimd_config_macro
537
+ + *
538
+ + * Set to 1 if s390x VXE is available at compile-time, to 0 otherwise.
539
+ + * Float vectors have been introduced with VXE included with IBM z14.
540
+ + */
541
+ #if defined(__VEC__) && __VEC__ >= 10304 && __ARCH__ >= 12
542
+ #define XSIMD_WITH_VXE 1
543
+ #else
544
+ #define XSIMD_WITH_VXE 0
545
+ #endif
546
+
547
+ // Workaround for MSVC compiler
548
+ #ifdef _MSC_VER
549
+
550
+ #if XSIMD_WITH_AVX512
551
+
552
+ #undef XSIMD_WITH_AVX2
553
+ #define XSIMD_WITH_AVX2 1
554
+
555
+ #endif
556
+
557
+ #if XSIMD_WITH_AVX2
558
+
559
+ #undef XSIMD_WITH_AVX
560
+ #define XSIMD_WITH_AVX 1
561
+
562
+ #undef XSIMD_WITH_FMA3_AVX
563
+ #define XSIMD_WITH_FMA3_AVX 1
564
+
565
+ #undef XSIMD_WITH_FMA3_AVX2
566
+ #define XSIMD_WITH_FMA3_AVX2 1
567
+
568
+ #endif
569
+
570
+ #if XSIMD_WITH_AVX
571
+
572
+ #undef XSIMD_WITH_SSE4_2
573
+ #define XSIMD_WITH_SSE4_2 1
574
+
575
+ #endif
576
+
577
+ #if XSIMD_WITH_SSE4_2
578
+
579
+ #undef XSIMD_WITH_SSE4_1
580
+ #define XSIMD_WITH_SSE4_1 1
581
+
582
+ #endif
583
+
584
+ #if XSIMD_WITH_SSE4_1
585
+
586
+ #undef XSIMD_WITH_SSSE3
587
+ #define XSIMD_WITH_SSSE3 1
588
+
589
+ #endif
590
+
591
+ #if XSIMD_WITH_SSSE3
592
+
593
+ #undef XSIMD_WITH_SSE3
594
+ #define XSIMD_WITH_SSE3 1
595
+
596
+ #endif
597
+
598
+ #if XSIMD_WITH_SSE3 || ((defined(_M_AMD64) || defined(_M_X64)) && !defined(_M_ARM64EC)) || (defined(_M_IX86_FP) && _M_IX86_FP >= 2)
599
+ #undef XSIMD_WITH_SSE2
600
+ #define XSIMD_WITH_SSE2 1
601
+ #endif
602
+
603
+ #endif
604
+
605
+ #if !XSIMD_WITH_SSE2 && !XSIMD_WITH_SSE3 && !XSIMD_WITH_SSSE3 && !XSIMD_WITH_SSE4_1 && !XSIMD_WITH_SSE4_2 && !XSIMD_WITH_AVX && !XSIMD_WITH_AVX2 && !XSIMD_WITH_AVXVNNI && !XSIMD_WITH_FMA3_SSE && !XSIMD_WITH_FMA4 && !XSIMD_WITH_FMA3_AVX && !XSIMD_WITH_FMA3_AVX2 && !XSIMD_WITH_AVX512F && !XSIMD_WITH_AVX512CD && !XSIMD_WITH_AVX512DQ && !XSIMD_WITH_AVX512BW && !XSIMD_WITH_AVX512ER && !XSIMD_WITH_AVX512PF && !XSIMD_WITH_AVX512IFMA && !XSIMD_WITH_AVX512VBMI && !XSIMD_WITH_AVX512VBMI2 && !XSIMD_WITH_NEON && !XSIMD_WITH_NEON64 && !XSIMD_WITH_SVE && !XSIMD_WITH_RVV && !XSIMD_WITH_WASM && !XSIMD_WITH_VSX && !XSIMD_WITH_EMULATED && !XSIMD_WITH_VXE
606
+ #define XSIMD_NO_SUPPORTED_ARCHITECTURE
607
+ #endif
608
+
609
+ /**
610
+ * @ingroup xsimd_config_macro
611
+ *
612
+ * Set to 1 if the target is a linux
613
+ */
614
+ #if defined(__linux__) && (!defined(__ANDROID_API__) || __ANDROID_API__ >= 18)
615
+ #define XSIMD_HAVE_LINUX_GETAUXVAL 1
616
+ #else
617
+ #define XSIMD_HAVE_LINUX_GETAUXVAL 0
618
+ #endif
619
+
620
+ #endif
@@ -0,0 +1,50 @@
1
+ /***************************************************************************
2
+ * Copyright (c) Johan Mabille, Sylvain Corlay, Wolf Vollprecht and *
3
+ * Martin Renou *
4
+ * Copyright (c) QuantStack *
5
+ * Copyright (c) Serge Guelton *
6
+ * *
7
+ * Distributed under the terms of the BSD 3-Clause License. *
8
+ * *
9
+ * The full license is in the file LICENSE, distributed with this software. *
10
+ ****************************************************************************/
11
+
12
+ #ifndef XSIMD_CPU_FEATURES_HPP
13
+ #define XSIMD_CPU_FEATURES_HPP
14
+
15
+ #include "./xsimd_cpu_features_arm.hpp"
16
+ #include "./xsimd_cpu_features_ppc.hpp"
17
+ #include "./xsimd_cpu_features_riscv.hpp"
18
+ #include "./xsimd_cpu_features_s390x.hpp"
19
+ #include "./xsimd_cpu_features_x86.hpp"
20
+
21
+ namespace xsimd
22
+ {
23
+
24
+ /**
25
+ * Cross-platform CPU feature detection class.
26
+ *
27
+ * All member functions are safe to work on with all platforms.
28
+ *
29
+ * @warning This class is *not* thread safe.
30
+ * Its internal lazy querying structure makes even `const` member function prone to data race.
31
+ * The structure is also generally not appropriate for directly branching (e.g. on
32
+ * ``cpu_features::avx2``) because it include a branch that the compiler cannot optimize.
33
+ * The current appropriate way to use this class for dynamic dispatching is to store the
34
+ * result of the function calls (e.g. @ref cpu_features) into (static) constants.
35
+ * This is done in @ref xsimd::available_architectures.
36
+ *
37
+ * @see xsimd::dispatch
38
+ * @see xsimd::available_architectures
39
+ */
40
+ class cpu_features : public s390x_cpu_features,
41
+ public ppc_cpu_features,
42
+ public riscv_cpu_features,
43
+ public arm_cpu_features,
44
+ public x86_cpu_features
45
+ {
46
+ };
47
+
48
+ }
49
+
50
+ #endif