Querying image objects
Similar to all OpenCL objects, image objects can also be queried using the clGetImageInfo
function. In the previous chapter, we discussed the clGetMemObjectInfo
function, which was used to query the OpenCL cl_mem
object. This API can be used to determine if the cl_mem
object is of type CL_MEM_OBJECT_BUFFER
or one of the image types specified by cl_image_desc.image_type
argument while creating the image object.
Once you know that the cl_mem
object is for an OpenCL image object, you can retrieve information about the image using the clGetImageInfo
function.
cl_int clGetImageInfo (cl_mem image,cl_image_info param_name,size_t param_value_size,void *param_value,size_t *param_value_size_ret)
The different param_name
values which ...
Get OpenCL Programming by Example now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.