From 9bbfd5804ea97878af7a6db44f151227544381a3 Mon Sep 17 00:00:00 2001 From: John Keiser Date: Tue, 8 Sep 2020 13:08:27 -0700 Subject: [PATCH] Put haswell/westmere/fallback/amd64 in simdjson namespace --- src/arm64/bitmanipulation.h | 2 ++ src/arm64/bitmask.h | 2 ++ src/arm64/dom_parser_implementation.cpp | 4 ++++ src/arm64/implementation.cpp | 2 ++ src/arm64/implementation.h | 2 ++ src/arm64/numberparsing.h | 2 ++ src/arm64/simd.h | 2 ++ src/arm64/stringparsing.h | 2 ++ src/fallback/bitmanipulation.h | 2 ++ src/fallback/dom_parser_implementation.cpp | 4 ++++ src/fallback/implementation.cpp | 2 ++ src/fallback/implementation.h | 2 ++ src/fallback/numberparsing.h | 2 ++ src/fallback/stringparsing.h | 2 ++ src/generic/dom_parser_implementation.h | 4 ++++ src/generic/implementation_simdjson_result_base-inl.h | 4 +++- src/generic/implementation_simdjson_result_base.h | 4 +++- src/generic/ondemand/array-inl.h | 2 ++ src/generic/ondemand/array.h | 2 ++ src/generic/ondemand/array_iterator-inl.h | 2 ++ src/generic/ondemand/array_iterator.h | 2 ++ src/generic/ondemand/document-inl.h | 2 ++ src/generic/ondemand/document.h | 2 ++ src/generic/ondemand/field-inl.h | 2 ++ src/generic/ondemand/field.h | 2 ++ src/generic/ondemand/json_iterator-inl.h | 2 ++ src/generic/ondemand/json_iterator.h | 2 ++ src/generic/ondemand/logger-inl.h | 2 ++ src/generic/ondemand/logger.h | 2 ++ src/generic/ondemand/object-inl.h | 2 ++ src/generic/ondemand/object.h | 2 ++ src/generic/ondemand/object_iterator-inl.h | 2 ++ src/generic/ondemand/object_iterator.h | 2 ++ src/generic/ondemand/parser-inl.h | 2 ++ src/generic/ondemand/parser.h | 2 ++ src/generic/ondemand/raw_json_string-inl.h | 2 ++ src/generic/ondemand/raw_json_string.h | 2 ++ src/generic/ondemand/token_iterator-inl.h | 2 ++ src/generic/ondemand/token_iterator.h | 2 ++ src/generic/ondemand/value-inl.h | 2 ++ src/generic/ondemand/value.h | 2 ++ src/generic/stage1/allocate.h | 2 ++ src/generic/stage1/buf_block_reader.h | 2 ++ src/generic/stage1/find_next_document_index.h | 2 ++ src/generic/stage1/json_minifier.h | 2 ++ src/generic/stage1/json_scanner.h | 2 ++ src/generic/stage1/json_string_scanner.h | 2 ++ src/generic/stage1/json_structural_indexer.h | 2 ++ src/generic/stage1/utf8_fastvalidate_algorithm.h | 2 ++ src/generic/stage1/utf8_lookup2_algorithm.h | 2 ++ src/generic/stage1/utf8_lookup3_algorithm.h | 2 ++ src/generic/stage1/utf8_lookup4_algorithm.h | 2 ++ src/generic/stage1/utf8_lookup_algorithm.h | 2 ++ src/generic/stage1/utf8_range_algorithm.h | 2 ++ src/generic/stage1/utf8_validator.h | 2 ++ src/generic/stage1/utf8_zwegner_algorithm.h | 2 ++ src/generic/stage2/allocate.h | 2 ++ src/generic/stage2/atomparsing.h | 2 ++ src/generic/stage2/json_iterator.h | 2 ++ src/generic/stage2/jsoncharutils.h | 2 ++ src/generic/stage2/logger.h | 2 ++ src/generic/stage2/numberparsing.h | 2 ++ src/generic/stage2/stringparsing.h | 2 ++ src/generic/stage2/structural_iterator.h | 2 ++ src/generic/stage2/tape_builder.h | 2 ++ src/generic/stage2/tape_writer.h | 2 ++ src/haswell/bitmanipulation.h | 2 ++ src/haswell/bitmask.h | 2 ++ src/haswell/dom_parser_implementation.cpp | 4 ++++ src/haswell/implementation.cpp | 2 ++ src/haswell/implementation.h | 2 ++ src/haswell/numberparsing.h | 2 ++ src/haswell/simd.h | 2 ++ src/haswell/stringparsing.h | 2 ++ src/westmere/bitmanipulation.h | 2 ++ src/westmere/bitmask.h | 2 ++ src/westmere/dom_parser_implementation.cpp | 4 ++++ src/westmere/implementation.cpp | 2 ++ src/westmere/implementation.h | 2 ++ src/westmere/numberparsing.h | 2 ++ src/westmere/simd.h | 2 ++ src/westmere/stringparsing.h | 2 ++ 82 files changed, 176 insertions(+), 2 deletions(-) diff --git a/src/arm64/bitmanipulation.h b/src/arm64/bitmanipulation.h index 6db28e77a..47216fcd3 100644 --- a/src/arm64/bitmanipulation.h +++ b/src/arm64/bitmanipulation.h @@ -1,6 +1,7 @@ #ifndef SIMDJSON_ARM64_BITMANIPULATION_H #define SIMDJSON_ARM64_BITMANIPULATION_H +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { @@ -57,5 +58,6 @@ simdjson_really_inline bool add_overflow(uint64_t value1, uint64_t value2, uint6 } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #endif // SIMDJSON_ARM64_BITMANIPULATION_H diff --git a/src/arm64/bitmask.h b/src/arm64/bitmask.h index 8b56ffe24..2d3e5c3be 100644 --- a/src/arm64/bitmask.h +++ b/src/arm64/bitmask.h @@ -1,6 +1,7 @@ #ifndef SIMDJSON_ARM64_BITMASK_H #define SIMDJSON_ARM64_BITMASK_H +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { @@ -34,6 +35,7 @@ simdjson_really_inline uint64_t prefix_xor(uint64_t bitmask) { } // namespace arm64 } // namespace simdjson +} // namespace simdjson SIMDJSON_UNTARGET_IMPLEMENTATION #endif diff --git a/src/arm64/dom_parser_implementation.cpp b/src/arm64/dom_parser_implementation.cpp index 9b7fb0eb1..2685cbac7 100644 --- a/src/arm64/dom_parser_implementation.cpp +++ b/src/arm64/dom_parser_implementation.cpp @@ -5,6 +5,7 @@ // // Stage 1 // +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { @@ -100,6 +101,7 @@ simdjson_really_inline simd8 must_be_2_3_continuation(const simd8 } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #include "generic/stage1/utf8_lookup4_algorithm.h" #include "generic/stage1/json_structural_indexer.h" @@ -116,6 +118,7 @@ simdjson_really_inline simd8 must_be_2_3_continuation(const simd8 // // Implementation-specific overrides // +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace stage1 { @@ -159,5 +162,6 @@ SIMDJSON_WARN_UNUSED error_code dom_parser_implementation::parse(const uint8_t * } } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #include "arm64/end_implementation.h" diff --git a/src/arm64/implementation.cpp b/src/arm64/implementation.cpp index c98a9d70b..0039c48af 100644 --- a/src/arm64/implementation.cpp +++ b/src/arm64/implementation.cpp @@ -1,6 +1,7 @@ #include "arm64/begin_implementation.h" #include "arm64/dom_parser_implementation.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { SIMDJSON_WARN_UNUSED error_code implementation::create_dom_parser_implementation( @@ -16,5 +17,6 @@ SIMDJSON_WARN_UNUSED error_code implementation::create_dom_parser_implementation } } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #include "arm64/end_implementation.h" \ No newline at end of file diff --git a/src/arm64/implementation.h b/src/arm64/implementation.h index 31ff3c48e..152055210 100644 --- a/src/arm64/implementation.h +++ b/src/arm64/implementation.h @@ -4,6 +4,7 @@ #include "simdjson.h" #include "isadetection.h" +namespace simdjson { namespace arm64 { using namespace simdjson; @@ -22,5 +23,6 @@ public: }; } // namespace arm64 +} // namespace simdjson #endif // SIMDJSON_ARM64_IMPLEMENTATION_H diff --git a/src/arm64/numberparsing.h b/src/arm64/numberparsing.h index 1ae5e64fb..21eaad9c3 100644 --- a/src/arm64/numberparsing.h +++ b/src/arm64/numberparsing.h @@ -1,6 +1,7 @@ #ifndef SIMDJSON_ARM64_NUMBERPARSING_H #define SIMDJSON_ARM64_NUMBERPARSING_H +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { @@ -16,6 +17,7 @@ static simdjson_really_inline uint32_t parse_eight_digits_unrolled(const uint8_t } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #define SWAR_NUMBER_PARSING diff --git a/src/arm64/simd.h b/src/arm64/simd.h index fd3daef09..fbc95f5af 100644 --- a/src/arm64/simd.h +++ b/src/arm64/simd.h @@ -7,6 +7,7 @@ #include +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace simd { @@ -486,5 +487,6 @@ simdjson_really_inline int8x16_t make_int8x16_t(int8_t x1, int8_t x2, int8_t x } // namespace simd } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #endif // SIMDJSON_ARM64_SIMD_H diff --git a/src/arm64/stringparsing.h b/src/arm64/stringparsing.h index d269bea89..5fa27eb64 100644 --- a/src/arm64/stringparsing.h +++ b/src/arm64/stringparsing.h @@ -5,6 +5,7 @@ #include "arm64/simd.h" #include "arm64/bitmanipulation.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { @@ -45,6 +46,7 @@ simdjson_really_inline backslash_and_quote backslash_and_quote::copy_and_find(co } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #include "generic/stage2/stringparsing.h" diff --git a/src/fallback/bitmanipulation.h b/src/fallback/bitmanipulation.h index ccfba1fc0..c0c8fea4a 100644 --- a/src/fallback/bitmanipulation.h +++ b/src/fallback/bitmanipulation.h @@ -4,6 +4,7 @@ #include "simdjson.h" #include +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { @@ -41,5 +42,6 @@ simdjson_really_inline int leading_zeroes(uint64_t input_num) { } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #endif // SIMDJSON_FALLBACK_BITMANIPULATION_H diff --git a/src/fallback/dom_parser_implementation.cpp b/src/fallback/dom_parser_implementation.cpp index 87e760b6f..fad6caf43 100644 --- a/src/fallback/dom_parser_implementation.cpp +++ b/src/fallback/dom_parser_implementation.cpp @@ -7,6 +7,7 @@ // #include "generic/stage1/find_next_document_index.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace stage1 { @@ -309,6 +310,7 @@ SIMDJSON_WARN_UNUSED bool implementation::validate_utf8(const char *buf, size_t } } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson // // Stage 2 @@ -317,6 +319,7 @@ SIMDJSON_WARN_UNUSED bool implementation::validate_utf8(const char *buf, size_t #include "fallback/numberparsing.h" #include "generic/stage2/tape_builder.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { SIMDJSON_WARN_UNUSED error_code dom_parser_implementation::stage2(dom::document &_doc) noexcept { @@ -334,5 +337,6 @@ SIMDJSON_WARN_UNUSED error_code dom_parser_implementation::parse(const uint8_t * } } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #include "fallback/end_implementation.h" \ No newline at end of file diff --git a/src/fallback/implementation.cpp b/src/fallback/implementation.cpp index 61954a2f4..cb503d11c 100644 --- a/src/fallback/implementation.cpp +++ b/src/fallback/implementation.cpp @@ -1,6 +1,7 @@ #include "fallback/begin_implementation.h" #include "fallback/dom_parser_implementation.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { SIMDJSON_WARN_UNUSED error_code implementation::create_dom_parser_implementation( @@ -16,5 +17,6 @@ SIMDJSON_WARN_UNUSED error_code implementation::create_dom_parser_implementation } } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #include "fallback/end_implementation.h" \ No newline at end of file diff --git a/src/fallback/implementation.h b/src/fallback/implementation.h index 4f4b56256..9bb2e8219 100644 --- a/src/fallback/implementation.h +++ b/src/fallback/implementation.h @@ -4,6 +4,7 @@ #include "simdjson.h" #include "isadetection.h" +namespace simdjson { namespace fallback { using namespace simdjson; @@ -26,5 +27,6 @@ public: }; } // namespace fallback +} // namespace simdjson #endif // SIMDJSON_FALLBACK_IMPLEMENTATION_H \ No newline at end of file diff --git a/src/fallback/numberparsing.h b/src/fallback/numberparsing.h index 44684c343..d9a0c32ed 100644 --- a/src/fallback/numberparsing.h +++ b/src/fallback/numberparsing.h @@ -8,6 +8,7 @@ void found_unsigned_integer(uint64_t result, const uint8_t *buf); void found_float(double result, const uint8_t *buf); #endif +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { static simdjson_really_inline uint32_t parse_eight_digits_unrolled(const char *chars) { @@ -23,6 +24,7 @@ static simdjson_really_inline uint32_t parse_eight_digits_unrolled(const uint8_t } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #define SWAR_NUMBER_PARSING #include "generic/stage2/numberparsing.h" diff --git a/src/fallback/stringparsing.h b/src/fallback/stringparsing.h index fca6d2791..2f06f94fb 100644 --- a/src/fallback/stringparsing.h +++ b/src/fallback/stringparsing.h @@ -3,6 +3,7 @@ #include "simdjson.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { @@ -28,6 +29,7 @@ simdjson_really_inline backslash_and_quote backslash_and_quote::copy_and_find(co } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #include "generic/stage2/stringparsing.h" diff --git a/src/generic/dom_parser_implementation.h b/src/generic/dom_parser_implementation.h index 5edc87f9b..9261c587b 100644 --- a/src/generic/dom_parser_implementation.h +++ b/src/generic/dom_parser_implementation.h @@ -1,6 +1,7 @@ #include "simdjson.h" #include "isadetection.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { // expectation: sizeof(open_container) = 64/8. @@ -40,10 +41,12 @@ public: }; } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #include "generic/stage1/allocate.h" #include "generic/stage2/allocate.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { inline dom_parser_implementation::dom_parser_implementation() noexcept = default; @@ -66,3 +69,4 @@ SIMDJSON_WARN_UNUSED error_code dom_parser_implementation::set_max_depth(size_t } } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/implementation_simdjson_result_base-inl.h b/src/generic/implementation_simdjson_result_base-inl.h index 54da4f00f..36a9e63e8 100644 --- a/src/generic/implementation_simdjson_result_base-inl.h +++ b/src/generic/implementation_simdjson_result_base-inl.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { // @@ -73,4 +74,5 @@ template simdjson_really_inline implementation_simdjson_result_base::implementation_simdjson_result_base() noexcept : implementation_simdjson_result_base(T{}, UNINITIALIZED) {} -} // namespace SIMDJSON_IMPLEMENTATION \ No newline at end of file +} // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson \ No newline at end of file diff --git a/src/generic/implementation_simdjson_result_base.h b/src/generic/implementation_simdjson_result_base.h index f2d2a2caf..9c7ac8ab7 100644 --- a/src/generic/implementation_simdjson_result_base.h +++ b/src/generic/implementation_simdjson_result_base.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { // This is a near copy of include/error.h's implementation_simdjson_result_base, except it doesn't use std::pair @@ -117,4 +118,5 @@ struct implementation_simdjson_result_base { error_code second; }; // struct implementation_simdjson_result_base -} // namespace SIMDJSON_IMPLEMENTATION \ No newline at end of file +} // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson \ No newline at end of file diff --git a/src/generic/ondemand/array-inl.h b/src/generic/ondemand/array-inl.h index c1aee6b5e..ad376079a 100644 --- a/src/generic/ondemand/array-inl.h +++ b/src/generic/ondemand/array-inl.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -72,6 +73,7 @@ simdjson_really_inline array_iterator array::end() & noexcept { } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/ondemand/array.h b/src/generic/ondemand/array.h index 39b6ed6d6..eb93aaa99 100644 --- a/src/generic/ondemand/array.h +++ b/src/generic/ondemand/array.h @@ -1,5 +1,6 @@ #include "simdjson/error.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -60,6 +61,7 @@ protected: } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/ondemand/array_iterator-inl.h b/src/generic/ondemand/array_iterator-inl.h index 0e1891900..cc9e07458 100644 --- a/src/generic/ondemand/array_iterator-inl.h +++ b/src/generic/ondemand/array_iterator-inl.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -22,6 +23,7 @@ simdjson_really_inline array_iterator &array_iterator::operator++() noexcept { } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/ondemand/array_iterator.h b/src/generic/ondemand/array_iterator.h index f157f70bc..0c1c0ad05 100644 --- a/src/generic/ondemand/array_iterator.h +++ b/src/generic/ondemand/array_iterator.h @@ -1,5 +1,6 @@ #include "simdjson/error.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -48,6 +49,7 @@ private: } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/ondemand/document-inl.h b/src/generic/ondemand/document-inl.h index d8f8627da..0c6bbfe69 100644 --- a/src/generic/ondemand/document-inl.h +++ b/src/generic/ondemand/document-inl.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -93,6 +94,7 @@ simdjson_really_inline simdjson_result document::operator[](const char *k } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/ondemand/document.h b/src/generic/ondemand/document.h index a60f840f6..2f5bb05fc 100644 --- a/src/generic/ondemand/document.h +++ b/src/generic/ondemand/document.h @@ -1,5 +1,6 @@ #include "simdjson/error.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -82,6 +83,7 @@ protected: } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/ondemand/field-inl.h b/src/generic/ondemand/field-inl.h index 95ca4ebea..540828aab 100644 --- a/src/generic/ondemand/field-inl.h +++ b/src/generic/ondemand/field-inl.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -30,6 +31,7 @@ simdjson_really_inline value &field::value() noexcept { } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/ondemand/field.h b/src/generic/ondemand/field.h index 3ece2b43b..d7c2fab5e 100644 --- a/src/generic/ondemand/field.h +++ b/src/generic/ondemand/field.h @@ -1,5 +1,6 @@ #include "simdjson/error.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -26,6 +27,7 @@ protected: } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/ondemand/json_iterator-inl.h b/src/generic/ondemand/json_iterator-inl.h index 06899a42f..4f202ea44 100644 --- a/src/generic/ondemand/json_iterator-inl.h +++ b/src/generic/ondemand/json_iterator-inl.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -323,6 +324,7 @@ simdjson_really_inline bool json_iterator_ref::is_active() const noexcept { } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/ondemand/json_iterator.h b/src/generic/ondemand/json_iterator.h index abb8790e3..6a08f70af 100644 --- a/src/generic/ondemand/json_iterator.h +++ b/src/generic/ondemand/json_iterator.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -183,6 +184,7 @@ private: } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/ondemand/logger-inl.h b/src/generic/ondemand/logger-inl.h index 5ab9358b6..d97f33d32 100644 --- a/src/generic/ondemand/logger-inl.h +++ b/src/generic/ondemand/logger-inl.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { namespace logger { @@ -71,3 +72,4 @@ simdjson_really_inline void log_line(const json_iterator &iter, const char *titl } // namespace logger } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/ondemand/logger.h b/src/generic/ondemand/logger.h index 0fa474f8c..f421d7ac6 100644 --- a/src/generic/ondemand/logger.h +++ b/src/generic/ondemand/logger.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -18,3 +19,4 @@ static simdjson_really_inline void log_error(const json_iterator &iter, const ch } // namespace logger } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/ondemand/object-inl.h b/src/generic/ondemand/object-inl.h index f6ad8104c..2b62f7bcc 100644 --- a/src/generic/ondemand/object-inl.h +++ b/src/generic/ondemand/object-inl.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -121,6 +122,7 @@ simdjson_really_inline object_iterator object::end() noexcept { } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/ondemand/object.h b/src/generic/ondemand/object.h index 2539a953f..6e72a170f 100644 --- a/src/generic/ondemand/object.h +++ b/src/generic/ondemand/object.h @@ -1,5 +1,6 @@ #include "simdjson/error.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -63,6 +64,7 @@ protected: } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/ondemand/object_iterator-inl.h b/src/generic/ondemand/object_iterator-inl.h index 1671e15ba..76f3b3d04 100644 --- a/src/generic/ondemand/object_iterator-inl.h +++ b/src/generic/ondemand/object_iterator-inl.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -27,6 +28,7 @@ simdjson_really_inline object_iterator &object_iterator::operator++() noexcept { } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/ondemand/object_iterator.h b/src/generic/ondemand/object_iterator.h index 0b0ae3212..db119d495 100644 --- a/src/generic/ondemand/object_iterator.h +++ b/src/generic/ondemand/object_iterator.h @@ -1,5 +1,6 @@ #include "simdjson/error.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -42,6 +43,7 @@ private: } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/ondemand/parser-inl.h b/src/generic/ondemand/parser-inl.h index a11ce3122..7f843e829 100644 --- a/src/generic/ondemand/parser-inl.h +++ b/src/generic/ondemand/parser-inl.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -41,6 +42,7 @@ SIMDJSON_WARN_UNUSED simdjson_really_inline simdjson_result parse } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/ondemand/parser.h b/src/generic/ondemand/parser.h index a7708c404..9f7cbb753 100644 --- a/src/generic/ondemand/parser.h +++ b/src/generic/ondemand/parser.h @@ -1,5 +1,6 @@ #include "simdjson/error.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -35,6 +36,7 @@ private: } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/ondemand/raw_json_string-inl.h b/src/generic/ondemand/raw_json_string-inl.h index a9de9e9e3..9f8d405bc 100644 --- a/src/generic/ondemand/raw_json_string-inl.h +++ b/src/generic/ondemand/raw_json_string-inl.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -34,6 +35,7 @@ SIMDJSON_UNUSED simdjson_really_inline bool operator!=(std::string_view a, const } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/ondemand/raw_json_string.h b/src/generic/ondemand/raw_json_string.h index 564e89beb..52bb67a2f 100644 --- a/src/generic/ondemand/raw_json_string.h +++ b/src/generic/ondemand/raw_json_string.h @@ -1,5 +1,6 @@ #include "simdjson/error.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -32,6 +33,7 @@ SIMDJSON_UNUSED simdjson_really_inline bool operator!=(std::string_view a, const } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/ondemand/token_iterator-inl.h b/src/generic/ondemand/token_iterator-inl.h index b75ee5d74..ea71af21f 100644 --- a/src/generic/ondemand/token_iterator-inl.h +++ b/src/generic/ondemand/token_iterator-inl.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -40,6 +41,7 @@ simdjson_really_inline bool token_iterator::operator<=(const token_iterator &oth } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/ondemand/token_iterator.h b/src/generic/ondemand/token_iterator.h index 524c497ee..a25c885d9 100644 --- a/src/generic/ondemand/token_iterator.h +++ b/src/generic/ondemand/token_iterator.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -73,6 +74,7 @@ protected: } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/ondemand/value-inl.h b/src/generic/ondemand/value-inl.h index 5b6fee0a6..3d4cd22ae 100644 --- a/src/generic/ondemand/value-inl.h +++ b/src/generic/ondemand/value-inl.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -166,6 +167,7 @@ simdjson_really_inline void value::log_error(const char *message) const noexcept } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/ondemand/value.h b/src/generic/ondemand/value.h index 99eb000e8..ce2b5040f 100644 --- a/src/generic/ondemand/value.h +++ b/src/generic/ondemand/value.h @@ -1,5 +1,6 @@ #include "simdjson/error.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -88,6 +89,7 @@ protected: } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/stage1/allocate.h b/src/generic/stage1/allocate.h index 46ab3b33f..9ed15539e 100644 --- a/src/generic/stage1/allocate.h +++ b/src/generic/stage1/allocate.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace stage1 { @@ -19,3 +20,4 @@ simdjson_really_inline error_code set_capacity(internal::dom_parser_implementati } // namespace stage1 } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage1/buf_block_reader.h b/src/generic/stage1/buf_block_reader.h index 3068a0a33..813e13554 100644 --- a/src/generic/stage1/buf_block_reader.h +++ b/src/generic/stage1/buf_block_reader.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { @@ -88,3 +89,4 @@ simdjson_really_inline void buf_block_reader::advance() { } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage1/find_next_document_index.h b/src/generic/stage1/find_next_document_index.h index c4580c467..35358068c 100644 --- a/src/generic/stage1/find_next_document_index.h +++ b/src/generic/stage1/find_next_document_index.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { @@ -69,3 +70,4 @@ simdjson_really_inline uint32_t find_next_document_index(dom_parser_implementati } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage1/json_minifier.h b/src/generic/stage1/json_minifier.h index bf042e9d9..f163b23fc 100644 --- a/src/generic/stage1/json_minifier.h +++ b/src/generic/stage1/json_minifier.h @@ -3,6 +3,7 @@ // We assume the file in which it is included already includes // "simdjson/stage1.h" (this simplifies amalgation) +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace stage1 { @@ -90,3 +91,4 @@ error_code json_minifier::minify(const uint8_t *buf, size_t len, uint8_t *dst, s } // namespace stage1 } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage1/json_scanner.h b/src/generic/stage1/json_scanner.h index 294911d16..c5b6e22df 100644 --- a/src/generic/stage1/json_scanner.h +++ b/src/generic/stage1/json_scanner.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace stage1 { @@ -144,3 +145,4 @@ simdjson_really_inline error_code json_scanner::finish(bool streaming) { } // namespace stage1 } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage1/json_string_scanner.h b/src/generic/stage1/json_string_scanner.h index fb44f8167..e47051b24 100644 --- a/src/generic/stage1/json_string_scanner.h +++ b/src/generic/stage1/json_string_scanner.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace stage1 { @@ -141,3 +142,4 @@ simdjson_really_inline error_code json_string_scanner::finish(bool streaming) { } // namespace stage1 } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage1/json_structural_indexer.h b/src/generic/stage1/json_structural_indexer.h index a2bd20e81..e731642e9 100644 --- a/src/generic/stage1/json_structural_indexer.h +++ b/src/generic/stage1/json_structural_indexer.h @@ -9,6 +9,7 @@ #include "generic/stage1/json_minifier.h" #include "generic/stage1/find_next_document_index.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace stage1 { @@ -228,3 +229,4 @@ simdjson_really_inline error_code json_structural_indexer::finish(dom_parser_imp } // namespace stage1 } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage1/utf8_fastvalidate_algorithm.h b/src/generic/stage1/utf8_fastvalidate_algorithm.h index fd4461757..7942ce503 100644 --- a/src/generic/stage1/utf8_fastvalidate_algorithm.h +++ b/src/generic/stage1/utf8_fastvalidate_algorithm.h @@ -1,4 +1,5 @@ namespace simdjson { +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { /* @@ -182,3 +183,4 @@ struct utf8_checker { } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage1/utf8_lookup2_algorithm.h b/src/generic/stage1/utf8_lookup2_algorithm.h index 9cf6d1187..0656c23be 100644 --- a/src/generic/stage1/utf8_lookup2_algorithm.h +++ b/src/generic/stage1/utf8_lookup2_algorithm.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace utf8_validation { @@ -223,3 +224,4 @@ using utf8_validation::utf8_checker; } // namespace SIMDJSON_IMPLEMENTATION } // namespace simdjson +} // namespace simdjson diff --git a/src/generic/stage1/utf8_lookup3_algorithm.h b/src/generic/stage1/utf8_lookup3_algorithm.h index 2d8f18b77..5330fd69e 100644 --- a/src/generic/stage1/utf8_lookup3_algorithm.h +++ b/src/generic/stage1/utf8_lookup3_algorithm.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace utf8_validation { @@ -243,3 +244,4 @@ using utf8_validation::utf8_checker; } // namespace SIMDJSON_IMPLEMENTATION } // namespace simdjson +} // namespace simdjson diff --git a/src/generic/stage1/utf8_lookup4_algorithm.h b/src/generic/stage1/utf8_lookup4_algorithm.h index 5ccaf5a3e..80c29a37b 100644 --- a/src/generic/stage1/utf8_lookup4_algorithm.h +++ b/src/generic/stage1/utf8_lookup4_algorithm.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace utf8_validation { @@ -181,3 +182,4 @@ using utf8_validation::utf8_checker; } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage1/utf8_lookup_algorithm.h b/src/generic/stage1/utf8_lookup_algorithm.h index 3505c4f31..b402e340d 100644 --- a/src/generic/stage1/utf8_lookup_algorithm.h +++ b/src/generic/stage1/utf8_lookup_algorithm.h @@ -1,4 +1,5 @@ namespace simdjson { +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace utf8_validation { @@ -301,3 +302,4 @@ struct utf8_checker { } // namespace utf8_validation } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage1/utf8_range_algorithm.h b/src/generic/stage1/utf8_range_algorithm.h index 1898577e0..3694df9e8 100644 --- a/src/generic/stage1/utf8_range_algorithm.h +++ b/src/generic/stage1/utf8_range_algorithm.h @@ -1,4 +1,5 @@ namespace simdjson { +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { /* @@ -184,3 +185,4 @@ struct utf8_checker { } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage1/utf8_validator.h b/src/generic/stage1/utf8_validator.h index 5ba08e891..abd3c4a41 100644 --- a/src/generic/stage1/utf8_validator.h +++ b/src/generic/stage1/utf8_validator.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace stage1 { @@ -30,3 +31,4 @@ bool generic_validate_utf8(const char * input, size_t length) { } // namespace stage1 } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage1/utf8_zwegner_algorithm.h b/src/generic/stage1/utf8_zwegner_algorithm.h index 9b5fb2c3b..885f263a2 100644 --- a/src/generic/stage1/utf8_zwegner_algorithm.h +++ b/src/generic/stage1/utf8_zwegner_algorithm.h @@ -1,4 +1,5 @@ namespace simdjson { +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { // // Detect UTF-8 errors. @@ -363,3 +364,4 @@ struct utf8_checker { } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage2/allocate.h b/src/generic/stage2/allocate.h index eec40496d..0683f7b4a 100644 --- a/src/generic/stage2/allocate.h +++ b/src/generic/stage2/allocate.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace stage2 { @@ -20,3 +21,4 @@ simdjson_really_inline error_code set_max_depth(dom_parser_implementation &parse } // namespace stage2 } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage2/atomparsing.h b/src/generic/stage2/atomparsing.h index db768186c..063ef3cf6 100644 --- a/src/generic/stage2/atomparsing.h +++ b/src/generic/stage2/atomparsing.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace stage2 { @@ -62,3 +63,4 @@ simdjson_really_inline bool is_valid_null_atom(const uint8_t *src, size_t len) { } // namespace stage2 } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage2/json_iterator.h b/src/generic/stage2/json_iterator.h index eab3053e1..91fce480c 100644 --- a/src/generic/stage2/json_iterator.h +++ b/src/generic/stage2/json_iterator.h @@ -1,5 +1,6 @@ #include "generic/stage2/logger.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace stage2 { @@ -313,3 +314,4 @@ SIMDJSON_WARN_UNUSED simdjson_really_inline error_code json_iterator::visit_prim } // namespace stage2 } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage2/jsoncharutils.h b/src/generic/stage2/jsoncharutils.h index c36b2195a..e6bab3578 100644 --- a/src/generic/stage2/jsoncharutils.h +++ b/src/generic/stage2/jsoncharutils.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace stage2 { @@ -107,3 +108,4 @@ simdjson_really_inline value128 full_multiplication(uint64_t value1, uint64_t va } // namespace stage2 } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage2/logger.h b/src/generic/stage2/logger.h index 7eda82df3..f3f5c7abf 100644 --- a/src/generic/stage2/logger.h +++ b/src/generic/stage2/logger.h @@ -1,5 +1,6 @@ // This is for an internal-only stage 2 specific logger. // Set LOG_ENABLED = true to log what stage 2 is doing! +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace logger { @@ -84,3 +85,4 @@ namespace logger { } // namespace logger } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage2/numberparsing.h b/src/generic/stage2/numberparsing.h index 698162bb7..6b0a55b62 100644 --- a/src/generic/stage2/numberparsing.h +++ b/src/generic/stage2/numberparsing.h @@ -1,6 +1,7 @@ #include #include +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace stage2 { @@ -768,3 +769,4 @@ SIMDJSON_UNUSED simdjson_really_inline simdjson_result parse_double(cons } // namespace stage2 } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage2/stringparsing.h b/src/generic/stage2/stringparsing.h index b86d27422..de5d48e53 100644 --- a/src/generic/stage2/stringparsing.h +++ b/src/generic/stage2/stringparsing.h @@ -1,6 +1,7 @@ // This file contains the common code every implementation uses // It is intended to be included multiple times and compiled multiple times +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace stage2 { @@ -131,3 +132,4 @@ SIMDJSON_UNUSED SIMDJSON_WARN_UNUSED simdjson_really_inline error_code parse_str } // namespace stage2 } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage2/structural_iterator.h b/src/generic/stage2/structural_iterator.h index 11ae1aad8..18533c104 100644 --- a/src/generic/stage2/structural_iterator.h +++ b/src/generic/stage2/structural_iterator.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace stage2 { @@ -50,3 +51,4 @@ public: } // namespace stage2 } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage2/tape_builder.h b/src/generic/stage2/tape_builder.h index 6134631c3..6aa474b5e 100644 --- a/src/generic/stage2/tape_builder.h +++ b/src/generic/stage2/tape_builder.h @@ -2,6 +2,7 @@ #include "generic/stage2/tape_writer.h" #include "generic/stage2/atomparsing.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace stage2 { @@ -281,3 +282,4 @@ simdjson_really_inline void tape_builder::on_end_string(uint8_t *dst) noexcept { } // namespace stage2 } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage2/tape_writer.h b/src/generic/stage2/tape_writer.h index 551cce0f2..d8117b159 100644 --- a/src/generic/stage2/tape_writer.h +++ b/src/generic/stage2/tape_writer.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace stage2 { @@ -101,3 +102,4 @@ simdjson_really_inline void tape_writer::write(uint64_t &tape_loc, uint64_t val, } // namespace stage2 } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/haswell/bitmanipulation.h b/src/haswell/bitmanipulation.h index e0dec0350..14df0a780 100644 --- a/src/haswell/bitmanipulation.h +++ b/src/haswell/bitmanipulation.h @@ -1,6 +1,7 @@ #ifndef SIMDJSON_HASWELL_BITMANIPULATION_H #define SIMDJSON_HASWELL_BITMANIPULATION_H +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { @@ -55,5 +56,6 @@ simdjson_really_inline bool add_overflow(uint64_t value1, uint64_t value2, } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #endif // SIMDJSON_HASWELL_BITMANIPULATION_H diff --git a/src/haswell/bitmask.h b/src/haswell/bitmask.h index 871e3e7eb..6a5396cbf 100644 --- a/src/haswell/bitmask.h +++ b/src/haswell/bitmask.h @@ -1,6 +1,7 @@ #ifndef SIMDJSON_HASWELL_BITMASK_H #define SIMDJSON_HASWELL_BITMASK_H +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { @@ -19,5 +20,6 @@ simdjson_really_inline uint64_t prefix_xor(const uint64_t bitmask) { } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #endif // SIMDJSON_HASWELL_BITMASK_H diff --git a/src/haswell/dom_parser_implementation.cpp b/src/haswell/dom_parser_implementation.cpp index 0dc8ba334..450fda026 100644 --- a/src/haswell/dom_parser_implementation.cpp +++ b/src/haswell/dom_parser_implementation.cpp @@ -6,6 +6,7 @@ // Stage 1 // +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { @@ -104,6 +105,7 @@ simdjson_really_inline simd8 must_be_2_3_continuation(const simd8 } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #include "generic/stage1/utf8_lookup4_algorithm.h" #include "generic/stage1/json_structural_indexer.h" @@ -119,6 +121,7 @@ simdjson_really_inline simd8 must_be_2_3_continuation(const simd8 // // Implementation-specific overrides // +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace stage1 { @@ -160,6 +163,7 @@ SIMDJSON_WARN_UNUSED error_code dom_parser_implementation::parse(const uint8_t * } } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #include "generic/ondemand.h" diff --git a/src/haswell/implementation.cpp b/src/haswell/implementation.cpp index 501b7bf8c..993b42a06 100644 --- a/src/haswell/implementation.cpp +++ b/src/haswell/implementation.cpp @@ -1,6 +1,7 @@ #include "haswell/begin_implementation.h" #include "haswell/dom_parser_implementation.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { SIMDJSON_WARN_UNUSED error_code implementation::create_dom_parser_implementation( @@ -16,6 +17,7 @@ SIMDJSON_WARN_UNUSED error_code implementation::create_dom_parser_implementation } } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #include "haswell/end_implementation.h" diff --git a/src/haswell/implementation.h b/src/haswell/implementation.h index 764a58a2f..52e4bbc48 100644 --- a/src/haswell/implementation.h +++ b/src/haswell/implementation.h @@ -5,6 +5,7 @@ #include "isadetection.h" // The constructor may be executed on any host, so we take care not to use SIMDJSON_TARGET_REGION +namespace simdjson { namespace haswell { using namespace simdjson; @@ -26,5 +27,6 @@ public: }; } // namespace haswell +} // namespace simdjson #endif // SIMDJSON_HASWELL_IMPLEMENTATION_H \ No newline at end of file diff --git a/src/haswell/numberparsing.h b/src/haswell/numberparsing.h index d4388f7f5..2e1e004b5 100644 --- a/src/haswell/numberparsing.h +++ b/src/haswell/numberparsing.h @@ -1,6 +1,7 @@ #ifndef SIMDJSON_HASWELL_NUMBERPARSING_H #define SIMDJSON_HASWELL_NUMBERPARSING_H +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { @@ -24,6 +25,7 @@ static simdjson_really_inline uint32_t parse_eight_digits_unrolled(const uint8_t } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #define SWAR_NUMBER_PARSING diff --git a/src/haswell/simd.h b/src/haswell/simd.h index 0896cbe91..36b20c8a9 100644 --- a/src/haswell/simd.h +++ b/src/haswell/simd.h @@ -3,6 +3,7 @@ #include "simdprune_tables.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace simd { @@ -357,5 +358,6 @@ namespace simd { } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #endif // SIMDJSON_HASWELL_SIMD_H diff --git a/src/haswell/stringparsing.h b/src/haswell/stringparsing.h index 8e0723011..d7da2e081 100644 --- a/src/haswell/stringparsing.h +++ b/src/haswell/stringparsing.h @@ -5,6 +5,7 @@ #include "haswell/simd.h" #include "haswell/bitmanipulation.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { @@ -40,6 +41,7 @@ simdjson_really_inline backslash_and_quote backslash_and_quote::copy_and_find(co } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #include "generic/stage2/stringparsing.h" diff --git a/src/westmere/bitmanipulation.h b/src/westmere/bitmanipulation.h index 9adf21a2b..02f2825cb 100644 --- a/src/westmere/bitmanipulation.h +++ b/src/westmere/bitmanipulation.h @@ -1,6 +1,7 @@ #ifndef SIMDJSON_WESTMERE_BITMANIPULATION_H #define SIMDJSON_WESTMERE_BITMANIPULATION_H +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { @@ -64,5 +65,6 @@ simdjson_really_inline bool add_overflow(uint64_t value1, uint64_t value2, } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #endif // SIMDJSON_WESTMERE_BITMANIPULATION_H diff --git a/src/westmere/bitmask.h b/src/westmere/bitmask.h index 10e107fae..e7e21b7fe 100644 --- a/src/westmere/bitmask.h +++ b/src/westmere/bitmask.h @@ -1,6 +1,7 @@ #ifndef SIMDJSON_WESTMERE_BITMASK_H #define SIMDJSON_WESTMERE_BITMASK_H +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { @@ -19,5 +20,6 @@ simdjson_really_inline uint64_t prefix_xor(const uint64_t bitmask) { } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #endif // SIMDJSON_WESTMERE_BITMASK_H diff --git a/src/westmere/dom_parser_implementation.cpp b/src/westmere/dom_parser_implementation.cpp index 9723f1075..32b5aa78c 100644 --- a/src/westmere/dom_parser_implementation.cpp +++ b/src/westmere/dom_parser_implementation.cpp @@ -6,6 +6,7 @@ // Stage 1 // +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { @@ -102,6 +103,7 @@ simdjson_really_inline simd8 must_be_2_3_continuation(const simd8 } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #include "generic/stage1/utf8_lookup4_algorithm.h" #include "generic/stage1/json_structural_indexer.h" @@ -118,6 +120,7 @@ simdjson_really_inline simd8 must_be_2_3_continuation(const simd8 // Implementation-specific overrides // +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace stage1 { @@ -159,5 +162,6 @@ SIMDJSON_WARN_UNUSED error_code dom_parser_implementation::parse(const uint8_t * } } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #include "westmere/end_implementation.h" diff --git a/src/westmere/implementation.cpp b/src/westmere/implementation.cpp index e8755ac8a..e3b159a38 100644 --- a/src/westmere/implementation.cpp +++ b/src/westmere/implementation.cpp @@ -1,6 +1,7 @@ #include "westmere/begin_implementation.h" #include "westmere/dom_parser_implementation.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { @@ -18,5 +19,6 @@ SIMDJSON_WARN_UNUSED error_code implementation::create_dom_parser_implementation } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #include "westmere/end_implementation.h" \ No newline at end of file diff --git a/src/westmere/implementation.h b/src/westmere/implementation.h index f95c13eda..4ed8b3c9b 100644 --- a/src/westmere/implementation.h +++ b/src/westmere/implementation.h @@ -6,6 +6,7 @@ #include "isadetection.h" // The constructor may be executed on any host, so we take care not to use SIMDJSON_TARGET_REGION +namespace simdjson { namespace westmere { namespace { @@ -26,5 +27,6 @@ public: } // unnamed namespace } // namespace westmere +} // namespace simdjson #endif // SIMDJSON_WESTMERE_IMPLEMENTATION_H \ No newline at end of file diff --git a/src/westmere/numberparsing.h b/src/westmere/numberparsing.h index 4ec26cfe6..09a2aa8cd 100644 --- a/src/westmere/numberparsing.h +++ b/src/westmere/numberparsing.h @@ -1,6 +1,7 @@ #ifndef SIMDJSON_WESTMERE_NUMBERPARSING_H #define SIMDJSON_WESTMERE_NUMBERPARSING_H +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { @@ -24,6 +25,7 @@ static simdjson_really_inline uint32_t parse_eight_digits_unrolled(const uint8_t } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #define SWAR_NUMBER_PARSING diff --git a/src/westmere/simd.h b/src/westmere/simd.h index 6385b9959..520a53f9a 100644 --- a/src/westmere/simd.h +++ b/src/westmere/simd.h @@ -3,6 +3,7 @@ #include "simdprune_tables.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace simd { @@ -328,5 +329,6 @@ namespace simd { } // namespace simd } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #endif // SIMDJSON_WESTMERE_SIMD_INPUT_H diff --git a/src/westmere/stringparsing.h b/src/westmere/stringparsing.h index 0c2af8d5c..55b5c1437 100644 --- a/src/westmere/stringparsing.h +++ b/src/westmere/stringparsing.h @@ -1,6 +1,7 @@ #ifndef SIMDJSON_WESTMERE_STRINGPARSING_H #define SIMDJSON_WESTMERE_STRINGPARSING_H +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { @@ -38,6 +39,7 @@ simdjson_really_inline backslash_and_quote backslash_and_quote::copy_and_find(co } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #include "generic/stage2/stringparsing.h"