simdjson  3.11.0
Ridiculously Fast JSON
intrinsics.h
1 #ifndef SIMDJSON_ICELAKE_INTRINSICS_H
2 #define SIMDJSON_ICELAKE_INTRINSICS_H
3 
4 #ifndef SIMDJSON_CONDITIONAL_INCLUDE
5 #include "simdjson/icelake/base.h"
6 #endif // SIMDJSON_CONDITIONAL_INCLUDE
7 
8 #if SIMDJSON_VISUAL_STUDIO
9 // under clang within visual studio, this will include <x86intrin.h>
10 #include <intrin.h> // visual studio or clang
11 #else
12 #include <x86intrin.h> // elsewhere
13 #endif // SIMDJSON_VISUAL_STUDIO
14 
15 #if SIMDJSON_CLANG_VISUAL_STUDIO
34 #include <bmiintrin.h> // for _blsr_u64
35 #include <lzcntintrin.h> // for __lzcnt64
36 #include <immintrin.h> // for most things (AVX2, AVX512, _popcnt64)
37 #include <smmintrin.h>
38 #include <tmmintrin.h>
39 #include <avxintrin.h>
40 #include <avx2intrin.h>
41 #include <wmmintrin.h> // for _mm_clmulepi64_si128
42 // Important: we need the AVX-512 headers:
43 #include <avx512fintrin.h>
44 #include <avx512dqintrin.h>
45 #include <avx512cdintrin.h>
46 #include <avx512bwintrin.h>
47 #include <avx512vlintrin.h>
48 #include <avx512vbmiintrin.h>
49 #include <avx512vbmi2intrin.h>
50 // unfortunately, we may not get _blsr_u64, but, thankfully, clang
51 // has it as a macro.
52 #ifndef _blsr_u64
53 // we roll our own
54 #define _blsr_u64(n) ((n - 1) & n)
55 #endif // _blsr_u64
56 #endif // SIMDJSON_CLANG_VISUAL_STUDIO
57 
58 static_assert(sizeof(__m512i) <= simdjson::SIMDJSON_PADDING, "insufficient padding for icelake");
59 
60 #endif // SIMDJSON_ICELAKE_INTRINSICS_H
constexpr size_t SIMDJSON_PADDING
The amount of padding needed in a buffer to parse JSON.
Definition: base.h:32