OpenCL™规范 5.3.5. 填充图像对象

深入解析TI Jacinto 6汽车信息娱乐处理器:异构架构、硬件设计与开发实战 在嵌入式系统与汽车电子领域,异构计算架构通过集成不同类型的专用处理单元(如CPU、DSP、GPU及硬件加速器),实现了任务的高效分工与能效优化。其核心原理在于“Right Core for the Right Task”,将通用计算、实时信号处理和专用算法卸载到最合适的核心上执行,从而在满足严苛的实时性、可靠性要求的同时,显著提升系统整体性能与功耗比。这一技术对于需要处理多媒体、计算机视觉和复杂控制逻辑的现代汽车信息娱乐(IVI)与高级驾驶辅助系统(ADAS)具有关键价值。德州仪器(TI)的Jacinto 阅读详情
5.3.5. Filling Image Objects
5.3.5. 填充图像对象

Filling image objects is missing before version 1.2.

​
1.2版本之前缺少填充图像对象。

To enqueue a command to fill an image object with a specified color, call the function

要将用指定颜色填充图像对象的命令排入队列,请调用函数

// Provided by CL_VERSION_1_2
cl_int clEnqueueFillImage(
    cl_command_queue command_queue,
    cl_mem image,
    const void* fill_color,
    const size_t* origin,
    const size_t* region,
    cl_uint num_events_in_wait_list,
    const cl_event* event_wait_list,
    cl_event* event);

clEnqueueFillImage is missing before version 1.2.

clEnqueueFillImage在版本1.2之前丢失。

  • command_queue refers to the host command-queue in which the fill command will be queued. The OpenCL context associated with command_queue and image must be the same.

  • command_queue是指填充命令将在其中排队的主机命令队列。与command_queue和image关联的OpenCL上下文必须相同。

  • image is a valid image object.

  • 图像是有效的图像对象。

  • fill_color is the color used to fill the image. The fill color is a single floating-point value if the channel order is CL_DEPTH. Otherwise, the fill color is a four component RGBA floating-point color value if the image channel data type is not an unnormalized signed or unsigned integer type, is a four component signed integer value if the image channel data type is an unnormalized signed integer type and is a four component unsigned integer value if the image channel data type is an unnormalized unsigned integer type. The fill color will be converted to the appropriate image channel format and order associated with image.

  • ​fill_color是用于填充图像的颜色。如果通道顺序为CL_DEPTH,则填充颜色为单个浮点值。否则,如果图像通道数据类型不是非标准化的有符号或无符号整数类型,则填充颜色是四分量RGBA浮点颜色值;如果图像通道的数据类型是非标准化有符号整数类型则填充颜色为四分量有符号整数值;如果图像信道的数据类型为非标准化无符号整数,则填充色为四分量无符号整数值。填充颜色将被转换为与图像相关联的适当图像通道格式和顺序。

  • origin defines the (x, y, z) offset in pixels in the 1D, 2D or 3D image, the (x, y) offset and the image index in the 2D image array or the (x) offset and the image index in the 1D image array. If image is a 2D image object, origin[2] must be 0. If image is a 1D image or 1D image buffer object, origin[1] and origin[2] must be 0. If image is a 1D image array object, origin[2] must be 0. If image is a 1D image array object, origin[1] describes the image index in the 1D image array. If image is a 2D image array object, origin[2] describes the image index in the 2D image array. If image is a mipmapped image, the mip level to fill is determined from origin as described in Specifying Mipmap Levels to Image Operations

  • origin定义1D、2D或3D图像中以像素为单位的(x,y,z)偏移、2D图像阵列中的(x、y)偏移和图像索引或1D图像阵列中(x)偏移和图象索引。如果图像是2D图像对象,则原点[2]必须为0。如果图像是1D图像或1D图像缓冲区对象,则origin[1]和origin[2]必须为0。如果图像是1D图像阵列对象,则origin[2]必须为0。如果图像是1D图像阵列对象,origin[1]描述1D图像数组中的图像索引。如果图像是2D图像阵列对象,origin[2]描述2D图像阵列中的图像索引。如果图像是Mipmap图像,则要填充的mip级别是从原点确定的,如“为图像操作指定Mipmap级别”中所述

  • region defines the (width, height, depth) in pixels of the 1D, 2D or 3D rectangle, the (width, height) in pixels of the 2D rectangle and the number of images of a 2D image array or the (width) in pixels of the 1D rectangle and the number of images of a 1D image array. If image is a 2D image object, region[2] must be 1. If image is a 1D image or 1D image buffer object, region[1] and region[2] must be 1. If image is a 1D image array object, region[2] must be 1. The values in region cannot be 0.

  • region定义1D、2D或3D矩形的(宽度、高度、深度)(以像素为单位)、2D矩形的(宽、高)和2D图像阵列的图像数量或1D矩形的(高)和1D图像阵列的(宽)和图像数量。如果图像是2D图像对象,则region[2]必须为1。如果图像是1D图像或1D图像缓冲对象,则region[1]和region[2]必须为1。如果图像是1D图像阵列对象,则region[2]必须为1。region中的值不能为0。

  • event_wait_list and num_events_in_wait_list specify events that need to complete before this particular command can be executed. If event_wait_list is NULL, then this particular command does not wait on any event to complete. If event_wait_list is NULL, num_events_in_wait_list must be 0. If event_wait_list is not NULL, the list of events pointed to by event_wait_list must be valid and num_events_in_wait_list must be greater than 0. The events specified in event_wait_list act as synchronization points. The context associated with events in event_wait_list and command_queue must be the same. The memory associated with event_wait_list can be reused or freed after the function returns.

  • event_wait_list和num_events_in_wait_list指定在执行此特定命令之前需要完成的事件。如果event_wait_list为NULL,则此特定命令不等待任何事件完成。如果event_wait_list为NULL,则num_events_in_wait_list必须为0。如果event_wait_list不为NULL,则event_wail_list指向的事件列表必须有效,并且num_events_in_wait_list必须大于0。event_wait_list中指定的事件充当同步点。与event_wait_list和command_queue中的事件关联的上下文必须相同。函数返回后,可以重用或释放与event_wait_list关联的内存。

  • event returns an event object that identifies this command and can be used to query or queue a wait for this command to complete. If event is NULL or the enqueue is unsuccessful, no event will be created and therefore it will not be possible to query the status of this command or to wait for this command to complete. If event_wait_list and event are not NULL, event must not refer to an element of the event_wait_list array.

  • event返回一个标识此命令的事件对象,可用于查询或排队等待此命令完成。如果事件为NULL或排队不成功,则不会创建任何事件,因此无法查询此命令的状态或等待此命令完成。如果event_wait_list和event不为NULL,则event不能引用event_wail_list数组的元素。

