36
36
#include " simdjson/stage2_build_tape.h"
37
37
38
38
// Global arguments
39
- static bool find_marks_only = false ;
39
+ bool find_marks_only = false ;
40
+ bool verbose = false ;
41
+ bool dump = false ;
42
+ bool json_output = false ;
43
+ bool force_one_iteration = false ;
44
+ bool just_data = false ;
45
+ bool force_sse = false ;
46
+ int32_t iterations = -1 ;
47
+ int32_t warmup_iterations = -1 ;
40
48
41
49
namespace simdjson {
42
50
Architecture _find_best_supported_implementation () {
@@ -47,7 +55,7 @@ Architecture _find_best_supported_implementation() {
47
55
instruction_set::SSE42 | instruction_set::PCLMULQDQ;
48
56
uint32_t supports = detect_supported_architectures ();
49
57
// Order from best to worst (within architecture)
50
- if ((haswell_flags & supports) == haswell_flags) {
58
+ if ((haswell_flags & supports) == haswell_flags && !force_sse ) {
51
59
return Architecture::HASWELL;
52
60
}
53
61
if ((westmere_flags & supports) == westmere_flags) {
@@ -125,25 +133,21 @@ unified_functype *unified_ptr = &unified_machine_dispatch;
125
133
} // namespace simdjson
126
134
127
135
int main (int argc, char *argv[]) {
128
- bool verbose = false ;
129
- bool dump = false ;
130
- bool json_output = false ;
131
- bool force_one_iteration = false ;
132
- bool just_data = false ;
133
- int32_t iterations = -1 ;
134
- int32_t warmup_iterations = -1 ;
135
136
136
137
#ifndef _MSC_VER
137
138
int c;
138
139
139
- while ((c = getopt (argc, argv, " 1vdtn:w:f " )) != -1 ) {
140
+ while ((c = getopt (argc, argv, " 1vdtn:w:fs " )) != -1 ) {
140
141
switch (c) {
141
142
case ' n' :
142
143
iterations = atoi (optarg );
143
144
break ;
144
145
case ' w' :
145
146
warmup_iterations = atoi (optarg );
146
147
break ;
148
+ case ' s' :
149
+ force_sse = true ;
150
+ break ;
147
151
case ' t' :
148
152
just_data = true ;
149
153
break ;
0 commit comments