mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
This commit is contained in:
@@ -4776,6 +4776,10 @@ public:
|
||||
|
||||
void deallocate_(UMatData* u) const
|
||||
{
|
||||
#ifdef _WIN32
|
||||
if (cv::__termination) // process is not in consistent state (after ExitProcess call) and terminating
|
||||
return; // avoid any OpenCL calls
|
||||
#endif
|
||||
if(u->tempUMat())
|
||||
{
|
||||
CV_Assert(u->origdata);
|
||||
|
||||
@@ -447,7 +447,16 @@ static int numThreads = -1;
|
||||
#elif defined HAVE_HPX
|
||||
// nothing for HPX
|
||||
#elif defined HAVE_OPENMP
|
||||
static int numThreadsMax = omp_get_max_threads();
|
||||
static inline int _initMaxThreads()
|
||||
{
|
||||
int maxThreads = omp_get_max_threads();
|
||||
if (!utils::getConfigurationParameterBool("OPENCV_FOR_OPENMP_DYNAMIC_DISABLE", false))
|
||||
{
|
||||
omp_set_dynamic(maxThreads);
|
||||
}
|
||||
return numThreads;
|
||||
}
|
||||
static int numThreadsMax = _initMaxThreads();
|
||||
#elif defined HAVE_GCD
|
||||
// nothing for GCD
|
||||
#elif defined WINRT
|
||||
|
||||
@@ -298,8 +298,9 @@ TLSData<CoreTLSData>& getCoreTlsData();
|
||||
#define CL_RUNTIME_EXPORT
|
||||
#endif
|
||||
|
||||
extern bool __termination; // skip some cleanups, because process is terminating
|
||||
// (for example, if ExitProcess() was already called)
|
||||
extern CV_EXPORTS
|
||||
bool __termination; // skip some cleanups, because process is terminating
|
||||
// (for example, if ExitProcess() was already called)
|
||||
|
||||
cv::Mutex& getInitializationMutex();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user