Skip to content

Commit 57de19d

Browse files
committed
Kinder, gentler implementation selection
- Allow user to specify SIMDJSON_BUILTIN_IMPLEMENTATION - Make cmake -DSIMDJSON_IMPLEMENTATION=haswell *only* specify haswell - Move negative implementation selection to -DSIMDJSON_EXCLUDE_IMPLEMENTATION - Automatically select SIMDJSON_BUILTIN_IMPLEMENTATION if SIMDJSON_IMPLEMENTATION is set - Move implementation enablement mostly to implementation files - Make implementation enablement and selection simpler and more robust - Fix bug where programs linked against simdjson were not passed SIMDJSON_XXX_IMPLEMENTATION or SIMDJSON_EXCEPTIONS
1 parent 02b42b2 commit 57de19d

File tree

12 files changed

+138
-151
lines changed

12 files changed

+138
-151
lines changed

cmake/simdjson-flags.cmake

Lines changed: 57 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -98,44 +98,82 @@ endif()
9898
# Optional flags
9999
#
100100

101+
#
101102
# Implementation selection
103+
#
104+
set(SIMDJSON_ALL_IMPLEMENTATIONS "fallback;westmere;haswell;arm64")
105+
106+
set(SIMDJSON_IMPLEMENTATION "" CACHE STRING "Semicolon-separated list of implementations to include (${SIMDJSON_ALL_IMPLEMENTATIONS}). If this is not set, any implementations that are supported at compile time and may be selected at runtime will be included.")
107+
foreach(implementation ${SIMDJSON_IMPLEMENTATION})
108+
if(NOT (implementation IN_LIST SIMDJSON_ALL_IMPLEMENTATIONS))
109+
message(ERROR "Implementation ${implementation} not supported by simdjson. Possible implementations: ${SIMDJSON_ALL_IMPLEMENTATIONS}")
110+
endif()
111+
endforeach(implementation)
112+
113+
set(SIMDJSON_EXCLUDE_IMPLEMENTATION "" CACHE STRING "Semicolon-separated list of implementations to exclude (haswell/westmere/arm64/fallback). By default, excludes any implementations that are unsupported at compile time or cannot be selected at runtime.")
114+
foreach(implementation ${SIMDJSON_EXCLUDE_IMPLEMENTATION})
115+
if(NOT (implementation IN_LIST SIMDJSON_ALL_IMPLEMENTATIONS))
116+
message(ERROR "Implementation ${implementation} not supported by simdjson. Possible implementations: ${SIMDJSON_ALL_IMPLEMENTATIONS}")
117+
endif()
118+
endforeach(implementation)
119+
120+
foreach(implementation ${SIMDJSON_ALL_IMPLEMENTATIONS})
121+
string(TOUPPER ${implementation} implementation_upper)
122+
if(implementation IN_LIST SIMDJSON_EXCLUDE_IMPLEMENTATION)
123+
message(STATUS "Excluding implementation ${implementation} due to SIMDJSON_EXCLUDE_IMPLEMENTATION=${SIMDJSON_EXCLUDE_IMPLEMENTATION}")
124+
target_compile_definitions(simdjson-flags INTERFACE "SIMDJSON_IMPLEMENTATION_${implementation_upper}=0")
125+
elseif(implementation IN_LIST SIMDJSON_IMPLEMENTATION)
126+
message(STATUS "Including implementation ${implementation} due to SIMDJSON_IMPLEMENTATION=${SIMDJSON_IMPLEMENTATION}")
127+
target_compile_definitions(simdjson-flags INTERFACE "SIMDJSON_IMPLEMENTATION_${implementation_upper}=1")
128+
elseif(SIMDJSON_IMPLEMENTATION)
129+
message(STATUS "Excluding implementation ${implementation} due to SIMDJSON_IMPLEMENTATION=${SIMDJSON_IMPLEMENTATION}")
130+
target_compile_definitions(simdjson-flags INTERFACE "SIMDJSON_IMPLEMENTATION_${implementation_upper}=0")
131+
endif()
132+
endforeach(implementation)
133+
134+
# TODO make it so this generates the necessary compiler flags to select the given implementation as the builtin automatically!
135+
option(SIMDJSON_BUILTIN_IMPLEMENTATION "Select the implementation that will be used for user code. Defaults to the most universal implementation in SIMDJSON_IMPLEMENTATION (in the order ${SIMDJSON_ALL_IMPLEMENTATIONS}) if specified; otherwise, by default the compiler will pick the best implementation that can always be selected given the compiler flags." "")
136+
if(SIMDJSON_BUILTIN_IMPLEMENTATION)
137+
target_compile_definitions(simdjson-flags INTERFACE "SIMDJSON_BUILTIN_IMPLEMENTATION=${SIMDJSON_BUILTIN_IMPLEMENTATION}")
138+
else()
139+
# Pick the most universal implementation out of the selected implementations (if any)
140+
foreach(implementation ${SIMDJSON_ALL_IMPLEMENTATIONS})
141+
if(implementation IN_LIST SIMDJSON_IMPLEMENTATION AND NOT (implementation IN_LIST SIMDJSON_EXCLUDE_IMPLEMENTATION))
142+
message(STATUS "Selected implementation ${implementation} as builtin implementation based on ${SIMDJSON_IMPLEMENTATION}.")
143+
target_compile_definitions(simdjson-flags INTERFACE "SIMDJSON_BUILTIN_IMPLEMENTATION=${implementation}")
144+
break()
145+
endif()
146+
endforeach(implementation)
147+
endif(SIMDJSON_BUILTIN_IMPLEMENTATION)
148+
102149
option(SIMDJSON_IMPLEMENTATION_HASWELL "Include the haswell implementation" ON)
103150
if(NOT SIMDJSON_IMPLEMENTATION_HASWELL)
104-
message(DEPRECATION "SIMDJSON_IMPLEMENTATION_HASWELL is deprecated. Use SIMDJSON_IMPLEMENTATION=haswell or SIMDJSON_IMPLEMENTATION=-haswell instead.")
105-
target_compile_definitions(simdjson-internal-flags INTERFACE SIMDJSON_IMPLEMENTATION_HASWELL=0)
151+
message(DEPRECATION "SIMDJSON_IMPLEMENTATION_HASWELL is deprecated. Use SIMDJSON_IMPLEMENTATION=-haswell instead.")
152+
target_compile_definitions(simdjson-flags INTERFACE SIMDJSON_IMPLEMENTATION_HASWELL=0)
106153
endif()
107154
option(SIMDJSON_IMPLEMENTATION_WESTMERE "Include the westmere implementation" ON)
108155
if(NOT SIMDJSON_IMPLEMENTATION_WESTMERE)
109156
message(DEPRECATION "SIMDJSON_IMPLEMENTATION_WESTMERE is deprecated. SIMDJSON_IMPLEMENTATION=-westmere instead.")
110-
target_compile_definitions(simdjson-internal-flags INTERFACE SIMDJSON_IMPLEMENTATION_WESTMERE=0)
157+
target_compile_definitions(simdjson-flags INTERFACE SIMDJSON_IMPLEMENTATION_WESTMERE=0)
111158
endif()
112159
option(SIMDJSON_IMPLEMENTATION_ARM64 "Include the arm64 implementation" ON)
113160
if(NOT SIMDJSON_IMPLEMENTATION_ARM64)
114161
message(DEPRECATION "SIMDJSON_IMPLEMENTATION_ARM64 is deprecated. Use SIMDJSON_IMPLEMENTATION=-arm64 instead.")
115-
target_compile_definitions(simdjson-internal-flags INTERFACE SIMDJSON_IMPLEMENTATION_ARM64=0)
162+
target_compile_definitions(simdjson-flags INTERFACE SIMDJSON_IMPLEMENTATION_ARM64=0)
116163
endif()
117164
option(SIMDJSON_IMPLEMENTATION_FALLBACK "Include the fallback implementation" ON)
118165
if(NOT SIMDJSON_IMPLEMENTATION_FALLBACK)
119166
message(DEPRECATION "SIMDJSON_IMPLEMENTATION_FALLBACK is deprecated. Use SIMDJSON_IMPLEMENTATION=-fallback instead.")
120-
target_compile_definitions(simdjson-internal-flags INTERFACE SIMDJSON_IMPLEMENTATION_FALLBACK=0)
167+
target_compile_definitions(simdjson-flags INTERFACE SIMDJSON_IMPLEMENTATION_FALLBACK=0)
121168
endif()
122-
# e.g. SIMDJSON_IMPLEMENTATION="haswell;westmere;-fallback"
123-
set(SIMDJSON_IMPLEMENTATION "" CACHE STRING "Implementations to include/exclude: semicolon separated list of architectures (haswell/westmere/arm64/fallback). Prepend with - to force an implementation off. (e.g. -DSIMDJSON_IMPLEMENTATION=\"haswell;-fallback\" .) Defaults to compile-time detection.")
124-
foreach(implementation ${SIMDJSON_IMPLEMENTATION})
125-
string(TOUPPER ${implementation} implementation_upper)
126-
string(SUBSTRING ${implementation_upper} 0 1 first_char)
127-
if(first_char STREQUAL "-")
128-
string(SUBSTRING ${implementation_upper} 1 -1 neg_implementation_upper)
129-
target_compile_definitions(simdjson-internal-flags INTERFACE "SIMDJSON_IMPLEMENTATION_${neg_implementation_upper}=0")
130-
else()
131-
target_compile_definitions(simdjson-internal-flags INTERFACE "SIMDJSON_IMPLEMENTATION_${implementation_upper}=1")
132-
endif()
133-
endforeach(implementation)
134169

