Skip to content

Commit 45bccad

Browse files
committed
Namespace documentation
1 parent 656da4b commit 45bccad

File tree

9 files changed

+58
-1
lines changed

9 files changed

+58
-1
lines changed

include/simdjson.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,18 @@ SIMDJSON_DISABLE_UNDESIRED_WARNINGS
8585
#include "simdjson/westmere.h"
8686

8787
namespace simdjson {
88+
/**
89+
* Represents the best statically linked simdjson implementation that can be used by the compiling
90+
* program.
91+
*
92+
* Detects what options the program is compiled against, and picks the minimum implementation that
93+
* will work on any computer that can run the program. For example, if you compile with g++
94+
* -march=westmere, it will pick the westmere implementation. The haswell implementation will
95+
* still be available, and can be selected at runtime, but the builtin implementation (and any
96+
* code that uses it) will use westmere.
97+
*/
8898
namespace builtin = SIMDJSON_BUILTIN_IMPLEMENTATION;
89-
}
99+
} // namespace simdjson
90100

91101
SIMDJSON_POP_DISABLE_WARNINGS
92102

include/simdjson/arm64.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@
55

66
#if SIMDJSON_IMPLEMENTATION_ARM64
77

8+
namespace simdjson {
9+
/**
10+
* Implementation for NEON (ARMv8).
11+
*/
12+
namespace arm64 {
13+
} // namespace arm64
14+
} // namespace simdjson
15+
816
#include "simdjson/arm64/implementation.h"
917

1018
#include "simdjson/arm64/begin.h"

include/simdjson/fallback.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@
55

66
#if SIMDJSON_IMPLEMENTATION_FALLBACK
77

8+
namespace simdjson {
9+
/**
10+
* Fallback implementation (runs on any machine).
11+
*/
12+
namespace fallback {
13+
} // namespace fallback
14+
} // namespace simdjson
15+
816
#include "simdjson/fallback/implementation.h"
917

1018
#include "simdjson/fallback/begin.h"

include/simdjson/generic/atomparsing.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
namespace simdjson {
22
namespace SIMDJSON_IMPLEMENTATION {
33
namespace {
4+
/// @private
45
namespace atomparsing {
56

67
// The string_to_uint32 is exclusively used to map literal strings to 32-bit values.

include/simdjson/generic/numberparsing.h

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

1011
using internal::FASTFLOAT_LARGEST_POWER;

include/simdjson/generic/ondemand.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
namespace simdjson {
2+
namespace SIMDJSON_IMPLEMENTATION {
3+
/**
4+
* A fast, simple, DOM-like interface that parses JSON as you use it.
5+
*
6+
* Designed for maximum speed and a lower memory profile.
7+
*/
8+
namespace ondemand {
9+
} // namespace ondemand
10+
} // namespace SIMDJSON_IMPLEMENTATION
11+
} // namespace simdjson
12+
113
#include "simdjson/generic/ondemand/logger.h"
214
#include "simdjson/generic/ondemand/raw_json_string.h"
315
#include "simdjson/generic/ondemand/token_iterator.h"

include/simdjson/generic/stringparsing.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
namespace simdjson {
55
namespace SIMDJSON_IMPLEMENTATION {
66
namespace {
7+
/// @private
78
namespace stringparsing {
89

910
// begin copypasta

include/simdjson/haswell.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@
77

88
#define SIMDJSON_TARGET_HASWELL SIMDJSON_TARGET_REGION("avx2,bmi,pclmul,lzcnt")
99

10+
namespace simdjson {
11+
/**
12+
* Implementation for Haswell (Intel AVX2).
13+
*/
14+
namespace haswell {
15+
} // namespace haswell
16+
} // namespace simdjson
17+
1018
//
1119
// These two need to be included outside SIMDJSON_TARGET_REGION
1220
//

include/simdjson/westmere.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@
77

88
#define SIMDJSON_TARGET_WESTMERE SIMDJSON_TARGET_REGION("sse4.2,pclmul")
99

10+
namespace simdjson {
11+
/**
12+
* Implementation for Westmere (Intel SSE4.2).
13+
*/
14+
namespace westmere {
15+
} // namespace westmere
16+
} // namespace simdjson
17+
1018
//
1119
// These two need to be included outside SIMDJSON_TARGET_REGION
1220
//

0 commit comments

Comments
 (0)