|
1 | | -/* auto-generated on 2026-02-20 16:16:37 -0500. version 4.3.1 Do not edit! */ |
| 1 | +/* auto-generated on 2026-03-12 20:40:43 -0400. version 4.4.0 Do not edit! */ |
2 | 2 | /* including simdjson.cpp: */ |
3 | 3 | /* begin file simdjson.cpp */ |
4 | 4 | #define SIMDJSON_SRC_SIMDJSON_CPP |
|
146 | 146 | #define SIMDJSON_CONSTEVAL 0 |
147 | 147 | #endif // defined(__cpp_consteval) && __cpp_consteval >= 201811L && defined(__cpp_lib_constexpr_string) && __cpp_lib_constexpr_string >= 201907L |
148 | 148 | #endif // !defined(SIMDJSON_CONSTEVAL) |
149 | | - |
150 | 149 | #endif // SIMDJSON_COMPILER_CHECK_H |
151 | 150 | /* end file simdjson/compiler_check.h */ |
152 | 151 | /* including simdjson/portability.h: #include "simdjson/portability.h" */ |
@@ -219,6 +218,25 @@ using std::size_t; |
219 | 218 | #define SIMDJSON_IS_LASX 1 // We can always run both |
220 | 219 | #elif defined(__loongarch_sx) |
221 | 220 | #define SIMDJSON_IS_LSX 1 |
| 221 | + |
| 222 | +// Adjust for runtime dispatching support. |
| 223 | +#if defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER) && !defined(__NVCOMPILER) |
| 224 | +#if __GNUC__ > 15 || (__GNUC__ == 15 && __GNUC_MINOR__ >= 0) |
| 225 | + // We are ok, we will support runtime dispatch for LASX. |
| 226 | +#else |
| 227 | + // We disable runtime dispatch for LASX, which means that we will not be able to use LASX |
| 228 | + // even if it is supported by the hardware. |
| 229 | + // Loongson users should update to GCC 15 or better. |
| 230 | + #define SIMDJSON_IMPLEMENTATION_LASX 0 |
| 231 | +#endif |
| 232 | +#else |
| 233 | + // We are not using GCC, so we assume that we can support runtime dispatch for LASX. |
| 234 | + // https://godbolt.org/z/jcMnrjYhs |
| 235 | + #define SIMDJSON_IMPLEMENTATION_LASX 0 |
| 236 | +#endif |
| 237 | + |
| 238 | + |
| 239 | + |
222 | 240 | #endif |
223 | 241 | #elif defined(__PPC64__) || defined(_M_PPC64) |
224 | 242 | #define SIMDJSON_IS_PPC64 1 |
@@ -60938,6 +60956,19 @@ simdjson_inline int leading_zeroes(uint64_t input_num) { |
60938 | 60956 | #endif// _MSC_VER |
60939 | 60957 | } |
60940 | 60958 |
|
| 60959 | +simdjson_inline int trailing_zeroes(uint64_t input_num) { |
| 60960 | +#ifdef _MSC_VER |
| 60961 | + unsigned long trailing_zero = 0; |
| 60962 | + // Search the mask data from least significant bit (LSB) |
| 60963 | + // to most significant bit (MSB) for a set bit (1). |
| 60964 | + if (_BitScanForward64(&trailing_zero, input_num)) |
| 60965 | + return (int)trailing_zero; |
| 60966 | + else return 64; |
| 60967 | +#else |
| 60968 | + return __builtin_ctzll(input_num); |
| 60969 | +#endif// _MSC_VER |
| 60970 | +} |
| 60971 | + |
60941 | 60972 | } // unnamed namespace |
60942 | 60973 | } // namespace fallback |
60943 | 60974 | } // namespace simdjson |
@@ -63169,6 +63200,19 @@ simdjson_inline int leading_zeroes(uint64_t input_num) { |
63169 | 63200 | #endif// _MSC_VER |
63170 | 63201 | } |
63171 | 63202 |
|
| 63203 | +simdjson_inline int trailing_zeroes(uint64_t input_num) { |
| 63204 | +#ifdef _MSC_VER |
| 63205 | + unsigned long trailing_zero = 0; |
| 63206 | + // Search the mask data from least significant bit (LSB) |
| 63207 | + // to most significant bit (MSB) for a set bit (1). |
| 63208 | + if (_BitScanForward64(&trailing_zero, input_num)) |
| 63209 | + return (int)trailing_zero; |
| 63210 | + else return 64; |
| 63211 | +#else |
| 63212 | + return __builtin_ctzll(input_num); |
| 63213 | +#endif// _MSC_VER |
| 63214 | +} |
| 63215 | + |
63172 | 63216 | } // unnamed namespace |
63173 | 63217 | } // namespace fallback |
63174 | 63218 | } // namespace simdjson |
|
0 commit comments