Merge pull request #3337 from tstellarAMD:2.4-ocl-context-cleanup-fix
This commit is contained in:
commit
32f978ff4b
@ -11,7 +11,7 @@
|
|||||||
// For Open Source Computer Vision Library
|
// For Open Source Computer Vision Library
|
||||||
//
|
//
|
||||||
// Copyright (C) 2010-2012, Institute Of Software Chinese Academy Of Science, all rights reserved.
|
// Copyright (C) 2010-2012, Institute Of Software Chinese Academy Of Science, all rights reserved.
|
||||||
// Copyright (C) 2010-2012, Advanced Micro Devices, Inc., all rights reserved.
|
// Copyright (C) 2010-2014, Advanced Micro Devices, Inc., all rights reserved.
|
||||||
// Copyright (C) 2010-2012, Multicoreware, Inc., all rights reserved.
|
// Copyright (C) 2010-2012, Multicoreware, Inc., all rights reserved.
|
||||||
// Third party copyrights are property of their respective owners.
|
// Third party copyrights are property of their respective owners.
|
||||||
//
|
//
|
||||||
@ -70,17 +70,6 @@ struct __Module
|
|||||||
cv::Mutex initializationMutex;
|
cv::Mutex initializationMutex;
|
||||||
cv::Mutex currentContextMutex;
|
cv::Mutex currentContextMutex;
|
||||||
};
|
};
|
||||||
static __Module __module;
|
|
||||||
|
|
||||||
cv::Mutex& getInitializationMutex()
|
|
||||||
{
|
|
||||||
return __module.initializationMutex;
|
|
||||||
}
|
|
||||||
|
|
||||||
static cv::Mutex& getCurrentContextMutex()
|
|
||||||
{
|
|
||||||
return __module.currentContextMutex;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool parseOpenCLVersion(const std::string& versionStr, int& major, int& minor)
|
static bool parseOpenCLVersion(const std::string& versionStr, int& major, int& minor)
|
||||||
{
|
{
|
||||||
@ -245,6 +234,18 @@ struct DeviceInfoImpl: public DeviceInfo
|
|||||||
|
|
||||||
static std::vector<PlatformInfoImpl> global_platforms;
|
static std::vector<PlatformInfoImpl> global_platforms;
|
||||||
static std::vector<DeviceInfoImpl> global_devices;
|
static std::vector<DeviceInfoImpl> global_devices;
|
||||||
|
static __Module __module;
|
||||||
|
|
||||||
|
cv::Mutex& getInitializationMutex()
|
||||||
|
{
|
||||||
|
return __module.initializationMutex;
|
||||||
|
}
|
||||||
|
|
||||||
|
static cv::Mutex& getCurrentContextMutex()
|
||||||
|
{
|
||||||
|
return __module.currentContextMutex;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static void split(const std::string &s, char delim, std::vector<std::string> &elems) {
|
static void split(const std::string &s, char delim, std::vector<std::string> &elems) {
|
||||||
std::stringstream ss(s);
|
std::stringstream ss(s);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user