Sub-buffers are incredibly useful data types and as you continue to explore OpenCL in this chapter, you'll notice that this data type can be used to partition the data and distribute them across your OpenCL devices on your platform.
At the time of this writing, sub-buffer support is not enabled on OpenCL delivered in the OSX 10.6, because the official version is OpenCL 1.0. However, if you have OSX 10.7 then you'll be able to run this code without any problem.
Let's take a look at the method signature and examine it:
cl_mem clCreateSubBuffer(cl_mem buffer, cl_mem_flags flags, cl_buffer_create_type bufferType, const void* buffer_create_info, cl_int* errcode_ret)
buffer refers to the buffer you created ...