Hi,
I'm having a very strange problem. The results in the buffer after a blocking enqueueReadBuffer are not valid. The first few numbers are right and the rest are garbage.
I have basically re-copied the tutorial: http://developer.amd.com/GPU/ATISTREAMSDK/pages/TutorialOpenCL.aspx
making very small modifications to the code and kernel. Namely, the char to float conversion of the buffer and CL_MEM_COPY_HOST_PTR rather than CL_MEM_USE_HOST_PTR.
I'm using Intel Core 2 Quad, Windows 7 x64. Version 2.1 Stream SDK.
#pragma OPENCL EXTENSION cl_khr_byte_addressable_store : enable __constant char hw[] = "Hello World\n"; __kernel void hello(__global float * out) { size_t tid = get_global_id(0); out[tid] = tid; } //And host code changes: float * outH = new float[hw.length()+1]; cl::Buffer outCL( context, CL_MEM_WRITE_ONLY | CL_MEM_COPY_HOST_PTR, hw.length()+1, outH, &err);