标签:tps 专用 point UNC 应该 lis 格式 for hal
在穿件image对象的时候,需要传入一个cl_image_format参数,该参数结果包含image_channel_order和image_channel_data_type两个成员。前一个成员表示的是image对象含有的内容及其顺序,如下表
这个很好理解,表示是的image对象的数据表示了哪些图像通道内容以及其顺序。
然后image_channel_data_type的可用值如下:
这个成员表示了两层含义:
例如:
参考:
As far as storage is concerned, these types are identical. In both cases, each pixel channel value will be stored as an 8-bit integer, with values in the range 0-255. The difference comes when reading/writing the image from a kernel.
For the CL_UNSIGNED_INT8 type, you will use the
read_imageui
andwrite_imageui
functions to access the image. These functions will return (or accept) an unsigned integer, with values in the same range as the storage type.
For the CL_UNORM_INT8 type, you will use the
read_imagef
andwrite_imagef
functions to access to the image. These functions will return (or accept) a normalised floating point value, in the range 0.0f - 1.0f. Some devices (e.g. most GPUs) have hardware support for normalising texture values, so the conversion between integer and normalised floating point values will be very efficient.
标签:tps 专用 point UNC 应该 lis 格式 for hal
原文地址:https://www.cnblogs.com/willhua/p/9899120.html