Skip to content

Commit 1cef40c

Browse files
committed
Put haswell/westmere/fallback/amd64 in simdjson namespace
1 parent 06368da commit 1cef40c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+176
-2
lines changed

src/arm64/bitmanipulation.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#ifndef SIMDJSON_ARM64_BITMANIPULATION_H
22
#define SIMDJSON_ARM64_BITMANIPULATION_H
33

4+
namespace simdjson {
45
namespace SIMDJSON_IMPLEMENTATION {
56
namespace {
67

@@ -57,5 +58,6 @@ simdjson_really_inline bool add_overflow(uint64_t value1, uint64_t value2, uint6
5758

5859
} // unnamed namespace
5960
} // namespace SIMDJSON_IMPLEMENTATION
61+
} // namespace simdjson
6062

6163
#endif // SIMDJSON_ARM64_BITMANIPULATION_H

src/arm64/bitmask.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#ifndef SIMDJSON_ARM64_BITMASK_H
22
#define SIMDJSON_ARM64_BITMASK_H
33

4+
namespace simdjson {
45
namespace SIMDJSON_IMPLEMENTATION {
56
namespace {
67

@@ -34,6 +35,7 @@ simdjson_really_inline uint64_t prefix_xor(uint64_t bitmask) {
3435

3536
} // namespace arm64
3637
} // namespace simdjson
38+
} // namespace simdjson
3739
SIMDJSON_UNTARGET_IMPLEMENTATION
3840

3941
#endif

src/arm64/dom_parser_implementation.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
//
66
// Stage 1
77
//
8+
namespace simdjson {
89
namespace SIMDJSON_IMPLEMENTATION {
910
namespace {
1011

@@ -100,6 +101,7 @@ simdjson_really_inline simd8<bool> must_be_2_3_continuation(const simd8<uint8_t>
100101

101102
} // unnamed namespace
102103
} // namespace SIMDJSON_IMPLEMENTATION
104+
} // namespace simdjson
103105

104106
#include "generic/stage1/utf8_lookup4_algorithm.h"
105107
#include "generic/stage1/json_structural_indexer.h"
@@ -116,6 +118,7 @@ simdjson_really_inline simd8<bool> must_be_2_3_continuation(const simd8<uint8_t>
116118
//
117119
// Implementation-specific overrides
118120
//
121+
namespace simdjson {
119122
namespace SIMDJSON_IMPLEMENTATION {
120123
namespace {
121124
namespace stage1 {
@@ -159,5 +162,6 @@ SIMDJSON_WARN_UNUSED error_code dom_parser_implementation::parse(const uint8_t *
159162
}
160163

161164
} // namespace SIMDJSON_IMPLEMENTATION
165+
} // namespace simdjson
162166

163167
#include "arm64/end_implementation.h"

src/arm64/implementation.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include "arm64/begin_implementation.h"
22
#include "arm64/dom_parser_implementation.h"
33

4+
namespace simdjson {
45
namespace SIMDJSON_IMPLEMENTATION {
56

67
SIMDJSON_WARN_UNUSED error_code implementation::create_dom_parser_implementation(
@@ -16,5 +17,6 @@ SIMDJSON_WARN_UNUSED error_code implementation::create_dom_parser_implementation
1617
}
1718

1819
} // namespace SIMDJSON_IMPLEMENTATION
20+
} // namespace simdjson
1921

2022
#include "arm64/end_implementation.h"

src/arm64/implementation.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include "simdjson.h"
55
#include "isadetection.h"
66

7+
namespace simdjson {
78
namespace arm64 {
89

910
using namespace simdjson;
@@ -22,5 +23,6 @@ class implementation final : public simdjson::implementation {
2223
};
2324

2425
} // namespace arm64
26+
} // namespace simdjson
2527

2628
#endif // SIMDJSON_ARM64_IMPLEMENTATION_H

src/arm64/numberparsing.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#ifndef SIMDJSON_ARM64_NUMBERPARSING_H
22
#define SIMDJSON_ARM64_NUMBERPARSING_H
33

4+
namespace simdjson {
45
namespace SIMDJSON_IMPLEMENTATION {
56
namespace {
67

@@ -16,6 +17,7 @@ static simdjson_really_inline uint32_t parse_eight_digits_unrolled(const uint8_t
1617

1718
} // unnamed namespace
1819
} // namespace SIMDJSON_IMPLEMENTATION
20+
} // namespace simdjson
1921

2022
#define SWAR_NUMBER_PARSING
2123

src/arm64/simd.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <type_traits>
88

99

10+
namespace simdjson {
1011
namespace SIMDJSON_IMPLEMENTATION {
1112
namespace {
1213
namespace simd {
@@ -486,5 +487,6 @@ simdjson_really_inline int8x16_t make_int8x16_t(int8_t x1, int8_t x2, int8_t x
486487
} // namespace simd
487488
} // unnamed namespace
488489
} // namespace SIMDJSON_IMPLEMENTATION
490+
} // namespace simdjson
489491

490492
#endif // SIMDJSON_ARM64_SIMD_H

src/arm64/stringparsing.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include "arm64/simd.h"
66
#include "arm64/bitmanipulation.h"
77

8+
namespace simdjson {
89
namespace SIMDJSON_IMPLEMENTATION {
910
namespace {
1011

@@ -45,6 +46,7 @@ simdjson_really_inline backslash_and_quote backslash_and_quote::copy_and_find(co
4546

4647
} // unnamed namespace
4748
} // namespace SIMDJSON_IMPLEMENTATION
49+
} // namespace simdjson
4850

4951
#include "generic/stage2/stringparsing.h"
5052

src/fallback/bitmanipulation.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include "simdjson.h"
55
#include <limits>
66

7+
namespace simdjson {
78
namespace SIMDJSON_IMPLEMENTATION {
89
namespace {
910

@@ -41,5 +42,6 @@ simdjson_really_inline int leading_zeroes(uint64_t input_num) {
4142

4243
} // unnamed namespace
4344
} // namespace SIMDJSON_IMPLEMENTATION
45+
} // namespace simdjson
4446

4547
#endif // SIMDJSON_FALLBACK_BITMANIPULATION_H

src/fallback/dom_parser_implementation.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//
88
#include "generic/stage1/find_next_document_index.h"
99

10+
namespace simdjson {
1011
namespace SIMDJSON_IMPLEMENTATION {
1112
namespace {
1213
namespace stage1 {
@@ -309,6 +310,7 @@ SIMDJSON_WARN_UNUSED bool implementation::validate_utf8(const char *buf, size_t
309310
}
310311

311312
} // namespace SIMDJSON_IMPLEMENTATION
313+
} // namespace simdjson
312314

313315
//
314316
// Stage 2
@@ -317,6 +319,7 @@ SIMDJSON_WARN_UNUSED bool implementation::validate_utf8(const char *buf, size_t
317319
#include "fallback/numberparsing.h"
318320
#include "generic/stage2/tape_builder.h"
319321

322+
namespace simdjson {
320323
namespace SIMDJSON_IMPLEMENTATION {
321324

322325
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 *
334337
}
335338

336339
} // namespace SIMDJSON_IMPLEMENTATION
340+
} // namespace simdjson
337341

338342
#include "fallback/end_implementation.h"

src/fallback/implementation.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include "fallback/begin_implementation.h"
22
#include "fallback/dom_parser_implementation.h"
33

4+
namespace simdjson {
45
namespace SIMDJSON_IMPLEMENTATION {
56

67
SIMDJSON_WARN_UNUSED error_code implementation::create_dom_parser_implementation(
@@ -16,5 +17,6 @@ SIMDJSON_WARN_UNUSED error_code implementation::create_dom_parser_implementation
1617
}
1718

1819
} // namespace SIMDJSON_IMPLEMENTATION
20+
} // namespace simdjson
1921

2022
#include "fallback/end_implementation.h"

src/fallback/implementation.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include "simdjson.h"
55
#include "isadetection.h"
66

7+
namespace simdjson {
78
namespace fallback {
89

910
using namespace simdjson;
@@ -26,5 +27,6 @@ class implementation final : public simdjson::implementation {
2627
};
2728

2829
} // namespace fallback
30+
} // namespace simdjson
2931

3032
#endif // SIMDJSON_FALLBACK_IMPLEMENTATION_H

src/fallback/numberparsing.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ void found_unsigned_integer(uint64_t result, const uint8_t *buf);
88
void found_float(double result, const uint8_t *buf);
99
#endif
1010

11+
namespace simdjson {
1112
namespace SIMDJSON_IMPLEMENTATION {
1213
namespace {
1314
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
2324

2425
} // unnamed namespace
2526
} // namespace SIMDJSON_IMPLEMENTATION
27+
} // namespace simdjson
2628

2729
#define SWAR_NUMBER_PARSING
2830
#include "generic/stage2/numberparsing.h"

src/fallback/stringparsing.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
#include "simdjson.h"
55

6+
namespace simdjson {
67
namespace SIMDJSON_IMPLEMENTATION {
78
namespace {
89

@@ -28,6 +29,7 @@ simdjson_really_inline backslash_and_quote backslash_and_quote::copy_and_find(co
2829

2930
} // unnamed namespace
3031
} // namespace SIMDJSON_IMPLEMENTATION
32+
} // namespace simdjson
3133

3234
#include "generic/stage2/stringparsing.h"
3335

src/generic/dom_parser_implementation.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include "simdjson.h"
22
#include "isadetection.h"
33

4+
namespace simdjson {
45
namespace SIMDJSON_IMPLEMENTATION {
56

67
// expectation: sizeof(open_container) = 64/8.
@@ -40,10 +41,12 @@ class dom_parser_implementation final : public internal::dom_parser_implementati
4041
};
4142

4243
} // namespace SIMDJSON_IMPLEMENTATION
44+
} // namespace simdjson
4345

4446
#include "generic/stage1/allocate.h"
4547
#include "generic/stage2/allocate.h"
4648

49+
namespace simdjson {
4750
namespace SIMDJSON_IMPLEMENTATION {
4851

4952
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
6669
}
6770

6871
} // namespace SIMDJSON_IMPLEMENTATION
72+
} // namespace simdjson

src/generic/implementation_simdjson_result_base-inl.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
namespace simdjson {
12
namespace SIMDJSON_IMPLEMENTATION {
23

34
//
@@ -73,4 +74,5 @@ template<typename T>
7374
simdjson_really_inline implementation_simdjson_result_base<T>::implementation_simdjson_result_base() noexcept
7475
: implementation_simdjson_result_base(T{}, UNINITIALIZED) {}
7576

76-
} // namespace SIMDJSON_IMPLEMENTATION
77+
} // namespace SIMDJSON_IMPLEMENTATION
78+
} // namespace simdjson

src/generic/implementation_simdjson_result_base.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
namespace simdjson {
12
namespace SIMDJSON_IMPLEMENTATION {
23

34
// 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 {
117118
error_code second;
118119
}; // struct implementation_simdjson_result_base
119120

120-
} // namespace SIMDJSON_IMPLEMENTATION
121+
} // namespace SIMDJSON_IMPLEMENTATION
122+
} // namespace simdjson

src/generic/ondemand/array-inl.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
namespace simdjson {
12
namespace SIMDJSON_IMPLEMENTATION {
23
namespace ondemand {
34

@@ -72,6 +73,7 @@ simdjson_really_inline array_iterator array::end() & noexcept {
7273

7374
} // namespace ondemand
7475
} // namespace SIMDJSON_IMPLEMENTATION
76+
} // namespace simdjson
7577

7678
namespace simdjson {
7779

src/generic/ondemand/array.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "simdjson/error.h"
22

3+
namespace simdjson {
34
namespace SIMDJSON_IMPLEMENTATION {
45
namespace ondemand {
56

@@ -60,6 +61,7 @@ class array {
6061

6162
} // namespace ondemand
6263
} // namespace SIMDJSON_IMPLEMENTATION
64+
} // namespace simdjson
6365

6466
namespace simdjson {
6567

src/generic/ondemand/array_iterator-inl.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
namespace simdjson {
12
namespace SIMDJSON_IMPLEMENTATION {
23
namespace ondemand {
34

@@ -22,6 +23,7 @@ simdjson_really_inline array_iterator &array_iterator::operator++() noexcept {
2223

2324
} // namespace ondemand
2425
} // namespace SIMDJSON_IMPLEMENTATION
26+
} // namespace simdjson
2527

2628
namespace simdjson {
2729

src/generic/ondemand/array_iterator.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "simdjson/error.h"
22

3+
namespace simdjson {
34
namespace SIMDJSON_IMPLEMENTATION {
45
namespace ondemand {
56

@@ -48,6 +49,7 @@ class array_iterator {
4849

4950
} // namespace ondemand
5051
} // namespace SIMDJSON_IMPLEMENTATION
52+
} // namespace simdjson
5153

5254
namespace simdjson {
5355

src/generic/ondemand/document-inl.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
namespace simdjson {
12
namespace SIMDJSON_IMPLEMENTATION {
23
namespace ondemand {
34

@@ -93,6 +94,7 @@ simdjson_really_inline simdjson_result<value> document::operator[](const char *k
9394

9495
} // namespace ondemand
9596
} // namespace SIMDJSON_IMPLEMENTATION
97+
} // namespace simdjson
9698

9799
namespace simdjson {
98100

src/generic/ondemand/document.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "simdjson/error.h"
22

3+
namespace simdjson {
34
namespace SIMDJSON_IMPLEMENTATION {
45
namespace ondemand {
56

@@ -82,6 +83,7 @@ class document {
8283

8384
} // namespace ondemand
8485
} // namespace SIMDJSON_IMPLEMENTATION
86+
} // namespace simdjson
8587

8688
namespace simdjson {
8789

0 commit comments

Comments
 (0)