i'm not really shure if my assumption is correct so maybe some can clearify it.
I'm Writing unittests for an OpenCL Abstraction layer including alle the basics. I Wont to test if reading and writing vor images and buffers works fine. For that i do the following (in pseudocode)
Code :float fData; fData = 1.f; fData = 1.f; createBuffer();//Create the buffer in correct size writeData(fData);//Write the Data to OpenCL memset(fData,0,8*4);//Clear the host mem readData(fData);//Read back the data from OpenCL
I'm asking myself if the Data will be transported to CL without any usage of that buffer. If I remember correctly, the data doesn't have to be pushed to the openCl device until its used. So will that code really test the memory transfer? Or does it only copies the values in host memory address space?