I'm trying to copy an image using OpenCL:
std::string kernelCode =
"void kernel copy(global const int* image, global int* result)"
"{"
"result[get_global_id(0)] = image[get_global_id(0)];"
"}";
The image contains 200 * 300 pixels.
The maximum number of work-items is 4100 according to CL_DEVICE_MAX_WORK_GROUP_SIZE
In the queue:
int size = _originalImage.width() * _originalImage.height();
//...
queue.enqueueNDRangeKernel(imgProcess, cl::NullRange, cl::NDRange(size), cl::NullRange);
Gives segfault.
queue.enqueueNDRangeKernel(imgProcess, cl::NullRange, cl::NDRange(10000), cl::NullRange);
Runs fine, but it gives back only part of the image.
What am I missing here?