The usage information which indicates whether the memory object can be read or written by a kernel and/or the host and is given by the cl_mem_flags argument value specified when image is created is ignored by clEnqueueFillImage.

​clEnqueueFillImage会忽略使用信息,该使用信息指示内存对象是否可以由内核或主机读取或写入,并且由创建映像时指定的cl_mem_flags参数值提供。

clEnqueueFillImage returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:

如果函数执行成功,clEnqueueFillImage将返回CL_SUCCESS。否则,它将返回以下错误之一:

  • CL_INVALID_COMMAND_QUEUE if command_queue is not a valid host command-queue.

  • CL_INVALID_COMMAND_QUEUE(如果命令队列不是有效的主机命令队列)。

  • CL_INVALID_CONTEXT if the context associated with command_queue and image are not the same or if the context associated with command_queue and events in event_wait_list are not the same.

  • 如果与command_queue和image相关联的上下文不相同,或者与command_ queue和event_wait_list中的事件相关联的语境不相同,则CL_INVALID_CONTEXT。

  • CL_INVALID_MEM_OBJECT if image is not a valid image object.

  • CL_INVALID_MEM_OBJECT(如果图像不是有效的图像对象)。

  • CL_INVALID_VALUE if fill_color is NULL.

  • 如果fill_color为NULL,则CL_INVALID_VALUE。

  • CL_INVALID_VALUE if origin or region is NULL.

  • CL_INVALID_VALUE(如果origin或region为NULL)。

  • CL_INVALID_VALUE if the region being filled as specified by origin and region is out of bounds.

  • CL_INVALID_VALUE,如果按origin和region指定填充的区域越界。

  • CL_INVALID_VALUE if values in origin and region do not follow rules described in the argument description for origin and region.

  • CL_INVALID_VALUE,如果原点和区域中的值不遵循origin和region的参数描述中描述的规则。

  • CL_INVALID_EVENT_WAIT_LIST if event_wait_list is NULL and num_events_in_wait_list > 0, or event_wait_list is not NULL and num_events_in_wait_list is 0, or if event objects in event_wait_list are not valid events.

  • CL_INVALID_EVENT_WAIT_LIST如果event_wait_list为NULL且num_events_in_wait_list>0,或者event_wait_list不为NULL且num_events_in_wait_list为0,或者如果event_wait_list中的事件对象不是有效事件。

  • CL_INVALID_IMAGE_SIZE if image dimensions (image width, height, specified or compute row and/or slice pitch) for image are not supported by device associated with queue.

  • CL_INVALID_IMAGE_SIZE如果与队列相关联的设备不支持图像的图像尺寸(图像宽度、高度、指定或计算行和/或切片间距)。

  • CL_IMAGE_FORMAT_NOT_SUPPORTED if image format (image channel order and data type) for image are not supported by device associated with queue.

  • 如果与队列关联的设备不支持图像的图像格式(图像通道顺序和数据类型),则CL_IMAGE_FORMAT_NOT_SUPPORTED。

  • CL_MEM_OBJECT_ALLOCATION_FAILURE if there is a failure to allocate memory for data store associated with image.

  • CL_MEM_OBJECT_ALLOCATION_FAILURE(如果为与图像相关的数据存储分配内存失败)。

  • CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device.

  • CL_OUT_OF_RESOURCES,如果在设备上分配OpenCL实现所需的资源失败。

  • CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host.

  • CL_OUT_OF_HOST_MEMORY,如果在主机上分配OpenCL实现所需的资源失败。

  • CL_INVALID_MIP_LEVEL if the cl_khr_mipmap_image extension is supported, and the mip level specified in origin is not a valid level for image,

  • CL_INVALID_MIP_LEVEL如果支持CL_khr_mipmap_image扩展,并且在origin中指定的MIP级别不是图像的有效级别,

