simdjson  3.1.6
Ridiculously Fast JSON
builtin.h
1 #ifndef SIMDJSON_BUILTIN_H
2 #define SIMDJSON_BUILTIN_H
3 
4 #include "simdjson/implementations.h"
5 
6 // Determine the best builtin implementation
7 #ifndef SIMDJSON_BUILTIN_IMPLEMENTATION
8 #if SIMDJSON_CAN_ALWAYS_RUN_ICELAKE
9 #define SIMDJSON_BUILTIN_IMPLEMENTATION icelake
10 #elif SIMDJSON_CAN_ALWAYS_RUN_HASWELL
11 #define SIMDJSON_BUILTIN_IMPLEMENTATION haswell
12 #elif SIMDJSON_CAN_ALWAYS_RUN_WESTMERE
13 #define SIMDJSON_BUILTIN_IMPLEMENTATION westmere
14 #elif SIMDJSON_CAN_ALWAYS_RUN_ARM64
15 #define SIMDJSON_BUILTIN_IMPLEMENTATION arm64
16 #elif SIMDJSON_CAN_ALWAYS_RUN_PPC64
17 #define SIMDJSON_BUILTIN_IMPLEMENTATION ppc64
18 #elif SIMDJSON_CAN_ALWAYS_RUN_FALLBACK
19 #define SIMDJSON_BUILTIN_IMPLEMENTATION fallback
20 #else
21 #error "All possible implementations (including fallback) have been disabled! simdjson will not run."
22 #endif
23 #endif // SIMDJSON_BUILTIN_IMPLEMENTATION
24 
25 #define SIMDJSON_IMPLEMENTATION SIMDJSON_BUILTIN_IMPLEMENTATION
26 
27 // ondemand is only compiled as part of the builtin implementation at present
28 
29 // Interface declarations
30 #include "simdjson/generic/implementation_simdjson_result_base.h"
31 #include "simdjson/generic/ondemand.h"
32 
33 // Inline definitions
34 #include "simdjson/generic/implementation_simdjson_result_base-inl.h"
35 #include "simdjson/generic/ondemand-inl.h"
36 
37 #undef SIMDJSON_IMPLEMENTATION
38 
39 namespace simdjson {
50  namespace builtin = SIMDJSON_BUILTIN_IMPLEMENTATION;
54  namespace ondemand = SIMDJSON_BUILTIN_IMPLEMENTATION::ondemand;
62 } // namespace simdjson
63 
64 #endif // SIMDJSON_BUILTIN_H
An implementation of simdjson for a particular CPU architecture.
We want to support argument-dependent lookup (ADL).
const implementation * builtin_implementation()
Represents the best statically linked simdjson implementation that can be used by the compiling progr...