I missed a few. Building up VS support.
This commit is contained in:
parent
19cdc09928
commit
fba27ef4b9
|
@ -12,7 +12,7 @@ enum class instruction_set {
|
|||
// the 'native' enum class value should point at a good default on the current machine
|
||||
#ifdef __AVX2__
|
||||
native = avx2
|
||||
#elif defined(__ARM_NEON)
|
||||
#elif defined(__ARM_NEON) || (defined(_MSC_VER) && defined(_M_ARM64))
|
||||
native = neon
|
||||
#else
|
||||
// Let us assume that we have an old x64 processor, but one that has SSE (i.e., something
|
||||
|
|
|
@ -14,10 +14,10 @@ int json_parse_dispatch(const uint8_t *buf, size_t len, ParsedJson &pj, bool rea
|
|||
#ifdef __AVX2__
|
||||
json_parse_functype* avx_implementation = &json_parse_implementation<instruction_set::avx2>;
|
||||
#endif
|
||||
#ifdef __SSE4_2__
|
||||
#if defined(__SSE4_2__) || (defined(_MSC_VER) && defined(_M_AMD64))
|
||||
json_parse_functype* sse4_2_implementation = &json_parse_implementation<instruction_set::sse4_2>;
|
||||
#endif
|
||||
#ifdef __ARM_NEON
|
||||
#if defined(__ARM_NEON) || (defined(_MSC_VER) && defined(_M_ARM64))
|
||||
json_parse_functype* neon_implementation = &json_parse_implementation<instruction_set::neon>;
|
||||
#endif
|
||||
|
||||
|
@ -25,9 +25,9 @@ int json_parse_dispatch(const uint8_t *buf, size_t len, ParsedJson &pj, bool rea
|
|||
// Should be done at runtime. Does not make any sense on preprocessor.
|
||||
#ifdef __AVX2__
|
||||
instruction_set best_implementation = instruction_set::avx2;
|
||||
#elif defined (__SSE4_2__)
|
||||
#elif defined (__SSE4_2__) || (defined(_MSC_VER) && defined(_M_AMD64))
|
||||
instruction_set best_implementation = instruction_set::sse4_2;
|
||||
#elif defined (__ARM_NEON)
|
||||
#elif defined (__ARM_NEON) || (defined(_MSC_VER) && defined(_M_ARM64))
|
||||
instruction_set best_implementation = instruction_set::neon;
|
||||
#else
|
||||
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
|
|||
json_parse_ptr = sse4_2_implementation;
|
||||
break;
|
||||
#endif
|
||||
#ifdef __ARM_NEON
|
||||
#if defined(__ARM_NEON) || (defined(_MSC_VER) && defined(_M_ARM64))
|
||||
case instruction_set::neon :
|
||||
json_parse_ptr = neon_implementation;
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue