Commit b49fa7d3 authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

Merge pull request #3625 from wangyan42164:ocl_cascade_deadlock

parents 479cac2a f5b21e81
...@@ -587,7 +587,7 @@ bool HaarEvaluator::read(const FileNode& node, Size _origWinSize) ...@@ -587,7 +587,7 @@ bool HaarEvaluator::read(const FileNode& node, Size _origWinSize)
localSize = lbufSize = Size(0, 0); localSize = lbufSize = Size(0, 0);
if (ocl::haveOpenCL()) if (ocl::haveOpenCL())
{ {
if (ocl::Device::getDefault().isAMD()) if (ocl::Device::getDefault().isAMD() || ocl::Device::getDefault().isIntel())
{ {
localSize = Size(8, 8); localSize = Size(8, 8);
lbufSize = Size(origWinSize.width + localSize.width, lbufSize = Size(origWinSize.width + localSize.width,
......
...@@ -233,11 +233,12 @@ void runHaarClassifier( ...@@ -233,11 +233,12 @@ void runHaarClassifier(
for( stageIdx = SPLIT_STAGE; stageIdx < N_STAGES; stageIdx++ ) for( stageIdx = SPLIT_STAGE; stageIdx < N_STAGES; stageIdx++ )
{ {
barrier(CLK_LOCAL_MEM_FENCE);
int nrects = lcount[0]; int nrects = lcount[0];
barrier(CLK_LOCAL_MEM_FENCE);
if( nrects == 0 ) if( nrects == 0 )
break; break;
barrier(CLK_LOCAL_MEM_FENCE);
if( lidx == 0 ) if( lidx == 0 )
lcount[0] = 0; lcount[0] = 0;
......
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