170+
#
171+
# Other optional flags
172+
#
135173
option(SIMDJSON_ONDEMAND_SAFETY_RAILS "Validate ondemand user code at runtime to ensure it is being used correctly. Defaults to ON for debug builds, OFF for release builds." $<IF:$<CONFIG:DEBUG>,ON,OFF>)
136174
if(SIMDJSON_ONDEMAND_SAFETY_RAILS)
137175
message(STATUS "Ondemand safety rails enabled. Ondemand user code will be checked at runtime. This will be slower than normal!")
138-
target_compile_definitions(simdjson-internal-flags INTERFACE SIMDJSON_ONDEMAND_SAFETY_RAILS)
176+
target_compile_definitions(simdjson-flags INTERFACE SIMDJSON_ONDEMAND_SAFETY_RAILS)
139177
endif(SIMDJSON_ONDEMAND_SAFETY_RAILS)
140178

141179
option(SIMDJSON_BASH "Allow usage of bash within CMake" ON)
@@ -145,7 +183,7 @@ option(SIMDJSON_GIT "Allow usage of git within CMake" ON)
145183
option(SIMDJSON_EXCEPTIONS "Enable simdjson's exception-throwing interface" ON)
146184
if(NOT SIMDJSON_EXCEPTIONS)
147185
message(STATUS "simdjson exception interface turned off. Code that does not check error codes will not compile.")
148-
target_compile_definitions(simdjson-internal-flags INTERFACE SIMDJSON_EXCEPTIONS=0)
186+
target_compile_definitions(simdjson-flags INTERFACE SIMDJSON_EXCEPTIONS=0)
149187
endif()
150188

