Merge pull request #982 from pengx17:2.4_fix_two_bugs
This commit is contained in:
commit
5bb6d36684
@ -930,8 +930,6 @@ namespace cv
|
|||||||
clCxt.reset(new Context);
|
clCxt.reset(new Context);
|
||||||
std::vector<Info> oclinfo;
|
std::vector<Info> oclinfo;
|
||||||
CV_Assert(getDevice(oclinfo, CVCL_DEVICE_TYPE_ALL) > 0);
|
CV_Assert(getDevice(oclinfo, CVCL_DEVICE_TYPE_ALL) > 0);
|
||||||
oclinfo[0].impl->setDevice(0, 0, 0);
|
|
||||||
clCxt.get()->impl = oclinfo[0].impl->copy();
|
|
||||||
|
|
||||||
*((volatile int*)&val) = 1;
|
*((volatile int*)&val) = 1;
|
||||||
}
|
}
|
||||||
@ -1056,7 +1054,7 @@ BOOL WINAPI DllMain( HINSTANCE, DWORD fdwReason, LPVOID )
|
|||||||
Context* cv_ctx = Context::getContext();
|
Context* cv_ctx = Context::getContext();
|
||||||
if(cv_ctx)
|
if(cv_ctx)
|
||||||
{
|
{
|
||||||
cl_context ctx = (cl_context)&(cv_ctx->impl->oclcontext);
|
cl_context ctx = cv_ctx->impl->oclcontext;
|
||||||
if(ctx)
|
if(ctx)
|
||||||
openCLSafeCall(clReleaseContext(ctx));
|
openCLSafeCall(clReleaseContext(ctx));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user