MATLAB 在体积约束下的桁架优化,包括双载箱摩托车车架研究。.zip 1.版本:matlab2014a/2019b/2024b 2.附赠案例数据可直接运行。 3.代码特点:参数化编程、参数可方便更改、代码编程思路清晰、注释明细。 4.适用对象:计算机,电子信息工程、数学等专业的大学生课程设计、期末大作业和毕业设计。 立即下载

相关推荐

电动汽车购买预测数据集66万条消费记录

本数据集包含668665条电动汽车消费行为记录,用于二分类任务:预测消费者是否会购买电动汽车。每行为一位消费者的完整画像,含15列:唯一id、13个特征与目标变量。特征覆盖人口属性(年龄25至69岁、性别、城市类型城区或郊区或乡村、年收入3万至18.85万美元)、出行习惯(每日通勤里程、现有车辆数)、充电基础设施(家庭与单位附近充电站数量、是否可家庭充电)、政策与态度(补贴可用性、环保关注度1至5级、里程焦虑水平),目标列为是否购买EV。约17%的记录为正类,天然的类别不平衡适合练习分层抽样与AUC、F1等评价指标。数据源自公开教学竞赛系列第六季第九期的训练集,由模型基于真实EV行为调查数据合成生成,特征分布接近但不等于真实数据,不含真实个人,适合作完整数据集自行切分训练与测试集。建模前建议删除无预测意义的id列,并注意年收入下限3万美元与通勤下限5公里存在截断堆积。典型用途:二分类全流程练习(探索性分析、编码、建模、评估)、数据泄露演示、逻辑回归与梯度提升模型对比、充电可及性与补贴政策等特征重要性研究。数据采用CC BY 4.0许可,注明来源即可用于学习研究与商业分析。

OpenCL™规范 5.3.8. 为图像操作指定Mipmap级别

每个命令要访问的mipmap图像级别是根据访问单个图像时的origin参数(非复制功能)确定的,或者根据访问两个src_image和dst_image图像时的src_origin和dst_origin参数确定的(复制功能)。如果图像是2D图像阵列或3D图像,[1]指定要使用的mip级别。[2]指定要使用的mip级别。[2]指定要使用的mip级别。[3]指定要使用的mip级别。如果图像是1D图像阵列,如果图像是1D图像,如果图像是2D图像,

aggs1990的专栏 216

深圳市在推进粤港澳大湾区技术转移协作中,有哪些标杆性的服务机构合作案例?.docx

深圳市在推进粤港澳大湾区技术转移协作中,有哪些标杆性的服务机构合作案例?

要点初见:OpenCL 2.0 异构计算 [第三版] 知识点整理

目录 OpenCL 2.0 异构计算 [第三版] (Heterogeneous Computing with OpenCL 2.0) Intel opencl sdk下载安装 OpenCL较大的改变 第1章 异构计算简介 异构计算:串行处理、并行处理 加速的方法 CMOS 并发与并行 线程 共享内存模型 瓶颈 消息通讯机制 并行计算的粒度 细粒度并行 粗粒度并行 粗细粒度选择 将数据视为向量 数据共享的用途 OpenCL2.0的三种共享虚拟内存 OpenCL2.0新特

m0_37857300的博客 4001

技术转移中介在提供知识产权评估和交易撮合服务时,通常遵循哪些行业标准?.docx

技术转移中介在提供知识产权评估和交易撮合服务时,通常遵循哪些行业标准?

