fix hog mismatch on cpu ocl
This commit is contained in:
parent
09ec483d02
commit
cdd9234fae
@ -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,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user