checkError("on clGetDeviceInfo", ret);
int maxWGS = bb.getInt();
out.println("max WGS: " + maxWGS);
// Create a command-queue
long commandQueue = cl.clCreateCommandQueue(context, device, 0, intBuffer);
checkError("on clCreateCommandQueue", intBuffer.get(0));
int localWorkSize = Math.min(128, maxWGS); // set and log Global and Local work size dimensions
int globalWorkSize = roundUp(localWorkSize, ELEMENT_COUNT); // rounded up to the nearest multiple of the LocalWorkSize