 <p>In order to be able to use DMA, the buffers should be in page-locked memory. AMD and NVIDIA state in their programming guide that to have a buffer in page-locked memory it should be created with the CL_MEM_ALLOC_HOST_PTR flag. Here is what NVIDIA says in the section 3.3.1 of its <a href="http://hpc.oit.uci.edu/nvidia-doc/sdk-cuda-doc/OpenCL/doc/OpenCL_Programming_Guide.pdf" rel="nofollow">guide:</a></p> <blockquote> <p>OpenCL applications do not have direct control over whether memory objects are allocated in page-locked memory or not, but they can create objects using the CL_MEM_ALLOC_HOST_PTR flag and such objects are <strong>likely</strong> to be allocated in page-locked memory by the driver for best performance.</p> </blockquote> <p>Note the "likely" in bold. </p> <p>Which OS? NVIDIA doesn't speak about the OS so any OS NVIDIA provides drivers for (the same for AMD). <br/>Which Hardware? Any having DMA controller I guess.</p> <p>Now to write only a part of a buffer you could have a look to the <a href="http://www.khronos.org/registry/cl/sdk/1.2/docs/man/xhtml/clEnqueueWriteBufferRect.html" rel="nofollow">function</a>:</p> <pre><code>clEnqueueWriteBufferRect() </code></pre> <p>This function allow to write to a 2 or 3D region of a buffer. Another possibility would be to use sub buffers creating them with the <a href="http://www.khronos.org/registry/cl/sdk/1.2/docs/man/xhtml/clCreateSubBuffer.html" rel="nofollow">function</a>: </p> <pre><code>clCreateSubBuffer() </code></pre> <p>However there is no notion of 2D buffer with it.</p>