151189
option(SIMDJSON_ENABLE_THREADS "Link with thread support" ON)

fuzz/build_fuzzer_variants.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,12 @@ variant=sanitizers
4545
-DCMAKE_C_FLAGS="-fsanitize=fuzzer-no-link,address,undefined -fno-sanitize-recover=undefined" \
4646
-DCMAKE_BUILD_TYPE=Debug \
4747
-DSIMDJSON_FUZZ_LINKMAIN=Off \
48+
<<<<<<< HEAD
4849
-DSIMDJSON_FUZZ_LDFLAGS="-fsanitize=fuzzer"
50+
=======
51+
-DSIMDJSON_FUZZ_LDFLAGS=$LIB_FUZZING_ENGINE \
52+
-DSIMDJSON_EXCLUDE_IMPLEMENTATION=haswell
53+
>>>>>>> Kinder, gentler implementation selection
4954

5055
ninja all_fuzzers
5156
cd ..

include/simdjson.h

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -80,23 +80,10 @@ SIMDJSON_DISABLE_UNDESIRED_WARNINGS
8080

8181
// Implementations
8282
#include "simdjson/arm64.h"
83-
#include "simdjson/fallback.h"
8483
#include "simdjson/haswell.h"
8584
#include "simdjson/westmere.h"
86-
87-
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-
*/
98-
namespace builtin = SIMDJSON_BUILTIN_IMPLEMENTATION;
99-
} // namespace simdjson
85+
#include "simdjson/fallback.h"
86+
#include "simdjson/builtin.h"
10087

