mirror of
https://github.com/opencv/opencv.git
synced 2025-06-08 01:53:19 +08:00
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
This commit is contained in:
commit
7b57df02a7
@ -91,6 +91,12 @@ ocv_cmake_hook(CMAKE_INIT)
|
|||||||
|
|
||||||
# must go before the project()/enable_language() commands
|
# must go before the project()/enable_language() commands
|
||||||
ocv_update(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "Configs" FORCE)
|
ocv_update(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "Configs" FORCE)
|
||||||
|
if(NOT DEFINED CMAKE_BUILD_TYPE
|
||||||
|
AND NOT OPENCV_SKIP_DEFAULT_BUILD_TYPE
|
||||||
|
)
|
||||||
|
message(STATUS "'Release' build type is used by default. Use CMAKE_BUILD_TYPE to specify build type (Release or Debug)")
|
||||||
|
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build")
|
||||||
|
endif()
|
||||||
if(DEFINED CMAKE_BUILD_TYPE)
|
if(DEFINED CMAKE_BUILD_TYPE)
|
||||||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "${CMAKE_CONFIGURATION_TYPES}")
|
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "${CMAKE_CONFIGURATION_TYPES}")
|
||||||
endif()
|
endif()
|
||||||
@ -610,10 +616,6 @@ endif()
|
|||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
# OpenCV compiler and linker options
|
# OpenCV compiler and linker options
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
# In case of Makefiles if the user does not setup CMAKE_BUILD_TYPE, assume it's Release:
|
|
||||||
if(CMAKE_GENERATOR MATCHES "Makefiles|Ninja" AND "${CMAKE_BUILD_TYPE}" STREQUAL "")
|
|
||||||
set(CMAKE_BUILD_TYPE Release)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
ocv_cmake_hook(POST_CMAKE_BUILD_OPTIONS)
|
ocv_cmake_hook(POST_CMAKE_BUILD_OPTIONS)
|
||||||
|
|
||||||
|
@ -241,7 +241,7 @@ if(X86 OR X86_64)
|
|||||||
ocv_intel_compiler_optimization_option(FP16 "-mavx" "/arch:AVX")
|
ocv_intel_compiler_optimization_option(FP16 "-mavx" "/arch:AVX")
|
||||||
ocv_intel_compiler_optimization_option(AVX "-mavx" "/arch:AVX")
|
ocv_intel_compiler_optimization_option(AVX "-mavx" "/arch:AVX")
|
||||||
ocv_intel_compiler_optimization_option(FMA3 "" "")
|
ocv_intel_compiler_optimization_option(FMA3 "" "")
|
||||||
ocv_intel_compiler_optimization_option(POPCNT "" "")
|
ocv_intel_compiler_optimization_option(POPCNT "-mpopcnt" "") # -mpopcnt is available since ICC 19.0.0
|
||||||
ocv_intel_compiler_optimization_option(SSE4_2 "-msse4.2" "/arch:SSE4.2")
|
ocv_intel_compiler_optimization_option(SSE4_2 "-msse4.2" "/arch:SSE4.2")
|
||||||
ocv_intel_compiler_optimization_option(SSE4_1 "-msse4.1" "/arch:SSE4.1")
|
ocv_intel_compiler_optimization_option(SSE4_1 "-msse4.1" "/arch:SSE4.1")
|
||||||
ocv_intel_compiler_optimization_option(SSE3 "-msse3" "/arch:SSE3")
|
ocv_intel_compiler_optimization_option(SSE3 "-msse3" "/arch:SSE3")
|
||||||
|
@ -719,6 +719,8 @@ __CV_ENUM_FLAGS_BITWISE_XOR_EQ (EnumType, EnumType)
|
|||||||
# elif __cplusplus >= 201703L
|
# elif __cplusplus >= 201703L
|
||||||
// available when compiler is C++17 compliant
|
// available when compiler is C++17 compliant
|
||||||
# define CV_NODISCARD_STD [[nodiscard]]
|
# define CV_NODISCARD_STD [[nodiscard]]
|
||||||
|
# elif defined(__INTEL_COMPILER)
|
||||||
|
// see above, available when C++17 is enabled
|
||||||
# elif defined(_MSC_VER) && _MSC_VER >= 1911 && _MSVC_LANG >= 201703L
|
# elif defined(_MSC_VER) && _MSC_VER >= 1911 && _MSVC_LANG >= 201703L
|
||||||
// available with VS2017 v15.3+ with /std:c++17 or higher; works on functions and classes
|
// available with VS2017 v15.3+ with /std:c++17 or higher; works on functions and classes
|
||||||
# define CV_NODISCARD_STD [[nodiscard]]
|
# define CV_NODISCARD_STD [[nodiscard]]
|
||||||
|
@ -244,7 +244,7 @@ struct v_uint64x2
|
|||||||
explicit v_uint64x2(__m128i v) : val(v) {}
|
explicit v_uint64x2(__m128i v) : val(v) {}
|
||||||
v_uint64x2(uint64 v0, uint64 v1)
|
v_uint64x2(uint64 v0, uint64 v1)
|
||||||
{
|
{
|
||||||
#if defined(_MSC_VER) && _MSC_VER >= 1920/*MSVS 2019*/ && defined(_M_X64)
|
#if defined(_MSC_VER) && _MSC_VER >= 1920/*MSVS 2019*/ && defined(_M_X64) && !defined(__clang__)
|
||||||
val = _mm_setr_epi64x((int64_t)v0, (int64_t)v1);
|
val = _mm_setr_epi64x((int64_t)v0, (int64_t)v1);
|
||||||
#elif defined(__GNUC__)
|
#elif defined(__GNUC__)
|
||||||
val = _mm_setr_epi64((__m64)v0, (__m64)v1);
|
val = _mm_setr_epi64((__m64)v0, (__m64)v1);
|
||||||
@ -278,7 +278,7 @@ struct v_int64x2
|
|||||||
explicit v_int64x2(__m128i v) : val(v) {}
|
explicit v_int64x2(__m128i v) : val(v) {}
|
||||||
v_int64x2(int64 v0, int64 v1)
|
v_int64x2(int64 v0, int64 v1)
|
||||||
{
|
{
|
||||||
#if defined(_MSC_VER) && _MSC_VER >= 1920/*MSVS 2019*/ && defined(_M_X64)
|
#if defined(_MSC_VER) && _MSC_VER >= 1920/*MSVS 2019*/ && defined(_M_X64) && !defined(__clang__)
|
||||||
val = _mm_setr_epi64x((int64_t)v0, (int64_t)v1);
|
val = _mm_setr_epi64x((int64_t)v0, (int64_t)v1);
|
||||||
#elif defined(__GNUC__)
|
#elif defined(__GNUC__)
|
||||||
val = _mm_setr_epi64((__m64)v0, (__m64)v1);
|
val = _mm_setr_epi64((__m64)v0, (__m64)v1);
|
||||||
|
@ -47,12 +47,15 @@
|
|||||||
|
|
||||||
#include "opencv2/core/hal/interface.h"
|
#include "opencv2/core/hal/interface.h"
|
||||||
|
|
||||||
#if defined __GNUC__
|
#if defined(__clang__) // clang or MSVC clang
|
||||||
# pragma GCC diagnostic push
|
#pragma clang diagnostic push
|
||||||
# pragma GCC diagnostic ignored "-Wunused-parameter"
|
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||||
#elif defined _MSC_VER
|
#elif defined(_MSC_VER)
|
||||||
#pragma warning(push)
|
#pragma warning(push)
|
||||||
#pragma warning(disable : 4100)
|
#pragma warning(disable : 4100)
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//! @addtogroup core_hal_interface
|
//! @addtogroup core_hal_interface
|
||||||
@ -731,10 +734,12 @@ inline int hal_ni_minMaxIdx(const uchar* src_data, size_t src_step, int width, i
|
|||||||
//! @}
|
//! @}
|
||||||
|
|
||||||
|
|
||||||
#if defined __GNUC__
|
#if defined(__clang__)
|
||||||
# pragma GCC diagnostic pop
|
#pragma clang diagnostic pop
|
||||||
#elif defined _MSC_VER
|
#elif defined(_MSC_VER)
|
||||||
#pragma warning(pop)
|
#pragma warning(pop)
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "hal_internal.hpp"
|
#include "hal_internal.hpp"
|
||||||
|
@ -44,12 +44,15 @@
|
|||||||
|
|
||||||
#include "opencv2/core/hal/interface.h"
|
#include "opencv2/core/hal/interface.h"
|
||||||
|
|
||||||
#if defined __GNUC__
|
#if defined(__clang__) // clang or MSVC clang
|
||||||
# pragma GCC diagnostic push
|
#pragma clang diagnostic push
|
||||||
# pragma GCC diagnostic ignored "-Wunused-parameter"
|
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||||
#elif defined _MSC_VER
|
#elif defined(_MSC_VER)
|
||||||
#pragma warning(push)
|
#pragma warning(push)
|
||||||
#pragma warning(disable : 4100)
|
#pragma warning(disable : 4100)
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//! @addtogroup features2d_hal_interface
|
//! @addtogroup features2d_hal_interface
|
||||||
@ -103,10 +106,12 @@ inline int hal_ni_FAST(const uchar* src_data, size_t src_step, int width, int he
|
|||||||
//! @}
|
//! @}
|
||||||
|
|
||||||
|
|
||||||
#if defined __GNUC__
|
#if defined(__clang__)
|
||||||
# pragma GCC diagnostic pop
|
#pragma clang diagnostic pop
|
||||||
#elif defined _MSC_VER
|
#elif defined(_MSC_VER)
|
||||||
#pragma warning(pop)
|
#pragma warning(pop)
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "custom_hal.hpp"
|
#include "custom_hal.hpp"
|
||||||
|
@ -48,12 +48,15 @@
|
|||||||
#include "opencv2/core/hal/interface.h"
|
#include "opencv2/core/hal/interface.h"
|
||||||
#include "opencv2/imgproc/hal/interface.h"
|
#include "opencv2/imgproc/hal/interface.h"
|
||||||
|
|
||||||
#if defined __GNUC__
|
#if defined(__clang__) // clang or MSVC clang
|
||||||
# pragma GCC diagnostic push
|
#pragma clang diagnostic push
|
||||||
# pragma GCC diagnostic ignored "-Wunused-parameter"
|
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||||
#elif defined _MSC_VER
|
#elif defined(_MSC_VER)
|
||||||
#pragma warning(push)
|
#pragma warning(push)
|
||||||
#pragma warning(disable : 4100)
|
#pragma warning(disable : 4100)
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//! @addtogroup imgproc_hal_interface
|
//! @addtogroup imgproc_hal_interface
|
||||||
@ -809,10 +812,12 @@ inline int hal_ni_canny(const uchar* src_data, size_t src_step, uchar* dst_data,
|
|||||||
|
|
||||||
//! @}
|
//! @}
|
||||||
|
|
||||||
#if defined __GNUC__
|
#if defined(__clang__)
|
||||||
# pragma GCC diagnostic pop
|
#pragma clang diagnostic pop
|
||||||
#elif defined _MSC_VER
|
#elif defined(_MSC_VER)
|
||||||
#pragma warning(pop)
|
#pragma warning(pop)
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "custom_hal.hpp"
|
#include "custom_hal.hpp"
|
||||||
|
Loading…
Reference in New Issue
Block a user