技术转移示范机构在促进产业链创新链融合方面有哪些创新模式?.docx

技术转移示范机构在促进产业链创新链融合方面有哪些创新模式?

膨胀腐蚀-OpenCL加速及kernel变成二进制文件

讨论后自己写了一个腐蚀膨胀,开操作: int myopen(Mat bwsrc, Mat &dstimg2, int kernelwidth = 2) { int comparerows = bwsrc.rows; int comparecols = bwsrc.cols; //do erode... Mat dstimg(bwsrc.size(), CV_8UC1, Scalar(0)

wd1603926823的专栏 2186

福建省技术转移机构在合同谈判中通常注意哪些法律风险?.docx

科易网基于行业知识库+行业大数据+科技资源要素+AI模型,以AI,赋能技术转移、成果转化、技术经理人培训、知识产权管理、区域产业分析与布局、地方科技招商、创新创业大赛等场景,推出科技创新领域的AI工具、场景化服务和数智化解决方案,推动科技创新与产业创新智能化发展。

OpenCL的学习---矩阵转置问题及用FreeImage保存灰度图

对灰度图像矩阵转置:图像宽1080 高720 kernel: __kernel void transposeMatrix(__global uchar* srcimgdata,__global uchar* dstimgdata,int width,int height) { int id=get_global_id(0); for(int i=id;i<width*height;

wd1603926823的专栏 2120

福建省同行技术转移机构在拓展政府客户资源时有哪些高效方法?.docx

福建省同行技术转移机构在拓展政府客户资源时有哪些高效方法?

前端开发基于history.js的HTML5与HTML4浏览器兼容方案:单页应用无刷新历史状态管理技术实现-8GueZ2Mgbd1795531053

内容概要:本文系统介绍了如何利用history.js实现单页应用(SPA)在HTML5c与HTML4浏览器间s草错发的无缝历史状态管理。通过封装原生History API并在不支持的浏览器中自动降级为哈希路由,history.js解决了因浏览器兼容性导致的后退按钮失效、URL混乱等问题。文章详细讲解了其核心机制,包括状态对象管理、自动模式切换(HTML5 pushState vs HTML4 哈希)、状态数据持久化以及针,对Safari、IE等浏\览器的兼容性修复方案,并提供了从入门到实战的完整示例,涵盖初始化、事,件监听、页面加载及性能优化技巧。;8GueZ2Mgbd1795531053 http://fajiazhibomianfei.org/index.html http://fajiazhibomeifeikan.com/index.html http://fajiazhibomianfei.com/index.html http://fajiazhibomianfeibofang.com/index.html http://fajiazhiboliansai.com/index.html

Differences from OpenCL 1.1 to 1.2

This article will be of interest if you don’t want to read the whole new specifications [PDF] for OpenCL 1.2. As always, feedback will be much appreciated. After many meetings with the many me

szu030606的专栏 2722

零命令行!用浏览器 3 步部署一个宠物健康档案系统

零命令行!用浏览器 3 步部署一个宠物健康档案系统

OpenCL™规范官方指南文档目录

OpenCL™规范-CSDN博客

aggs1990的专栏 1669

微软输入法资源包22621

微软输入法资源包22621

地方科技局如何搭建成果转化数智化平台?绩效评估的关键路径与破局之策.docx

科易网基于行业知识库+行业大数据+科技资源要素+AI模型,以AI,赋能技术转移、成果转化、技术经理人培训、知识产权管理、区域产业分析与布局、地方科技招商、创新创业大赛等场景,推出科技创新领域的AI工具、场景化服务和数智化解决方案,推动科技创新与产业创新智能化发展。

AI硬件加速与光通信状态机:Xilinx AIE编程与CFP模块设计实践

在异构计算与高速通信领域,硬件加速架构和协议状态机是实现高性能、低功耗系统的核心技术。从原理上看,专用AI加速引擎通过并行向量处理器阵列优化计算密集型任务,而状态机则通过定义明确的逻辑序列确保硬件模块的可靠控制。这些技术的工程价值在于能够显著提升AI推理、信号处理和数据传输的能效与吞吐量。在应用场景上,它们广泛服务于5G/6G无线通信、数据中心互联、边缘AI和计算机视觉等前沿领域。本文聚焦于Xilinx AI Engine编程和CFP光模块状态机设计,深入探讨了其核心概念、开发流程与验证方法,为从事FPGA

weixin_33881140的博客 431

MS941-01_Rev.8(EN).pdf

MS941-01_Rev.8(EN).pdf

上一篇: OpenCL™规范 5.3.4. 读、写和复制图像对象
下一篇: Qt6.7.1发布
꧁白杨树下꧂
博客等级 码龄15年 1019粉丝 209原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值