Merge pull request #986 from pengx17:2.4_initiated_context
This commit is contained in:
@@ -917,6 +917,14 @@ namespace cv
|
||||
int Context::val = 0;
|
||||
static Mutex cs;
|
||||
static volatile int context_tear_down = 0;
|
||||
|
||||
bool initialized()
|
||||
{
|
||||
return *((volatile int*)&Context::val) != 0 &&
|
||||
Context::clCxt->impl->clCmdQueue != NULL&&
|
||||
Context::clCxt->impl->oclcontext != NULL;
|
||||
}
|
||||
|
||||
Context* Context::getContext()
|
||||
{
|
||||
if(*((volatile int*)&val) != 1)
|
||||
|
Reference in New Issue
Block a user