Added knearest neighbor of OpenCL version.

It includes the accuracy/performance test and the implementation of KNN.
This commit is contained in:
Jin Ma
2013-09-22 10:22:09 +08:00
parent 94966b38c0
commit 06c33df307
4 changed files with 34 additions and 1 deletions

View File

@@ -1033,6 +1033,14 @@ namespace cv
return impl->maxComputeUnits;
}
unsigned long queryLocalMemInfo()
{
Info::Impl* impl = Context::getContext()->impl;
cl_ulong local_memory_size = 0;
clGetDeviceInfo(impl->devices[impl->devnum], CL_DEVICE_LOCAL_MEM_SIZE, sizeof(cl_ulong), (void*)&local_memory_size, 0);
return local_memory_size;
}
void* Context::oclContext()
{
return impl->oclcontext;