aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/simdjson/src/generic/json_character_block.h
diff options
context:
space:
mode:
authorAlexander Smirnov <alex@ydb.tech>2024-10-03 14:09:02 +0000
committerAlexander Smirnov <alex@ydb.tech>2024-10-03 14:09:02 +0000
commit812d97f62befea9d9b47a410d28548ef9f274510 (patch)
treed52031e2d62a9e7e9c25c43bb564dce30368e780 /contrib/libs/simdjson/src/generic/json_character_block.h
parent1e9cd6bece572c59f55fdcf55c68b9c48e5aa6da (diff)
parentd7525e0eec8e7242a5cedd5fbdaf3bdaaeea02c7 (diff)
downloadydb-812d97f62befea9d9b47a410d28548ef9f274510.tar.gz
Merge branch 'rightlib' into mergelibs-241003-1407
Diffstat (limited to 'contrib/libs/simdjson/src/generic/json_character_block.h')
-rw-r--r--contrib/libs/simdjson/src/generic/json_character_block.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/contrib/libs/simdjson/src/generic/json_character_block.h b/contrib/libs/simdjson/src/generic/json_character_block.h
new file mode 100644
index 0000000000..7cce34c83b
--- /dev/null
+++ b/contrib/libs/simdjson/src/generic/json_character_block.h
@@ -0,0 +1,27 @@
+#ifndef SIMDJSON_SRC_GENERIC_JSON_CHARACTER_BLOCK_H
+
+#ifndef SIMDJSON_CONDITIONAL_INCLUDE
+#define SIMDJSON_SRC_GENERIC_JSON_CHARACTER_BLOCK_H
+#include <generic/base.h>
+#endif // SIMDJSON_CONDITIONAL_INCLUDE
+
+namespace simdjson {
+namespace SIMDJSON_IMPLEMENTATION {
+namespace {
+
+struct json_character_block {
+ static simdjson_inline json_character_block classify(const simd::simd8x64<uint8_t>& in);
+
+ simdjson_inline uint64_t whitespace() const noexcept { return _whitespace; }
+ simdjson_inline uint64_t op() const noexcept { return _op; }
+ simdjson_inline uint64_t scalar() const noexcept { return ~(op() | whitespace()); }
+
+ uint64_t _whitespace;
+ uint64_t _op;
+};
+
+} // unnamed namespace
+} // namespace SIMDJSON_IMPLEMENTATION
+} // namespace simdjson
+
+#endif // SIMDJSON_SRC_GENERIC_JSON_CHARACTER_BLOCK_H \ No newline at end of file