mirror of
https://github.com/simdjson/simdjson
synced 2026-06-08 17:27:07 +00:00
Fix for ClangCL (Microsoft)
This commit is contained in:
@@ -50,9 +50,9 @@ simdjson_really_inline void simdjson_process_atom(stat_t &s,
|
||||
} else if(element.is<double>()) {
|
||||
s.float_count++;
|
||||
} else if (element.is<bool>()) {
|
||||
simdjson::error_code err;
|
||||
bool v;
|
||||
err = element.get(v);
|
||||
simdjson::error_code error;
|
||||
if ((error = element.get(v))) { std::cerr << error << std::endl; abort(); }
|
||||
if (v) {
|
||||
s.true_count++;
|
||||
} else {
|
||||
|
||||
@@ -41,11 +41,7 @@
|
||||
// has it as a macro.
|
||||
#ifndef _blsr_u64
|
||||
// we roll our own
|
||||
SIMDJSON_TARGET_HASWELL
|
||||
static simdjson_really_inline uint64_t _blsr_u64(uint64_t n) {
|
||||
return (n - 1) & n;
|
||||
}
|
||||
SIMDJSON_UNTARGET_HASWELL
|
||||
#define _blsr_u64(n) ((n - 1) & n)
|
||||
#endif // _blsr_u64
|
||||
#endif // SIMDJSON_CLANG_VISUAL_STUDIO
|
||||
|
||||
|
||||
@@ -37,15 +37,19 @@
|
||||
#include <avxintrin.h>
|
||||
#include <avx2intrin.h>
|
||||
#include <wmmintrin.h> // for _mm_clmulepi64_si128
|
||||
// Important: we need the AVX-512 headers:
|
||||
#include <avx512fintrin.h>
|
||||
#include <avx512dqintrin.h>
|
||||
#include <avx512cdintrin.h>
|
||||
#include <avx512bwintrin.h>
|
||||
#include <avx512vlintrin.h>
|
||||
#include <avx512vbmiintrin.h>
|
||||
#include <avx512vbmi2intrin.h>
|
||||
// unfortunately, we may not get _blsr_u64, but, thankfully, clang
|
||||
// has it as a macro.
|
||||
#ifndef _blsr_u64
|
||||
// we roll our own
|
||||
SIMDJSON_TARGET_ICELAKE
|
||||
static simdjson_really_inline uint64_t _blsr_u64(uint64_t n) {
|
||||
return (n - 1) & n;
|
||||
}
|
||||
SIMDJSON_UNTARGET_ICELAKE
|
||||
#define _blsr_u64(n) ((n - 1) & n)
|
||||
#endif // _blsr_u64
|
||||
#endif // SIMDJSON_CLANG_VISUAL_STUDIO
|
||||
|
||||
|
||||
Reference in New Issue
Block a user