Merge pull request #2073 from KonstantinMatskevich:ocl_tapi_clahe

This commit is contained in:
Andrey Pavlenko
2013-12-31 00:17:33 +04:00
committed by OpenCV Buildbot
4 changed files with 375 additions and 15 deletions

View File

@@ -489,6 +489,7 @@ public:
bool runTask(bool sync, const Queue& q=Queue());
size_t workGroupSize() const;
size_t preferedWorkGroupSizeMultiple() const;
bool compileWorkGroupSize(size_t wsz[]) const;
size_t localMemSize() const;

View File

@@ -2817,6 +2817,16 @@ size_t Kernel::workGroupSize() const
sizeof(val), &val, &retsz) >= 0 ? val : 0;
}
size_t Kernel::preferedWorkGroupSizeMultiple() const
{
if(!p)
return 0;
size_t val = 0, retsz = 0;
cl_device_id dev = (cl_device_id)Device::getDefault().ptr();
return clGetKernelWorkGroupInfo(p->handle, dev, CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE,
sizeof(val), &val, &retsz) >= 0 ? val : 0;
}
bool Kernel::compileWorkGroupSize(size_t wsz[]) const
{
if(!p || !wsz)