Commit b14c314f authored by Alexander Karsakov's avatar Alexander Karsakov

Fixed incorrect thread synchronizations

parent 30a8308f
...@@ -141,9 +141,8 @@ __kernel void compute_hists_lut_kernel( ...@@ -141,9 +141,8 @@ __kernel void compute_hists_lut_kernel(
final_hist[(cell_x * 2 + cell_y) * cnbins + bin_id] = final_hist[(cell_x * 2 + cell_y) * cnbins + bin_id] =
hist_[0] + hist_[1] + hist_[2]; hist_[0] + hist_[1] + hist_[2];
} }
#ifdef CPU
barrier(CLK_LOCAL_MEM_FENCE); barrier(CLK_LOCAL_MEM_FENCE);
#endif
int tid = (cell_y * CELLS_PER_BLOCK_Y + cell_x) * 12 + cell_thread_x; int tid = (cell_y * CELLS_PER_BLOCK_Y + cell_x) * 12 + cell_thread_x;
if ((tid < cblock_hist_size) && (gid < blocks_total)) if ((tid < cblock_hist_size) && (gid < blocks_total))
......
...@@ -110,7 +110,7 @@ OCL_TEST_P(HOG, Detect) ...@@ -110,7 +110,7 @@ OCL_TEST_P(HOG, Detect)
OCL_OFF(hog.detectMultiScale(img, cpu_found, 0, Size(8, 8), Size(0, 0), 1.05, 6)); OCL_OFF(hog.detectMultiScale(img, cpu_found, 0, Size(8, 8), Size(0, 0), 1.05, 6));
OCL_ON(hog.detectMultiScale(uimg, gpu_found, 0, Size(8, 8), Size(0, 0), 1.05, 6)); OCL_ON(hog.detectMultiScale(uimg, gpu_found, 0, Size(8, 8), Size(0, 0), 1.05, 6));
EXPECT_LT(checkRectSimilarity(img.size(), cpu_found, gpu_found), 1.0); EXPECT_LT(checkRectSimilarity(img.size(), cpu_found, gpu_found), 0.05);
} }
INSTANTIATE_TEST_CASE_P(OCL_ObjDetect, HOG, testing::Combine( INSTANTIATE_TEST_CASE_P(OCL_ObjDetect, HOG, testing::Combine(
......
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