mirror of
https://github.com/opencv/opencv.git
synced 2025-08-06 14:36:36 +08:00
core(parallel): propagate FP denormals mode
This commit is contained in:
parent
123519165d
commit
b1d484f827
@ -142,6 +142,9 @@
|
|||||||
|
|
||||||
#include "opencv2/core/detail/exception_ptr.hpp" // CV__EXCEPTION_PTR = 1 if std::exception_ptr is available
|
#include "opencv2/core/detail/exception_ptr.hpp" // CV__EXCEPTION_PTR = 1 if std::exception_ptr is available
|
||||||
|
|
||||||
|
#include <opencv2/core/utils/fp_control_utils.hpp>
|
||||||
|
#include <opencv2/core/utils/fp_control.private.hpp>
|
||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
|
|
||||||
namespace cv {
|
namespace cv {
|
||||||
@ -191,6 +194,9 @@ namespace {
|
|||||||
|
|
||||||
// propagate main thread state
|
// propagate main thread state
|
||||||
rng = cv::theRNG();
|
rng = cv::theRNG();
|
||||||
|
#if OPENCV_SUPPORTS_FP_DENORMALS_HINT && OPENCV_IMPL_FP_HINTS
|
||||||
|
details::saveFPDenormalsState(fp_denormals_base_state);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef OPENCV_TRACE
|
#ifdef OPENCV_TRACE
|
||||||
traceRootRegion = CV_TRACE_NS::details::getCurrentRegion();
|
traceRootRegion = CV_TRACE_NS::details::getCurrentRegion();
|
||||||
@ -271,6 +277,11 @@ namespace {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if OPENCV_SUPPORTS_FP_DENORMALS_HINT && OPENCV_IMPL_FP_HINTS
|
||||||
|
details::FPDenormalsModeState fp_denormals_base_state;
|
||||||
|
#endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ParallelLoopBodyWrapperContext(const ParallelLoopBodyWrapperContext&); // disabled
|
ParallelLoopBodyWrapperContext(const ParallelLoopBodyWrapperContext&); // disabled
|
||||||
ParallelLoopBodyWrapperContext& operator=(const ParallelLoopBodyWrapperContext&); // disabled
|
ParallelLoopBodyWrapperContext& operator=(const ParallelLoopBodyWrapperContext&); // disabled
|
||||||
@ -307,6 +318,9 @@ namespace {
|
|||||||
|
|
||||||
// propagate main thread state
|
// propagate main thread state
|
||||||
cv::theRNG() = ctx.rng;
|
cv::theRNG() = ctx.rng;
|
||||||
|
#if OPENCV_SUPPORTS_FP_DENORMALS_HINT && OPENCV_IMPL_FP_HINTS
|
||||||
|
FPDenormalsIgnoreHintScope fp_denormals_scope(ctx.fp_denormals_base_state);
|
||||||
|
#endif
|
||||||
|
|
||||||
cv::Range r;
|
cv::Range r;
|
||||||
cv::Range wholeRange = ctx.wholeRange;
|
cv::Range wholeRange = ctx.wholeRange;
|
||||||
|
Loading…
Reference in New Issue
Block a user