1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +04:00

Merge pull request #27925 from intel-staging:dev/enforce_ipp_define

Added CMake define option to enforce IPP calls in IPP HAL when building with IPP integration #27925

Extra build option needed to simplify custom builds with IPP integration to ensure the IPP calls done even in cases when the results are not bitwise compliant to the reference OpenCV implementation. Option name is ```WITH_IPP_CALLS_ENFORCED```, and it is disabled by default.

Requested by some IPP customers and might be used in general as a way providing calls with better performance for the cases the aligned precision is not as important aspect.

Supposed to be used in HAL only, so added only in IPP HAL CMake, currently it affects only Warp Affine, Warp Perspective and Remap integrations since the results may vary depending on HW and algorithm implementations.

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [ ] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
This commit is contained in:
victorget
2025-11-11 11:30:47 +01:00
committed by GitHub
parent 2dd0ac3122
commit 3e49b6fa93
+6 -1
View File
@@ -21,7 +21,7 @@ add_library(ipphal STATIC
#TODO: HAVE_IPP_ICV and HAVE_IPP_IW added as private macro till OpenCV itself is
# source of IPP and public definitions lead to redefinition warning
# The macro should be redefined as PUBLIC when IPP part is removed from core
# to make HAL the source of IPP integration
# to make HAL the source of IPP integration. The same is true for WITH_IPP_CALLS_ENFORCED
if(HAVE_IPP_ICV)
target_compile_definitions(ipphal PRIVATE HAVE_IPP_ICV)
endif()
@@ -30,6 +30,11 @@ if(HAVE_IPP_IW)
target_compile_definitions(ipphal PRIVATE HAVE_IPP_IW)
endif()
if(WITH_IPP_CALLS_ENFORCED)
target_compile_definitions(ipphal PRIVATE IPP_CALLS_ENFORCED)
message("WITH_IPP_CALLS_ENFORCED=${WITH_IPP_CALLS_ENFORCED}: enforced IPP calls are enabled in IPP HAL")
endif()
target_include_directories(ipphal PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/include")
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wno-suggest-override)