I would like to know what is the difference between :
oclBuff = clCreateBuffer(gpu_context, CL_MEM_READ_ONLY | CL_MEM_COPY_HOST_PTR, mem_size, dataSet, &err);
oclBuff = clCreateBuffer(gpu_context, CL_MEM_READ_ONLY, mem_size, NULL, &err);
err = clEnqueueWriteBuffer(cmd_queue, dataSet, CL_TRUE, 0, mem_size, a, 0, NULL, NULL);
Which one I should use in which case ? and why ? Or it is exactly the same ?