Commit cdd9234f authored by yao's avatar yao

fix hog mismatch on cpu ocl

parent 09ec483d
...@@ -1758,8 +1758,20 @@ void cv::ocl::device::hog::compute_hists(int nbins, ...@@ -1758,8 +1758,20 @@ void cv::ocl::device::hog::compute_hists(int nbins,
args.push_back( make_pair( sizeof(cl_mem), (void *)&block_hists.data)); args.push_back( make_pair( sizeof(cl_mem), (void *)&block_hists.data));
args.push_back( make_pair( smem, (void *)NULL)); args.push_back( make_pair( smem, (void *)NULL));
if(hog_device_cpu)
{
openCLExecuteKernel(clCxt, &objdetect_hog, kernelName, globalThreads, openCLExecuteKernel(clCxt, &objdetect_hog, kernelName, globalThreads,
localThreads, args, -1, -1); localThreads, args, -1, -1, "-D CPU");
}else
{
cl_kernel kernel = openCLGetKernelFromSource(clCxt, &objdetect_hog, kernelName);
int wave_size = queryDeviceInfo<WAVEFRONT_SIZE, int>(kernel);
char opt[32] = {0};
sprintf(opt, "-D WAVE_SIZE=%d", wave_size);
openCLExecuteKernel(clCxt, &objdetect_hog, kernelName, globalThreads,
localThreads, args, -1, -1, opt);
}
} }
void cv::ocl::device::hog::normalize_hists(int nbins, void cv::ocl::device::hog::normalize_hists(int nbins,
......
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