40 #include "SkelCL/detail/KernelUtil.h"
46 namespace kernelUtil {
48 void setKernelArgs(cl::Kernel& ,
54 size_t getKernelGroupSize(cl::Kernel kernel,
const Device&
device) {
56 kernel.getWorkGroupInfo(device.clDevice(), CL_KERNEL_WORK_GROUP_SIZE, &datasize);
60 size_t determineWorkgroupSizeForKernel(cl::Kernel kernel,
const Device& device) {
61 size_t kernelMaxWorkgroupSize = getKernelGroupSize(kernel, device);
62 size_t deviceMaxWorkgroupSize = device.maxWorkGroupSize();
63 return kernelMaxWorkgroupSize < deviceMaxWorkgroupSize ? kernelMaxWorkgroupSize : deviceMaxWorkgroupSize;
SKELCL_DLL detail::DeviceID device(size_t dID)
Creates an OpenCL device ID to be used as parameter of the init(detail::PlatformID, detail::DeviceID) function.