diff --git a/benchmark/dom/statisticalmodel.cpp b/benchmark/dom/statisticalmodel.cpp index afc81df2e..677876f59 100644 --- a/benchmark/dom/statisticalmodel.cpp +++ b/benchmark/dom/statisticalmodel.cpp @@ -50,9 +50,9 @@ simdjson_really_inline void simdjson_process_atom(stat_t &s, } else if(element.is()) { s.float_count++; } else if (element.is()) { - 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 { diff --git a/include/simdjson/haswell/intrinsics.h b/include/simdjson/haswell/intrinsics.h index 801461231..da15dfa6c 100644 --- a/include/simdjson/haswell/intrinsics.h +++ b/include/simdjson/haswell/intrinsics.h @@ -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 diff --git a/include/simdjson/icelake/intrinsics.h b/include/simdjson/icelake/intrinsics.h index 31935c0df..e5715f112 100644 --- a/include/simdjson/icelake/intrinsics.h +++ b/include/simdjson/icelake/intrinsics.h @@ -37,15 +37,19 @@ #include #include #include // for _mm_clmulepi64_si128 +// Important: we need the AVX-512 headers: +#include +#include +#include +#include +#include +#include +#include // 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