提交 1138a38d 编写于 作者: M Maksim Shabunin

Use explicit no-sse flags when SSE is off

Also:
- Silence clang warnings about unsupported command line arguments
- Add diagnostic print to calib3d test
- Fixed perf test relative error check
- Fix iOS build problem
上级 6a5f413f
......@@ -98,6 +98,10 @@ if(CMAKE_COMPILER_IS_GNUCXX)
add_extra_compiler_option(-pthread)
endif()
if(CMAKE_COMPILER_IS_CLANGCXX)
add_extra_compiler_option(-Qunused-arguments)
endif()
if(OPENCV_WARNINGS_ARE_ERRORS)
add_extra_compiler_option(-Werror)
endif()
......@@ -127,6 +131,8 @@ if(CMAKE_COMPILER_IS_GNUCXX)
endif()
if(ENABLE_SSE2)
add_extra_compiler_option(-msse2)
elseif(X86 OR X86_64)
add_extra_compiler_option(-mno-sse2)
endif()
if(ENABLE_NEON)
add_extra_compiler_option("-mfpu=neon")
......@@ -139,6 +145,8 @@ if(CMAKE_COMPILER_IS_GNUCXX)
if(NOT MINGW)
if(ENABLE_AVX)
add_extra_compiler_option(-mavx)
elseif(X86 OR X86_64)
add_extra_compiler_option(-mno-avx)
endif()
if(ENABLE_AVX2)
add_extra_compiler_option(-mavx2)
......@@ -152,18 +160,26 @@ if(CMAKE_COMPILER_IS_GNUCXX)
if(NOT OPENCV_EXTRA_CXX_FLAGS MATCHES "-mavx")
if(ENABLE_SSE3)
add_extra_compiler_option(-msse3)
elseif(X86 OR X86_64)
add_extra_compiler_option(-mno-sse3)
endif()
if(ENABLE_SSSE3)
add_extra_compiler_option(-mssse3)
elseif(X86 OR X86_64)
add_extra_compiler_option(-mno-ssse3)
endif()
if(ENABLE_SSE41)
add_extra_compiler_option(-msse4.1)
elseif(X86 OR X86_64)
add_extra_compiler_option(-mno-sse4.1)
endif()
if(ENABLE_SSE42)
add_extra_compiler_option(-msse4.2)
elseif(X86 OR X86_64)
add_extra_compiler_option(-mno-sse4.2)
endif()
if(ENABLE_POPCNT)
......
......@@ -183,6 +183,9 @@ protected:
method, totalTestsCount - successfulTestsCount, totalTestsCount, maxError, mode);
ts->set_failed_test_info(cvtest::TS::FAIL_BAD_ACCURACY);
}
cout << "mode: " << mode << ", method: " << method << " -> "
<< ((double)successfulTestsCount / totalTestsCount) * 100 << "%"
<< " (err < " << maxError << ")" << endl;
}
}
}
......
......@@ -438,9 +438,9 @@ static int countViolations(const cv::Mat& expected, const cv::Mat& actual, const
if (v > 0 && max_violation != 0 && max_allowed != 0)
{
int loc[10];
int loc[10] = {0};
cv::minMaxIdx(maximum, 0, max_allowed, 0, loc, mask);
*max_violation = diff64f.at<double>(loc[1], loc[0]);
*max_violation = diff64f.at<double>(loc[0], loc[1]);
}
return v;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册