Skip to content

Commit 799430a

Browse files
committed
Make it possible to disable the simd code
1 parent 3111db7 commit 799430a

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

include/json_struct/json_struct.h

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

185185
#define JS_UNUSED(x) (void)(x)
186186

187+
#ifndef JS_DISABLE_SIMD
187188
#if defined(__SSE2__) || defined(_M_X64) || (defined(_M_IX86_FP) && _M_IX86_FP >= 2)
188189
#define JSON_STRUCT_HAS_SSE2 1
189190
#include <emmintrin.h>
@@ -208,6 +209,8 @@
208209
#define JSON_STRUCT_HAS_NEON 1
209210
#include <arm_neon.h>
210211
#endif
212+
#endif
213+
211214

212215
#if defined(__GNUC__) || defined(__clang__)
213216
#define JSON_STRUCT_LIKELY(x) __builtin_expect(!!(x), 1)

0 commit comments

Comments
 (0)