Commit 36c1dce2 authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

Merge pull request #3578 from asmorkalov:ocv_avx

parents 4e9cb475 c778011f
...@@ -144,11 +144,11 @@ if(CMAKE_COMPILER_IS_GNUCXX) ...@@ -144,11 +144,11 @@ if(CMAKE_COMPILER_IS_GNUCXX)
# SSE3 and further should be disabled under MingW because it generates compiler errors # SSE3 and further should be disabled under MingW because it generates compiler errors
if(NOT MINGW) if(NOT MINGW)
if(ENABLE_AVX) if(ENABLE_AVX)
ocv_check_flag_support(CXX "-mavx" _varname) add_extra_compiler_option("-mavx")
endif() endif()
if(ENABLE_AVX2) if(ENABLE_AVX2)
ocv_check_flag_support(CXX "-mavx2" _varname) add_extra_compiler_option("-mavx2")
endif() endif()
# GCC depresses SSEx instructions when -mavx is used. Instead, it generates new AVX instructions or AVX equivalence for all SSEx instructions when needed. # GCC depresses SSEx instructions when -mavx is used. Instead, it generates new AVX instructions or AVX equivalence for all SSEx instructions when needed.
......
...@@ -3002,8 +3002,12 @@ void printVersionInfo(bool useStdOut) ...@@ -3002,8 +3002,12 @@ void printVersionInfo(bool useStdOut)
#if CV_SSE4_2 #if CV_SSE4_2
if (checkHardwareSupport(CV_CPU_SSE4_2)) cpu_features += " sse4.2"; if (checkHardwareSupport(CV_CPU_SSE4_2)) cpu_features += " sse4.2";
#endif #endif
#if CV_AVX
if (checkHardwareSupport(CV_CPU_AVX)) cpu_features += " avx"; if (checkHardwareSupport(CV_CPU_AVX)) cpu_features += " avx";
#endif
#if CV_AVX2
if (checkHardwareSupport(CV_CPU_AVX2)) cpu_features += " avx2"; if (checkHardwareSupport(CV_CPU_AVX2)) cpu_features += " avx2";
#endif
#if CV_NEON #if CV_NEON
cpu_features += " neon"; // NEON is currently not checked at runtime cpu_features += " neon"; // NEON is currently not checked at runtime
#endif #endif
......
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