Commit 7b3e3f69 authored by peng xiao's avatar peng xiao

Modify according to @alalek.

parent 3c2a8912
...@@ -81,12 +81,15 @@ static Mutex cs; ...@@ -81,12 +81,15 @@ static Mutex cs;
void cv::ocl::clBlasSetup() void cv::ocl::clBlasSetup()
{ {
if(!clBlasInitialized)
{
AutoLock al(cs); AutoLock al(cs);
if(!clBlasInitialized) if(!clBlasInitialized)
{ {
openCLSafeCall(clAmdBlasSetup()); openCLSafeCall(clAmdBlasSetup());
clBlasInitialized = true; clBlasInitialized = true;
} }
}
} }
void cv::ocl::clBlasTeardown() void cv::ocl::clBlasTeardown()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment