5.3.2.2. Image Format Mapping to OpenCL Kernel Language Image Access Qualifiers
5.3.2.2. OpenCL内核语言图像访问限定符的图像格式映射
Image arguments to kernels may have the read_only
, write_only
or read_write
qualifier. Not all image formats supported by the device and platform are valid to be passed to all of these access qualifiers. For each access qualifier, only images whose format is in the list of formats returned by clGetSupportedImageFormats with the given flag arguments in the Image Format Mapping table are permitted. It is not valid to pass an image supporting writing as both a read_only
image and a write_only
image parameter, or to a read_write
image parameter and any other image parameter.
内核的映像参数可能具有read_only、write_only或read_write限定符。并非设备和平台支持的所有图像格式都可以有效地传递给所有这些访问限定符。对于每个访问限定符,只允许其格式在“图像格式映射”表中具有给定标志参数的clGetSupportedImageFormats返回的格式列表中的图像。将支持写入的图像作为只读图像和只读图像参数传递,或传递给读写图像参数和任何其他图像参数都是无效的。
Access Qualifier 访问限定符 | Memory Flags 内存标志 |
---|---|
| CL_MEM_READ_ONLY, |
| CL_MEM_WRITE_ONLY, |
|