10188
SIMDJSON_POP_DISABLE_WARNINGS
10289

include/simdjson/arm64.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
#ifndef SIMDJSON_ARM64_H
22
#define SIMDJSON_ARM64_H
33

4+
#ifdef SIMDJSON_FALLBACK_H
5+
#error "arm64.h must be included before fallback.h"
6+
#endif
7+
48
#include "simdjson/portability.h"
59

10+
#include "simdjson/internal/isadetection.h"
11+
#include "simdjson/internal/jsoncharutils_tables.h"
12+
#include "simdjson/internal/numberparsing_tables.h"
13+
#include "simdjson/internal/simdprune_tables.h"
14+
615
#if SIMDJSON_IMPLEMENTATION_ARM64
716

817
namespace simdjson {

include/simdjson/builtin.h

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#ifndef SIMDJSON_BUILTIN_H
2+
#define SIMDJSON_BUILTIN_H
3+
4+
#include "simdjson/portability.h"
5+
6+
#ifndef SIMDJSON_BUILTIN_IMPLEMENTATION
7+
#if SIMDJSON_CAN_ALWAYS_RUN_HASWELL
8+
#define SIMDJSON_BUILTIN_IMPLEMENTATION haswell
9+
#elif SIMDJSON_CAN_ALWAYS_RUN_WESTMERE
10+
#define SIMDJSON_BUILTIN_IMPLEMENTATION westmere
11+
#elif SIMDJSON_CAN_ALWAYS_RUN_ARM64
12+
#define SIMDJSON_BUILTIN_IMPLEMENTATION arm64
13+
#elif SIMDJSON_CAN_ALWAYS_RUN_FALLBACK
14+
#define SIMDJSON_BUILTIN_IMPLEMENTATION fallback
15+
#else
16+
#error "All possible implementations (including fallback) have been disabled! simdjson will not run."
17+
#endif
18+
#endif // SIMDJSON_BUILTIN_IMPLEMENTATION
19+
20+
namespace simdjson {
21+
/**
22+
* Represents the best statically linked simdjson implementation that can be used by the compiling
23+
* program.
24+
*
25+
* Detects what options the program is compiled against, and picks the minimum implementation that
26+
* will work on any computer that can run the program. For example, if you compile with g++
27+
* -march=westmere, it will pick the westmere implementation. The haswell implementation will
28+
* still be available, and can be selected at runtime, but the builtin implementation (and any
29+
* code that uses it) will use westmere.
30+
*/
31+
namespace builtin = SIMDJSON_BUILTIN_IMPLEMENTATION;
32+
} // namespace simdjson
33+
34+
#endif // SIMDJSON_BUILTIN_H

include/simdjson/fallback.h

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

44
#include "simdjson/portability.h"
55

6+
// Default Fallback to on unless a builtin implementation has already been selected.
7+
#ifndef SIMDJSON_IMPLEMENTATION_FALLBACK
8+
#define SIMDJSON_IMPLEMENTATION_FALLBACK 1 // (!SIMDJSON_CAN_ALWAYS_RUN_ARM64 && !SIMDJSON_CAN_ALWAYS_RUN_HASWELL && !SIMDJSON_CAN_ALWAYS_RUN_WESTMERE)
9+
#endif
10+
#define SIMDJSON_CAN_ALWAYS_RUN_FALLBACK SIMDJSON_IMPLEMENTATION_FALLBACK
11+
612
#if SIMDJSON_IMPLEMENTATION_FALLBACK
713

814
namespace simdjson {

include/simdjson/haswell.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
11
#ifndef SIMDJSON_HASWELL_H
22
#define SIMDJSON_HASWELL_H
33

4+
#ifdef SIMDJSON_WESTMERE_H
5+
#error "haswell.h must be included before westmere.h"
6+
#endif
7+
#ifdef SIMDJSON_FALLBACK_H
8+
#error "haswell.h must be included before fallback.h"
9+
#endif
10+
411
#include "simdjson/portability.h"
512

13+
// Default Haswell to on if this is x86-64. Even if we're not compiled for it, it could be selected
14+
// at runtime.
15+
#ifndef SIMDJSON_IMPLEMENTATION_HASWELL
16+
#define SIMDJSON_IMPLEMENTATION_HASWELL (SIMDJSON_IS_X86_64)
17+
#endif
18+
#define SIMDJSON_CAN_ALWAYS_RUN_HASWELL ((SIMDJSON_IMPLEMENTATION_HASWELL) && (SIMDJSON_IS_X86_64) && (__AVX2__) && (__BMI__) && (__PCLMUL__) && (__LZCNT__))
19+
620
#if SIMDJSON_IMPLEMENTATION_HASWELL
721

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

include/simdjson/internal/simdprune_tables.h

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

4-
#if SIMDJSON_IMPLEMENTATION_ARM64 || SIMDJSON_IMPLEMENTATION_HASWELL || SIMDJSON_IMPLEMENTATION_WESTMERE
5-
64
#include <cstdint>
75

86
namespace simdjson { // table modified and copied from
@@ -18,6 +16,4 @@ extern SIMDJSON_DLLIMPORTEXPORT const uint64_t thintable_epi8[256];
1816
} // namespace internal
1917
} // namespace simdjson
2018

21-
#endif // SIMDJSON_IMPLEMENTATION_ARM64 || SIMDJSON_IMPLEMENTATION_HASWELL || SIMDJSON_IMPLEMENTATION_WESTMERE
22-
2319
#endif // SIMDJSON_INTERNAL_SIMDPRUNE_TABLES_H

include/simdjson/portability.h

Lines changed: 0 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -84,88 +84,6 @@ use a 64-bit target such as x64 or 64-bit ARM.")
8484
// Enable valid runtime implementations, and select SIMDJSON_BUILTIN_IMPLEMENTATION
8585
//
8686
87-
//
88-
// ARM 64-bit (NEON / Other)
89-
//
90-
#if SIMDJSON_IS_ARM64
91-
// Default ARM64 to on: it could be selected at runtime.
92-
#ifndef SIMDJSON_IMPLEMENTATION_ARM64
93-
#define SIMDJSON_IMPLEMENTATION_ARM64 1
94-
#endif
95-
#if __ARM_NEON
96-
//
97-
// NEON
98-
//
99-
// We're compiled natively for NEON, so arm64 will *always* work (the program is going
100-
// to fail in other ways if it's not run on a machine supporting NEON).
101-
//
102-
// Set builtin to arm64, and leave fallback defaulted to off.
103-
// It can still be enabled with SIMDJSON_IMPLEMENTATION_XXX flags, though it's unclear why one
104-
// would do so).
105-
//
106-
#define SIMDJSON_BUILTIN_IMPLEMENTATION arm64
107-
#endif
108-
#endif // SIMDJSON_IS_ARM64
109-
110-
//
111-
// Intel 64-bit (Haswell / Westmere / Other)
112-
//
113-
#if SIMDJSON_IS_X86_64
114-
115-
// Default Haswell to on: it could be selected at runtime.
116-
#ifndef SIMDJSON_IMPLEMENTATION_HASWELL
117-
#define SIMDJSON_IMPLEMENTATION_HASWELL 1
118-
#endif
119-
120-
#if __AVX2__ && __BMI__ && __PCLMUL__ && __LZCNT__ && SIMDJSON_IMPLEMENTATION_HASWELL
121-
//
122-
// Haswell
123-
//
124-
// We're compiled natively for Haswell, so Haswell will *always* work (more specifically, the
125-
// program is going to fail in other ways if it's not run on a machine supporting AVX2).
126-
//
127-
// Set builtin to haswell, and leave westmere and fallback defaulted to off.
128-
// They can still be enabled with SIMDJSON_IMPLEMENTATION_XXX flags, though it's unclear why one
129-
// would do so).
130-
//
131-
#define SIMDJSON_BUILTIN_IMPLEMENTATION haswell
132-
#else // Haswell
133-
134-
// We're not compiled natively for Haswell. Default Westmere to on: it could be selected at runtime.
135-
#ifndef SIMDJSON_IMPLEMENTATION_WESTMERE
136-
#define SIMDJSON_IMPLEMENTATION_WESTMERE 1
137-
#endif
138-
#if __SSE4_2__ && __PCLMUL__ && SIMDJSON_IMPLEMENTATION_WESTMERE
139-
//
140-
// Westmere
141-
//
142-
// We're compiled natively for Westmere, so Westmere will *always* work (the program is going
143-
// to fail in other ways if it's not run on a machine supporting SSE4.2).
144-
//
145-
// Set builtin to westmere, and leave fallback defaulted to off.
146-
// It can still be enabled with SIMDJSON_IMPLEMENTATION_XXX flags, though it's unclear why one
147-
// would do so).
148-
//
149-
#define SIMDJSON_BUILTIN_IMPLEMENTATION westmere
150-
#endif // Westmere
151-
#endif // Haswell
152-
#endif // SIMDJSON_IS_X86_64
153-
154-
//
155-
// If no specific builtin architecture was discovered, set builtin to fallback and make sure it's
156-
// enabled.
157-
//
158-
#ifndef SIMDJSON_BUILTIN_IMPLEMENTATION
159-
#ifndef SIMDJSON_IMPLEMENTATION_FALLBACK
160-
#define SIMDJSON_IMPLEMENTATION_FALLBACK 1
161-
#endif
162-
#if SIMDJSON_IMPLEMENTATION_FALLBACK
163-
#define SIMDJSON_BUILTIN_IMPLEMENTATION fallback
164-
#else
165-
#error "fallback architecture is disabled, but is compiled with flags that allow it to run on machines that require fallback."
166-
#endif
167-
#endif // SIMDJSON_BUILTIN_IMPLEMENTATION
168-
16987
// We are going to use runtime dispatch.
17088
#ifdef SIMDJSON_IS_X86_64
17189
#ifdef __clang__

include/simdjson/simdjson.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@
77

88
#include "simdjson/compiler_check.h"
99
#include "simdjson/error.h"
10+
1011
#endif // SIMDJSON_SIMDJSON_H

include/simdjson/westmere.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
11
#ifndef SIMDJSON_WESTMERE_H
22
#define SIMDJSON_WESTMERE_H
33

4+
#ifdef SIMDJSON_FALLBACK_H
5+
#error "westmere.h must be included before fallback.h"
6+
#endif
7+
48
#include "simdjson/portability.h"
59

10+
// Default Westmere to on if this is x86-64, unless we'll always select Haswell.
11+
#ifndef SIMDJSON_IMPLEMENTATION_WESTMERE
12+
#define SIMDJSON_IMPLEMENTATION_WESTMERE (SIMDJSON_IS_X86_64 && !SIMDJSON_REQUIRES_HASWELL)
13+
#endif
14+
#define SIMDJSON_CAN_ALWAYS_RUN_WESTMERE (SIMDJSON_IMPLEMENTATION_WESTMERE && SIMDJSON_IS_X86_64 && __SSE4_2__ && __PCLMUL__)
15+
616
#if SIMDJSON_IMPLEMENTATION_WESTMERE
717

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

0 commit comments

Comments
 (0)