For clCreateBuffer( ), the spec says that for CL_MEM_USE_HOST_PTR, if we supply host_ptr during the call to clCreateBuffer( ), the OpenCL implementation would use the memory bits used by host_ptr while creating the buffer object.
But following this paragraph, it says, the result of OpenCL commands that operate on multiple buffer objects created with the same host_ptr or overlapping host regions is considered to be undefined.
Isn’t the second para a direct contradiction to what is specified initially. While creating the buffer object, the memory data from the host_ptr would be used in the buffer object. Once the buffer object has been created, it has nothing to do with the host_ptr from which it was created or vice versa. So if multiple buffers are created with the same host_ptr, it shouldn’t matter at all, isn’t it? Can someone please clear this to me? I guess I am missing some thing here. Thanks a lot.