#include "cl.cvl" #include #include #include /* Defined in cl.cvl: (+ means that it will be used) + cl_device_id cl_context + cl_command_queue cl_program cl_kernel ? cl_mem Methods that will be shared: clGetDeviceIDs clEnqueueNDRangeKernel workfunc goes into main program, but a method Methods that will be replaced with simple parts, see wiki: clCreateBuffer setKernelArgs clGetKernelWorkGroupInfo clEnqueueReadBuffer */ int clGetDeviceIDs(int numEntries, cl_device_id * devices) { *devices = (cl_device_id*)malloc(sizeof(cl_device_id)); devices.id = (int*)malloc(sizeof(int)); devices.id[0] = 1; return CL_SUCCESS; }