File tree Expand file tree Collapse file tree 2 files changed +23
-7
lines changed Expand file tree Collapse file tree 2 files changed +23
-7
lines changed Original file line number Diff line number Diff line change 1
- #include < nmmintrin.h>
2
- #ifndef _MSC_VER
3
- #include < popcntintrin.h>
1
+ #ifdef _MSC_VER
2
+ # include < nmmintrin.h>
3
+ # if defined(_M_X64)
4
+ # define CV_POPCNT_U64 _mm_popcnt_u64
5
+ # endif
6
+ # define CV_POPCNT_U32 _mm_popcnt_u32
7
+ #else
8
+ # include < popcntintrin.h>
9
+ # if defined(__x86_64__)
10
+ # define CV_POPCNT_U64 __builtin_popcountll
11
+ # endif
12
+ # define CV_POPCNT_U32 __builtin_popcount
4
13
#endif
5
- int main () {
6
- int i = _mm_popcnt_u64 (1 );
14
+
15
+ int main ()
16
+ {
17
+ #ifdef CV_POPCNT_U64
18
+ int i = CV_POPCNT_U64 (1 );
19
+ #endif
20
+ int j = CV_POPCNT_U32 (1 );
7
21
return 0 ;
8
22
}
Original file line number Diff line number Diff line change 1
1
#include < nmmintrin.h>
2
- int main () {
3
- int i = _mm_popcnt_u64 (1 );
2
+
3
+ int main ()
4
+ {
5
+ unsigned int res = _mm_crc32_u8 (1 , 2 );
4
6
return 0 ;
5
7
}
You can’t perform that action at this time.
0 commit comments