Commit 578ca872 authored by Vincent Rabaud's avatar Vincent Rabaud

- add support for the popcnt instruction (useful for the Hamming distance, soon…

- add support for the popcnt instruction (useful for the Hamming distance, soon to come in BRIEF and FLANN)
parent 28c2d3b8
...@@ -262,6 +262,7 @@ CV_EXPORTS int64 getCPUTickCount(); ...@@ -262,6 +262,7 @@ CV_EXPORTS int64 getCPUTickCount();
- CV_CPU_SSSE3 - SSSE 3 - CV_CPU_SSSE3 - SSSE 3
- CV_CPU_SSE4_1 - SSE 4.1 - CV_CPU_SSE4_1 - SSE 4.1
- CV_CPU_SSE4_2 - SSE 4.2 - CV_CPU_SSE4_2 - SSE 4.2
- CV_CPU_POPCNT - POPCOUNT
- CV_CPU_AVX - AVX - CV_CPU_AVX - AVX
\note {Note that the function output is not static. Once you called cv::useOptimized(false), \note {Note that the function output is not static. Once you called cv::useOptimized(false),
......
...@@ -1705,6 +1705,7 @@ CVAPI(double) cvGetTickFrequency( void ); ...@@ -1705,6 +1705,7 @@ CVAPI(double) cvGetTickFrequency( void );
#define CV_CPU_SSSE3 5 #define CV_CPU_SSSE3 5
#define CV_CPU_SSE4_1 6 #define CV_CPU_SSE4_1 6
#define CV_CPU_SSE4_2 7 #define CV_CPU_SSE4_2 7
#define CV_CPU_POPCNT 8
#define CV_CPU_AVX 10 #define CV_CPU_AVX 10
#define CV_HARDWARE_MAX_FEATURE 255 #define CV_HARDWARE_MAX_FEATURE 255
......
...@@ -139,6 +139,7 @@ struct HWFeatures ...@@ -139,6 +139,7 @@ struct HWFeatures
f.have[CV_CPU_SSSE3] = (cpuid_data[2] & (1<<9)) != 0; f.have[CV_CPU_SSSE3] = (cpuid_data[2] & (1<<9)) != 0;
f.have[CV_CPU_SSE4_1] = (cpuid_data[2] & (1<<19)) != 0; f.have[CV_CPU_SSE4_1] = (cpuid_data[2] & (1<<19)) != 0;
f.have[CV_CPU_SSE4_2] = (cpuid_data[2] & (1<<20)) != 0; f.have[CV_CPU_SSE4_2] = (cpuid_data[2] & (1<<20)) != 0;
f.have[CV_CPU_POPCNT] = (cpuid_data[2] & (1<<23)) != 0;
f.have[CV_CPU_AVX] = (cpuid_data[2] & (1<<28)) != 0; f.have[CV_CPU_AVX] = (cpuid_data[2] & (1<<28)) != 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment