|
|
|
@@ -1,4 +1,4 @@
|
|
|
|
|
/* auto-generated on 2025-09-14 09:01:41 -0600. version 4.0.2 Do not edit! */
|
|
|
|
|
/* auto-generated on 2025-09-15 19:47:29 -0600. version 4.0.3 Do not edit! */
|
|
|
|
|
/* including simdjson.h: */
|
|
|
|
|
/* begin file simdjson.h */
|
|
|
|
|
#ifndef SIMDJSON_H
|
|
|
|
@@ -2508,7 +2508,7 @@ namespace std {
|
|
|
|
|
#define SIMDJSON_SIMDJSON_VERSION_H
|
|
|
|
|
|
|
|
|
|
/** The version of simdjson being used (major.minor.revision) */
|
|
|
|
|
#define SIMDJSON_VERSION "4.0.2"
|
|
|
|
|
#define SIMDJSON_VERSION "4.0.3"
|
|
|
|
|
|
|
|
|
|
namespace simdjson {
|
|
|
|
|
enum {
|
|
|
|
@@ -2523,7 +2523,7 @@ enum {
|
|
|
|
|
/**
|
|
|
|
|
* The revision (major.minor.REVISION) of simdjson being used.
|
|
|
|
|
*/
|
|
|
|
|
SIMDJSON_VERSION_REVISION = 2
|
|
|
|
|
SIMDJSON_VERSION_REVISION = 3
|
|
|
|
|
};
|
|
|
|
|
} // namespace simdjson
|
|
|
|
|
|
|
|
|
@@ -38968,7 +38968,7 @@ error_code tag_invoke(deserialize_tag, ValT &val, T &out) noexcept {
|
|
|
|
|
}
|
|
|
|
|
error_code e = simdjson::SUCCESS;
|
|
|
|
|
template for (constexpr auto mem : std::define_static_array(std::meta::nonstatic_data_members_of(^^T, std::meta::access_context::unchecked()))) {
|
|
|
|
|
if constexpr (!std::meta::is_const(mem) && std::meta::is_public(mem)) {
|
|
|
|
|
if constexpr (!std::meta::is_const(mem) && std::meta::is_public(mem)) {
|
|
|
|
|
constexpr std::string_view key = std::define_static_string(std::meta::identifier_of(mem));
|
|
|
|
|
// Note: removed static assert as optional types are now handled generically
|
|
|
|
|
// as long we are succesful or the field is not found, we continue
|
|
|
|
@@ -45345,10 +45345,12 @@ simdjson_inline void string_builder::clear() noexcept {
|
|
|
|
|
|
|
|
|
|
namespace internal {
|
|
|
|
|
|
|
|
|
|
// We could specialize further for 32-bit integers.
|
|
|
|
|
simdjson_really_inline int int_log2(uint32_t x) { return (63 - leading_zeroes(x | 1)); }
|
|
|
|
|
|
|
|
|
|
simdjson_really_inline int fast_digit_count(uint32_t x) {
|
|
|
|
|
template <typename number_type, typename = typename std::enable_if<
|
|
|
|
|
std::is_unsigned<number_type>::value>::type>
|
|
|
|
|
simdjson_really_inline int int_log2(number_type x) { return 63 - leading_zeroes(uint64_t(x) | 1); }
|
|
|
|
|
|
|
|
|
|
simdjson_really_inline int fast_digit_count_32(uint32_t x) {
|
|
|
|
|
static uint64_t table[] = {
|
|
|
|
|
4294967296, 8589934582, 8589934582, 8589934582, 12884901788,
|
|
|
|
|
12884901788, 12884901788, 17179868184, 17179868184, 17179868184,
|
|
|
|
@@ -45360,9 +45362,8 @@ simdjson_really_inline int fast_digit_count(uint32_t x) {
|
|
|
|
|
return uint32_t((x + table[int_log2(x)]) >> 32);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
simdjson_really_inline int int_log2(uint64_t x) { return 63 - leading_zeroes(x | 1); }
|
|
|
|
|
|
|
|
|
|
simdjson_really_inline int fast_digit_count(uint64_t x) {
|
|
|
|
|
simdjson_really_inline int fast_digit_count_64(uint64_t x) {
|
|
|
|
|
static uint64_t table[] = {9,
|
|
|
|
|
99,
|
|
|
|
|
999,
|
|
|
|
@@ -45393,7 +45394,11 @@ simdjson_really_inline size_t digit_count(number_type v) noexcept {
|
|
|
|
|
static_assert(sizeof(number_type) == 8 || sizeof(number_type) == 4 ||
|
|
|
|
|
sizeof(number_type) == 2 || sizeof(number_type) == 1,
|
|
|
|
|
"We only support 8-bit, 16-bit, 32-bit and 64-bit numbers");
|
|
|
|
|
return fast_digit_count(v);
|
|
|
|
|
SIMDJSON_IF_CONSTEXPR(sizeof(number_type) <= 4) {
|
|
|
|
|
return fast_digit_count_32(static_cast<uint32_t>(v));
|
|
|
|
|
} else {
|
|
|
|
|
return fast_digit_count_64(static_cast<uint64_t>(v));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
static const char decimal_table[200] = {
|
|
|
|
|
0x30, 0x30, 0x30, 0x31, 0x30, 0x32, 0x30, 0x33, 0x30, 0x34, 0x30, 0x35,
|
|
|
|
@@ -51927,7 +51932,7 @@ error_code tag_invoke(deserialize_tag, ValT &val, T &out) noexcept {
|
|
|
|
|
}
|
|
|
|
|
error_code e = simdjson::SUCCESS;
|
|
|
|
|
template for (constexpr auto mem : std::define_static_array(std::meta::nonstatic_data_members_of(^^T, std::meta::access_context::unchecked()))) {
|
|
|
|
|
if constexpr (!std::meta::is_const(mem) && std::meta::is_public(mem)) {
|
|
|
|
|
if constexpr (!std::meta::is_const(mem) && std::meta::is_public(mem)) {
|
|
|
|
|
constexpr std::string_view key = std::define_static_string(std::meta::identifier_of(mem));
|
|
|
|
|
// Note: removed static assert as optional types are now handled generically
|
|
|
|
|
// as long we are succesful or the field is not found, we continue
|
|
|
|
@@ -58304,10 +58309,12 @@ simdjson_inline void string_builder::clear() noexcept {
|
|
|
|
|
|
|
|
|
|
namespace internal {
|
|
|
|
|
|
|
|
|
|
// We could specialize further for 32-bit integers.
|
|
|
|
|
simdjson_really_inline int int_log2(uint32_t x) { return (63 - leading_zeroes(x | 1)); }
|
|
|
|
|
|
|
|
|
|
simdjson_really_inline int fast_digit_count(uint32_t x) {
|
|
|
|
|
template <typename number_type, typename = typename std::enable_if<
|
|
|
|
|
std::is_unsigned<number_type>::value>::type>
|
|
|
|
|
simdjson_really_inline int int_log2(number_type x) { return 63 - leading_zeroes(uint64_t(x) | 1); }
|
|
|
|
|
|
|
|
|
|
simdjson_really_inline int fast_digit_count_32(uint32_t x) {
|
|
|
|
|
static uint64_t table[] = {
|
|
|
|
|
4294967296, 8589934582, 8589934582, 8589934582, 12884901788,
|
|
|
|
|
12884901788, 12884901788, 17179868184, 17179868184, 17179868184,
|
|
|
|
@@ -58319,9 +58326,8 @@ simdjson_really_inline int fast_digit_count(uint32_t x) {
|
|
|
|
|
return uint32_t((x + table[int_log2(x)]) >> 32);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
simdjson_really_inline int int_log2(uint64_t x) { return 63 - leading_zeroes(x | 1); }
|
|
|
|
|
|
|
|
|
|
simdjson_really_inline int fast_digit_count(uint64_t x) {
|
|
|
|
|
simdjson_really_inline int fast_digit_count_64(uint64_t x) {
|
|
|
|
|
static uint64_t table[] = {9,
|
|
|
|
|
99,
|
|
|
|
|
999,
|
|
|
|
@@ -58352,7 +58358,11 @@ simdjson_really_inline size_t digit_count(number_type v) noexcept {
|
|
|
|
|
static_assert(sizeof(number_type) == 8 || sizeof(number_type) == 4 ||
|
|
|
|
|
sizeof(number_type) == 2 || sizeof(number_type) == 1,
|
|
|
|
|
"We only support 8-bit, 16-bit, 32-bit and 64-bit numbers");
|
|
|
|
|
return fast_digit_count(v);
|
|
|
|
|
SIMDJSON_IF_CONSTEXPR(sizeof(number_type) <= 4) {
|
|
|
|
|
return fast_digit_count_32(static_cast<uint32_t>(v));
|
|
|
|
|
} else {
|
|
|
|
|
return fast_digit_count_64(static_cast<uint64_t>(v));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
static const char decimal_table[200] = {
|
|
|
|
|
0x30, 0x30, 0x30, 0x31, 0x30, 0x32, 0x30, 0x33, 0x30, 0x34, 0x30, 0x35,
|
|
|
|
@@ -65385,7 +65395,7 @@ error_code tag_invoke(deserialize_tag, ValT &val, T &out) noexcept {
|
|
|
|
|
}
|
|
|
|
|
error_code e = simdjson::SUCCESS;
|
|
|
|
|
template for (constexpr auto mem : std::define_static_array(std::meta::nonstatic_data_members_of(^^T, std::meta::access_context::unchecked()))) {
|
|
|
|
|
if constexpr (!std::meta::is_const(mem) && std::meta::is_public(mem)) {
|
|
|
|
|
if constexpr (!std::meta::is_const(mem) && std::meta::is_public(mem)) {
|
|
|
|
|
constexpr std::string_view key = std::define_static_string(std::meta::identifier_of(mem));
|
|
|
|
|
// Note: removed static assert as optional types are now handled generically
|
|
|
|
|
// as long we are succesful or the field is not found, we continue
|
|
|
|
@@ -71762,10 +71772,12 @@ simdjson_inline void string_builder::clear() noexcept {
|
|
|
|
|
|
|
|
|
|
namespace internal {
|
|
|
|
|
|
|
|
|
|
// We could specialize further for 32-bit integers.
|
|
|
|
|
simdjson_really_inline int int_log2(uint32_t x) { return (63 - leading_zeroes(x | 1)); }
|
|
|
|
|
|
|
|
|
|
simdjson_really_inline int fast_digit_count(uint32_t x) {
|
|
|
|
|
template <typename number_type, typename = typename std::enable_if<
|
|
|
|
|
std::is_unsigned<number_type>::value>::type>
|
|
|
|
|
simdjson_really_inline int int_log2(number_type x) { return 63 - leading_zeroes(uint64_t(x) | 1); }
|
|
|
|
|
|
|
|
|
|
simdjson_really_inline int fast_digit_count_32(uint32_t x) {
|
|
|
|
|
static uint64_t table[] = {
|
|
|
|
|
4294967296, 8589934582, 8589934582, 8589934582, 12884901788,
|
|
|
|
|
12884901788, 12884901788, 17179868184, 17179868184, 17179868184,
|
|
|
|
@@ -71777,9 +71789,8 @@ simdjson_really_inline int fast_digit_count(uint32_t x) {
|
|
|
|
|
return uint32_t((x + table[int_log2(x)]) >> 32);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
simdjson_really_inline int int_log2(uint64_t x) { return 63 - leading_zeroes(x | 1); }
|
|
|
|
|
|
|
|
|
|
simdjson_really_inline int fast_digit_count(uint64_t x) {
|
|
|
|
|
simdjson_really_inline int fast_digit_count_64(uint64_t x) {
|
|
|
|
|
static uint64_t table[] = {9,
|
|
|
|
|
99,
|
|
|
|
|
999,
|
|
|
|
@@ -71810,7 +71821,11 @@ simdjson_really_inline size_t digit_count(number_type v) noexcept {
|
|
|
|
|
static_assert(sizeof(number_type) == 8 || sizeof(number_type) == 4 ||
|
|
|
|
|
sizeof(number_type) == 2 || sizeof(number_type) == 1,
|
|
|
|
|
"We only support 8-bit, 16-bit, 32-bit and 64-bit numbers");
|
|
|
|
|
return fast_digit_count(v);
|
|
|
|
|
SIMDJSON_IF_CONSTEXPR(sizeof(number_type) <= 4) {
|
|
|
|
|
return fast_digit_count_32(static_cast<uint32_t>(v));
|
|
|
|
|
} else {
|
|
|
|
|
return fast_digit_count_64(static_cast<uint64_t>(v));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
static const char decimal_table[200] = {
|
|
|
|
|
0x30, 0x30, 0x30, 0x31, 0x30, 0x32, 0x30, 0x33, 0x30, 0x34, 0x30, 0x35,
|
|
|
|
@@ -78843,7 +78858,7 @@ error_code tag_invoke(deserialize_tag, ValT &val, T &out) noexcept {
|
|
|
|
|
}
|
|
|
|
|
error_code e = simdjson::SUCCESS;
|
|
|
|
|
template for (constexpr auto mem : std::define_static_array(std::meta::nonstatic_data_members_of(^^T, std::meta::access_context::unchecked()))) {
|
|
|
|
|
if constexpr (!std::meta::is_const(mem) && std::meta::is_public(mem)) {
|
|
|
|
|
if constexpr (!std::meta::is_const(mem) && std::meta::is_public(mem)) {
|
|
|
|
|
constexpr std::string_view key = std::define_static_string(std::meta::identifier_of(mem));
|
|
|
|
|
// Note: removed static assert as optional types are now handled generically
|
|
|
|
|
// as long we are succesful or the field is not found, we continue
|
|
|
|
@@ -85220,10 +85235,12 @@ simdjson_inline void string_builder::clear() noexcept {
|
|
|
|
|
|
|
|
|
|
namespace internal {
|
|
|
|
|
|
|
|
|
|
// We could specialize further for 32-bit integers.
|
|
|
|
|
simdjson_really_inline int int_log2(uint32_t x) { return (63 - leading_zeroes(x | 1)); }
|
|
|
|
|
|
|
|
|
|
simdjson_really_inline int fast_digit_count(uint32_t x) {
|
|
|
|
|
template <typename number_type, typename = typename std::enable_if<
|
|
|
|
|
std::is_unsigned<number_type>::value>::type>
|
|
|
|
|
simdjson_really_inline int int_log2(number_type x) { return 63 - leading_zeroes(uint64_t(x) | 1); }
|
|
|
|
|
|
|
|
|
|
simdjson_really_inline int fast_digit_count_32(uint32_t x) {
|
|
|
|
|
static uint64_t table[] = {
|
|
|
|
|
4294967296, 8589934582, 8589934582, 8589934582, 12884901788,
|
|
|
|
|
12884901788, 12884901788, 17179868184, 17179868184, 17179868184,
|
|
|
|
@@ -85235,9 +85252,8 @@ simdjson_really_inline int fast_digit_count(uint32_t x) {
|
|
|
|
|
return uint32_t((x + table[int_log2(x)]) >> 32);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
simdjson_really_inline int int_log2(uint64_t x) { return 63 - leading_zeroes(x | 1); }
|
|
|
|
|
|
|
|
|
|
simdjson_really_inline int fast_digit_count(uint64_t x) {
|
|
|
|
|
simdjson_really_inline int fast_digit_count_64(uint64_t x) {
|
|
|
|
|
static uint64_t table[] = {9,
|
|
|
|
|
99,
|
|
|
|
|
999,
|
|
|
|
@@ -85268,7 +85284,11 @@ simdjson_really_inline size_t digit_count(number_type v) noexcept {
|
|
|
|
|
static_assert(sizeof(number_type) == 8 || sizeof(number_type) == 4 ||
|
|
|
|
|
sizeof(number_type) == 2 || sizeof(number_type) == 1,
|
|
|
|
|
"We only support 8-bit, 16-bit, 32-bit and 64-bit numbers");
|
|
|
|
|
return fast_digit_count(v);
|
|
|
|
|
SIMDJSON_IF_CONSTEXPR(sizeof(number_type) <= 4) {
|
|
|
|
|
return fast_digit_count_32(static_cast<uint32_t>(v));
|
|
|
|
|
} else {
|
|
|
|
|
return fast_digit_count_64(static_cast<uint64_t>(v));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
static const char decimal_table[200] = {
|
|
|
|
|
0x30, 0x30, 0x30, 0x31, 0x30, 0x32, 0x30, 0x33, 0x30, 0x34, 0x30, 0x35,
|
|
|
|
@@ -92416,7 +92436,7 @@ error_code tag_invoke(deserialize_tag, ValT &val, T &out) noexcept {
|
|
|
|
|
}
|
|
|
|
|
error_code e = simdjson::SUCCESS;
|
|
|
|
|
template for (constexpr auto mem : std::define_static_array(std::meta::nonstatic_data_members_of(^^T, std::meta::access_context::unchecked()))) {
|
|
|
|
|
if constexpr (!std::meta::is_const(mem) && std::meta::is_public(mem)) {
|
|
|
|
|
if constexpr (!std::meta::is_const(mem) && std::meta::is_public(mem)) {
|
|
|
|
|
constexpr std::string_view key = std::define_static_string(std::meta::identifier_of(mem));
|
|
|
|
|
// Note: removed static assert as optional types are now handled generically
|
|
|
|
|
// as long we are succesful or the field is not found, we continue
|
|
|
|
@@ -98793,10 +98813,12 @@ simdjson_inline void string_builder::clear() noexcept {
|
|
|
|
|
|
|
|
|
|
namespace internal {
|
|
|
|
|
|
|
|
|
|
// We could specialize further for 32-bit integers.
|
|
|
|
|
simdjson_really_inline int int_log2(uint32_t x) { return (63 - leading_zeroes(x | 1)); }
|
|
|
|
|
|
|
|
|
|
simdjson_really_inline int fast_digit_count(uint32_t x) {
|
|
|
|
|
template <typename number_type, typename = typename std::enable_if<
|
|
|
|
|
std::is_unsigned<number_type>::value>::type>
|
|
|
|
|
simdjson_really_inline int int_log2(number_type x) { return 63 - leading_zeroes(uint64_t(x) | 1); }
|
|
|
|
|
|
|
|
|
|
simdjson_really_inline int fast_digit_count_32(uint32_t x) {
|
|
|
|
|
static uint64_t table[] = {
|
|
|
|
|
4294967296, 8589934582, 8589934582, 8589934582, 12884901788,
|
|
|
|
|
12884901788, 12884901788, 17179868184, 17179868184, 17179868184,
|
|
|
|
@@ -98808,9 +98830,8 @@ simdjson_really_inline int fast_digit_count(uint32_t x) {
|
|
|
|
|
return uint32_t((x + table[int_log2(x)]) >> 32);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
simdjson_really_inline int int_log2(uint64_t x) { return 63 - leading_zeroes(x | 1); }
|
|
|
|
|
|
|
|
|
|
simdjson_really_inline int fast_digit_count(uint64_t x) {
|
|
|
|
|
simdjson_really_inline int fast_digit_count_64(uint64_t x) {
|
|
|
|
|
static uint64_t table[] = {9,
|
|
|
|
|
99,
|
|
|
|
|
999,
|
|
|
|
@@ -98841,7 +98862,11 @@ simdjson_really_inline size_t digit_count(number_type v) noexcept {
|
|
|
|
|
static_assert(sizeof(number_type) == 8 || sizeof(number_type) == 4 ||
|
|
|
|
|
sizeof(number_type) == 2 || sizeof(number_type) == 1,
|
|
|
|
|
"We only support 8-bit, 16-bit, 32-bit and 64-bit numbers");
|
|
|
|
|
return fast_digit_count(v);
|
|
|
|
|
SIMDJSON_IF_CONSTEXPR(sizeof(number_type) <= 4) {
|
|
|
|
|
return fast_digit_count_32(static_cast<uint32_t>(v));
|
|
|
|
|
} else {
|
|
|
|
|
return fast_digit_count_64(static_cast<uint64_t>(v));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
static const char decimal_table[200] = {
|
|
|
|
|
0x30, 0x30, 0x30, 0x31, 0x30, 0x32, 0x30, 0x33, 0x30, 0x34, 0x30, 0x35,
|
|
|
|
@@ -106305,7 +106330,7 @@ error_code tag_invoke(deserialize_tag, ValT &val, T &out) noexcept {
|
|
|
|
|
}
|
|
|
|
|
error_code e = simdjson::SUCCESS;
|
|
|
|
|
template for (constexpr auto mem : std::define_static_array(std::meta::nonstatic_data_members_of(^^T, std::meta::access_context::unchecked()))) {
|
|
|
|
|
if constexpr (!std::meta::is_const(mem) && std::meta::is_public(mem)) {
|
|
|
|
|
if constexpr (!std::meta::is_const(mem) && std::meta::is_public(mem)) {
|
|
|
|
|
constexpr std::string_view key = std::define_static_string(std::meta::identifier_of(mem));
|
|
|
|
|
// Note: removed static assert as optional types are now handled generically
|
|
|
|
|
// as long we are succesful or the field is not found, we continue
|
|
|
|
@@ -112682,10 +112707,12 @@ simdjson_inline void string_builder::clear() noexcept {
|
|
|
|
|
|
|
|
|
|
namespace internal {
|
|
|
|
|
|
|
|
|
|
// We could specialize further for 32-bit integers.
|
|
|
|
|
simdjson_really_inline int int_log2(uint32_t x) { return (63 - leading_zeroes(x | 1)); }
|
|
|
|
|
|
|
|
|
|
simdjson_really_inline int fast_digit_count(uint32_t x) {
|
|
|
|
|
template <typename number_type, typename = typename std::enable_if<
|
|
|
|
|
std::is_unsigned<number_type>::value>::type>
|
|
|
|
|
simdjson_really_inline int int_log2(number_type x) { return 63 - leading_zeroes(uint64_t(x) | 1); }
|
|
|
|
|
|
|
|
|
|
simdjson_really_inline int fast_digit_count_32(uint32_t x) {
|
|
|
|
|
static uint64_t table[] = {
|
|
|
|
|
4294967296, 8589934582, 8589934582, 8589934582, 12884901788,
|
|
|
|
|
12884901788, 12884901788, 17179868184, 17179868184, 17179868184,
|
|
|
|
@@ -112697,9 +112724,8 @@ simdjson_really_inline int fast_digit_count(uint32_t x) {
|
|
|
|
|
return uint32_t((x + table[int_log2(x)]) >> 32);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
simdjson_really_inline int int_log2(uint64_t x) { return 63 - leading_zeroes(x | 1); }
|
|
|
|
|
|
|
|
|
|
simdjson_really_inline int fast_digit_count(uint64_t x) {
|
|
|
|
|
simdjson_really_inline int fast_digit_count_64(uint64_t x) {
|
|
|
|
|
static uint64_t table[] = {9,
|
|
|
|
|
99,
|
|
|
|
|
999,
|
|
|
|
@@ -112730,7 +112756,11 @@ simdjson_really_inline size_t digit_count(number_type v) noexcept {
|
|
|
|
|
static_assert(sizeof(number_type) == 8 || sizeof(number_type) == 4 ||
|
|
|
|
|
sizeof(number_type) == 2 || sizeof(number_type) == 1,
|
|
|
|
|
"We only support 8-bit, 16-bit, 32-bit and 64-bit numbers");
|
|
|
|
|
return fast_digit_count(v);
|
|
|
|
|
SIMDJSON_IF_CONSTEXPR(sizeof(number_type) <= 4) {
|
|
|
|
|
return fast_digit_count_32(static_cast<uint32_t>(v));
|
|
|
|
|
} else {
|
|
|
|
|
return fast_digit_count_64(static_cast<uint64_t>(v));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
static const char decimal_table[200] = {
|
|
|
|
|
0x30, 0x30, 0x30, 0x31, 0x30, 0x32, 0x30, 0x33, 0x30, 0x34, 0x30, 0x35,
|
|
|
|
@@ -119671,7 +119701,7 @@ error_code tag_invoke(deserialize_tag, ValT &val, T &out) noexcept {
|
|
|
|
|
}
|
|
|
|
|
error_code e = simdjson::SUCCESS;
|
|
|
|
|
template for (constexpr auto mem : std::define_static_array(std::meta::nonstatic_data_members_of(^^T, std::meta::access_context::unchecked()))) {
|
|
|
|
|
if constexpr (!std::meta::is_const(mem) && std::meta::is_public(mem)) {
|
|
|
|
|
if constexpr (!std::meta::is_const(mem) && std::meta::is_public(mem)) {
|
|
|
|
|
constexpr std::string_view key = std::define_static_string(std::meta::identifier_of(mem));
|
|
|
|
|
// Note: removed static assert as optional types are now handled generically
|
|
|
|
|
// as long we are succesful or the field is not found, we continue
|
|
|
|
@@ -126048,10 +126078,12 @@ simdjson_inline void string_builder::clear() noexcept {
|
|
|
|
|
|
|
|
|
|
namespace internal {
|
|
|
|
|
|
|
|
|
|
// We could specialize further for 32-bit integers.
|
|
|
|
|
simdjson_really_inline int int_log2(uint32_t x) { return (63 - leading_zeroes(x | 1)); }
|
|
|
|
|
|
|
|
|
|
simdjson_really_inline int fast_digit_count(uint32_t x) {
|
|
|
|
|
template <typename number_type, typename = typename std::enable_if<
|
|
|
|
|
std::is_unsigned<number_type>::value>::type>
|
|
|
|
|
simdjson_really_inline int int_log2(number_type x) { return 63 - leading_zeroes(uint64_t(x) | 1); }
|
|
|
|
|
|
|
|
|
|
simdjson_really_inline int fast_digit_count_32(uint32_t x) {
|
|
|
|
|
static uint64_t table[] = {
|
|
|
|
|
4294967296, 8589934582, 8589934582, 8589934582, 12884901788,
|
|
|
|
|
12884901788, 12884901788, 17179868184, 17179868184, 17179868184,
|
|
|
|
@@ -126063,9 +126095,8 @@ simdjson_really_inline int fast_digit_count(uint32_t x) {
|
|
|
|
|
return uint32_t((x + table[int_log2(x)]) >> 32);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
simdjson_really_inline int int_log2(uint64_t x) { return 63 - leading_zeroes(x | 1); }
|
|
|
|
|
|
|
|
|
|
simdjson_really_inline int fast_digit_count(uint64_t x) {
|
|
|
|
|
simdjson_really_inline int fast_digit_count_64(uint64_t x) {
|
|
|
|
|
static uint64_t table[] = {9,
|
|
|
|
|
99,
|
|
|
|
|
999,
|
|
|
|
@@ -126096,7 +126127,11 @@ simdjson_really_inline size_t digit_count(number_type v) noexcept {
|
|
|
|
|
static_assert(sizeof(number_type) == 8 || sizeof(number_type) == 4 ||
|
|
|
|
|
sizeof(number_type) == 2 || sizeof(number_type) == 1,
|
|
|
|
|
"We only support 8-bit, 16-bit, 32-bit and 64-bit numbers");
|
|
|
|
|
return fast_digit_count(v);
|
|
|
|
|
SIMDJSON_IF_CONSTEXPR(sizeof(number_type) <= 4) {
|
|
|
|
|
return fast_digit_count_32(static_cast<uint32_t>(v));
|
|
|
|
|
} else {
|
|
|
|
|
return fast_digit_count_64(static_cast<uint64_t>(v));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
static const char decimal_table[200] = {
|
|
|
|
|
0x30, 0x30, 0x30, 0x31, 0x30, 0x32, 0x30, 0x33, 0x30, 0x34, 0x30, 0x35,
|
|
|
|
@@ -133050,7 +133085,7 @@ error_code tag_invoke(deserialize_tag, ValT &val, T &out) noexcept {
|
|
|
|
|
}
|
|
|
|
|
error_code e = simdjson::SUCCESS;
|
|
|
|
|
template for (constexpr auto mem : std::define_static_array(std::meta::nonstatic_data_members_of(^^T, std::meta::access_context::unchecked()))) {
|
|
|
|
|
if constexpr (!std::meta::is_const(mem) && std::meta::is_public(mem)) {
|
|
|
|
|
if constexpr (!std::meta::is_const(mem) && std::meta::is_public(mem)) {
|
|
|
|
|
constexpr std::string_view key = std::define_static_string(std::meta::identifier_of(mem));
|
|
|
|
|
// Note: removed static assert as optional types are now handled generically
|
|
|
|
|
// as long we are succesful or the field is not found, we continue
|
|
|
|
@@ -139427,10 +139462,12 @@ simdjson_inline void string_builder::clear() noexcept {
|
|
|
|
|
|
|
|
|
|
namespace internal {
|
|
|
|
|
|
|
|
|
|
// We could specialize further for 32-bit integers.
|
|
|
|
|
simdjson_really_inline int int_log2(uint32_t x) { return (63 - leading_zeroes(x | 1)); }
|
|
|
|
|
|
|
|
|
|
simdjson_really_inline int fast_digit_count(uint32_t x) {
|
|
|
|
|
template <typename number_type, typename = typename std::enable_if<
|
|
|
|
|
std::is_unsigned<number_type>::value>::type>
|
|
|
|
|
simdjson_really_inline int int_log2(number_type x) { return 63 - leading_zeroes(uint64_t(x) | 1); }
|
|
|
|
|
|
|
|
|
|
simdjson_really_inline int fast_digit_count_32(uint32_t x) {
|
|
|
|
|
static uint64_t table[] = {
|
|
|
|
|
4294967296, 8589934582, 8589934582, 8589934582, 12884901788,
|
|
|
|
|
12884901788, 12884901788, 17179868184, 17179868184, 17179868184,
|
|
|
|
@@ -139442,9 +139479,8 @@ simdjson_really_inline int fast_digit_count(uint32_t x) {
|
|
|
|
|
return uint32_t((x + table[int_log2(x)]) >> 32);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
simdjson_really_inline int int_log2(uint64_t x) { return 63 - leading_zeroes(x | 1); }
|
|
|
|
|
|
|
|
|
|
simdjson_really_inline int fast_digit_count(uint64_t x) {
|
|
|
|
|
simdjson_really_inline int fast_digit_count_64(uint64_t x) {
|
|
|
|
|
static uint64_t table[] = {9,
|
|
|
|
|
99,
|
|
|
|
|
999,
|
|
|
|
@@ -139475,7 +139511,11 @@ simdjson_really_inline size_t digit_count(number_type v) noexcept {
|
|
|
|
|
static_assert(sizeof(number_type) == 8 || sizeof(number_type) == 4 ||
|
|
|
|
|
sizeof(number_type) == 2 || sizeof(number_type) == 1,
|
|
|
|
|
"We only support 8-bit, 16-bit, 32-bit and 64-bit numbers");
|
|
|
|
|
return fast_digit_count(v);
|
|
|
|
|
SIMDJSON_IF_CONSTEXPR(sizeof(number_type) <= 4) {
|
|
|
|
|
return fast_digit_count_32(static_cast<uint32_t>(v));
|
|
|
|
|
} else {
|
|
|
|
|
return fast_digit_count_64(static_cast<uint64_t>(v));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
static const char decimal_table[200] = {
|
|
|
|
|
0x30, 0x30, 0x30, 0x31, 0x30, 0x32, 0x30, 0x33, 0x30, 0x34, 0x30, 0x35,
|
|
|
|
@@ -140244,6 +140284,11 @@ struct to_adaptor {
|
|
|
|
|
T operator()(simdjson_result<ondemand::value> &val) const noexcept;
|
|
|
|
|
auto operator()(padded_string_view const str) const noexcept;
|
|
|
|
|
auto operator()(ondemand::parser &parser, padded_string_view const str) const noexcept;
|
|
|
|
|
// The std::string is padded with reserve to ensure there is enough space for padding.
|
|
|
|
|
// Some sanitizers may not like this, so you can use simdjson::pad instead.
|
|
|
|
|
// simdjson::from(simdjson::pad(str))
|
|
|
|
|
auto operator()(std::string str) const noexcept;
|
|
|
|
|
auto operator()(ondemand::parser &parser, std::string str) const noexcept;
|
|
|
|
|
};
|
|
|
|
|
} // namespace internal
|
|
|
|
|
} // namespace convert
|
|
|
|
@@ -140402,6 +140447,16 @@ template <typename T>
|
|
|
|
|
inline auto to_adaptor<T>::operator()(ondemand::parser &parser, padded_string_view const str) const noexcept {
|
|
|
|
|
return auto_parser<ondemand::parser *>{parser, str};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <typename T>
|
|
|
|
|
inline auto to_adaptor<T>::operator()(std::string str) const noexcept {
|
|
|
|
|
return auto_parser{pad_with_reserve(str)};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <typename T>
|
|
|
|
|
inline auto to_adaptor<T>::operator()(ondemand::parser &parser, std::string str) const noexcept {
|
|
|
|
|
return auto_parser<ondemand::parser *>{parser, pad_with_reserve(str)};
|
|
|
|
|
}
|
|
|
|
|
} // namespace internal
|
|
|
|
|
} // namespace convert
|
|
|
|
|
} // namespace simdjson
|
|
|
|
|