simdjson: Missing intrisincs includes?

I’m not sure if I’m doing something non-standard when compiling clickhouse, but I seem to be hitting some missing intrinsics includes when compiling simdjson. It seems that some source files expect __m256i to be declared after include/simdjson/portability.h is included, but I only see a _MSC_VER piece there.

Do we need something like this?

diff --git a/include/simdjson/portability.h b/include/simdjson/portability.h
index 12f1eaf..253e909 100644
--- a/include/simdjson/portability.h
+++ b/include/simdjson/portability.h
@@ -65,6 +65,13 @@

 #ifdef _MSC_VER
 #include <intrin.h> // visual studio
+#elif defined(__AVX2__)
+#ifdef IS_ARM64
+#include <arm_neon.h>
+#endif
+#ifdef IS_X86_64
+#include <x86intrin.h>
+#endif
 #endif

Or am I misreading this and these are declared elsewhere?

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 19 (10 by maintainers)

Most upvoted comments

I am going to add a test for your particular issue with the amal. build so that we catch this sort of build issue earlier in the future.