Skip to content

Commit fba27ef

Browse files
committed
I missed a few. Building up VS support.
1 parent 19cdc09 commit fba27ef

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

include/simdjson/simdjson.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ enum class instruction_set {
1212
// the 'native' enum class value should point at a good default on the current machine
1313
#ifdef __AVX2__
1414
native = avx2
15-
#elif defined(__ARM_NEON)
15+
#elif defined(__ARM_NEON) || (defined(_MSC_VER) && defined(_M_ARM64))
1616
native = neon
1717
#else
1818
// Let us assume that we have an old x64 processor, but one that has SSE (i.e., something

src/jsonparser.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,20 @@ int json_parse_dispatch(const uint8_t *buf, size_t len, ParsedJson &pj, bool rea
1414
#ifdef __AVX2__
1515
json_parse_functype* avx_implementation = &json_parse_implementation<instruction_set::avx2>;
1616
#endif
17-
#ifdef __SSE4_2__
17+
#if defined(__SSE4_2__) || (defined(_MSC_VER) && defined(_M_AMD64))
1818
json_parse_functype* sse4_2_implementation = &json_parse_implementation<instruction_set::sse4_2>;
1919
#endif
20-
#ifdef __ARM_NEON
20+
#if defined(__ARM_NEON) || (defined(_MSC_VER) && defined(_M_ARM64))
2121
json_parse_functype* neon_implementation = &json_parse_implementation<instruction_set::neon>;
2222
#endif
2323

2424
// Determining which implementation is the more suitable
2525
// Should be done at runtime. Does not make any sense on preprocessor.
2626
#ifdef __AVX2__
2727
instruction_set best_implementation = instruction_set::avx2;
28-
#elif defined (__SSE4_2__)
28+
#elif defined (__SSE4_2__) || (defined(_MSC_VER) && defined(_M_AMD64))
2929
instruction_set best_implementation = instruction_set::sse4_2;
30-
#elif defined (__ARM_NEON)
30+
#elif defined (__ARM_NEON) || (defined(_MSC_VER) && defined(_M_ARM64))
3131
instruction_set best_implementation = instruction_set::neon;
3232
#else
3333
instruction_set best_implementation = instruction_set::none;
@@ -45,7 +45,7 @@ int json_parse_dispatch(const uint8_t *buf, size_t len, ParsedJson &pj, bool rea
4545
json_parse_ptr = sse4_2_implementation;
4646
break;
4747
#endif
48-
#ifdef __ARM_NEON
48+
#if defined(__ARM_NEON) || (defined(_MSC_VER) && defined(_M_ARM64))
4949
case instruction_set::neon :
5050
json_parse_ptr = neon_implementation;
5151
break;

0 commit comments

Comments
 (0)