OpenCL™规范 5.3.7. 映射图像对象

OpenCL clCreateBuffer占用太多时间 最近在做一个图像处理的算法,跑在高通平台上,需要使用OpenCL加速。代码分为三个部分: 1. 初始化 2. 处理图像 3. 释放资源 为了尽可能地减少算法的运行时间,我将一切可以预处理的内容都放到了初始化中,其中就包括了创建buffer。在初始化中,我调用clCreateBuffer()创建了9个buffer,共计约占用600MB内存。然后在处理图像中重复使用这些buffer,最后在释放... 阅读详情
5.3.7. Mapping Image Objects
5.3.7. 映射图像对象

To enqueue a command to map a region in the image object given by image into the host address space and returns a pointer to this mapped region, call the function

要将一个命令排入队列,将图像对象中由图像给出的区域映射到主机地址空间,并返回指向该映射区域的指针,请调用函数

// Provided by CL_VERSION_1_0
void* clEnqueueMapImage(
    cl_command_queue command_queue,
    cl_mem image,
    cl_bool blocking_map,
    cl_map_flags map_flags,
    const size_t* origin,
    const size_t* region,
    size_t* image_row_pitch,
    size_t* image_slice_pitch,
    cl_uint num_events_in_wait_list,
    const cl_event* event_wait_list,
    cl_event* event,
    cl_int* errcode_ret);
  • command_queue must be a valid host command-queue.

  • command_queue必须是有效的主机命令队列。

  • image is a valid image object. The OpenCL context associated with command_queue and image must be the same.

  • image是有效的图像对象。与command_queue和image关联的OpenCL上下文必须相同。

  • blocking_map indicates if the map operation is blocking or non-blocking.

  • blocking_map指示映射操作是阻塞还是非阻塞。

  • map_flags is a bit-field and is described in the Memory Map Flags table.

  • ​map_flags是一个位字段,在Memory map flags表中进行了描述。

  • 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.

  • origin定义1D、2D或3D图像中以像素为单位的(x,y,z)偏移、2D图像阵列中的(x、y)偏移和图像索引或1D图像阵列中(x)偏移和图象索引。如果图像是2D图像对象,则origin[2]必须为0。如果图像是1D图像或1D图像缓冲区对象,则origin[1]和原点[2]必须为0。如果图像是1D图像阵列对象,则origin[2]必须为0。如果图像是1D图像阵列对象,origin[1]描述1D图像数组中的图像索引。如果图像是2D图像阵列对象,origin[2]描述2D图像阵列中的图像索引。

  • 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。

  • image_row_pitch returns the scan-line pitch in bytes for the mapped region. This must be a non-NULL value.

  • image_row_pitch返回映射区域的扫描线间距(以字节为单位)。这必须是一个非NULL值。

  • image_slice_pitch returns the size in bytes of each 2D slice of a 3D image or the size of each 1D or 2D image in a 1D or 2D image array for the mapped region. For a 1D and 2D image, zero is returned if this argument is not NULL. For a 3D image, 1D and 2D image array, image_slice_pitch must be a non-NULL value.

  • image_slice_pitch返回以字节为单位的3D图像的每个2D切片的大小或映射区域的1D或2D图像阵列中的每个1D或二维图像的大小。对于1D和2D图像,如果此参数不为NULL,则返回零。对于3D图像、1D和2D图像阵列,image_slice_pitch必须是非NULL值。

  • event_wait_list and num_events_in_wait_list specify events that need to complete before clEnqueueMapImage can be executed. If event_wait_list is NULL, then clEnqueueMapImage 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指定在执行clEnqueueMapImage之前需要完成的事件。如果event_wait_list为NULL,则clEnqueueMapImage不等待任何事件完成。如果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数组的元素。

  • errcode_ret will return an appropriate error code. If errcode_ret is NULL, no error code is returned.

  • errcode_ret将返回相应的错误代码。如果errcode_ret为NULL,则不会返回任何错误代码。

If blocking_map is CL_TRUE, clEnqueueMapImage does not return until the specified region in image is mapped into the host address space and the application can access the contents of the mapped region using the pointer returned by clEnqueueMapImage.

​如果blocking_map为CL_TRUE,则clEnqueueMapImage不会返回,直到映像中的指定区域映射到主机地址空间,并且应用程序可以使用clEnqueueMappingImage返回的指针访问映射区域的内容。

If blocking_map is CL_FALSE i.e. map operation is non-blocking, the pointer to the mapped region returned by clEnqueueMapImage cannot be used until the map command has completed. The event argument returns an event object which can be used to query the execution status of the map command. When the map command is completed, the application can access the contents of the mapped region using the pointer returned by clEnqueueMapImage.

​如果blocking_map为CL_FALSE,即map操作为非blocking,则在map命令完成之前,无法使用clEnqueueMapImage返回的指向映射区域的指针。事件参数返回一个事件对象,该对象可用于查询map命令的执行状态。map命令完成后,应用程序可以使用clEnqueueMapImage返回的指针访问映射区域的内容。

clEnqueueMapImage will return a pointer to the mapped region. The errcode_ret is set to CL_SUCCESS.

clEnqueueMapImage将返回一个指向映射区域的指针。errcode_ret设置为CL_SUCCESS。

A NULL pointer is returned otherwise with one of the following error values returned in errcode_ret:

否则将返回NULL指针,并在errcode_ret中返回以下错误值之一:

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

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

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

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

  • CL_INVALID_MEM_OBJECT if image is not a valid image object.

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

  • CL_INVALID_VALUE if origin or region is NULL.

  • CL_INVALID_VALUE(如果原点或区域为NULL)。

  • CL_INVALID_VALUE if region being mapped given by (origin, origin + region) is out of bounds or if values specified in map_flags are not valid.

  • CL_INVALID_VALUE如果由(原点,原点+区域)给定的映射区域超出界限,或者如果map_flags中指定的值无效。

  • 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,如果原点和区域中的值不遵循原点和区域的参数描述中描述的规则。

  • CL_INVALID_VALUE if image_row_pitch is NULL.

  • 如果image_row_pitch为NULL,则CL_INVALID_VALUE。

  • CL_INVALID_VALUE if image is a 3D image, 1D or 2D image array object and image_slice_pitch is NULL.

  • CL_INVALID_VALUE(如果图像是3D图像、1D或2D图像阵列对象并且image_slice_pitch为NULL)。

  • 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_MAP_FAILURE if there is a failure to map the requested region into the host address space. This error cannot occur for image objects created with CL_MEM_USE_HOST_PTR or CL_MEM_ALLOC_HOST_PTR.

  • CL_MAP_FAILURE(如果无法将请求的区域映射到主机地址空间)。对于使用CL_MEM_USE_HOST_PTR或CL_MEM_ALLOC_HOST_PTR创建的图像对象,不会发生此错误。

  • CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST if the map operation is blocking and the execution status of any of the events in event_wait_list is a negative integer value. This error code is missing before version 1.1.

  • CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST,如果映射操作正在阻塞并且event_WAIT_LIST中任何事件的执行状态为负整数值。1.1版本之前缺少此错误代码。

  • 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_INVALID_OPERATION if the device associated with command_queue does not support images (i.e. CL_DEVICE_IMAGE_SUPPORT specified in the Device Queries table is CL_FALSE).

  • CL_INVALID_OPERATION,如果与command_queue关联的设备不支持映像(即,在设备查询表中指定的cl_device_IMAGE_support为CL_FALSE)。

  • CL_INVALID_OPERATION if image has been created with CL_MEM_HOST_WRITE_ONLY or CL_MEM_HOST_NO_ACCESS and CL_MAP_READ is set in map_flags or if image has been created with CL_MEM_HOST_READ_ONLY or CL_MEM_HOST_NO_ACCESS and CL_MAP_WRITE or CL_MAP_WRITE_INVALIDATE_REGION is set in map_flags.

  • CL_INVALID_OPERATION如果图像是用CL_MEM_HOST_WRITE_ONLY或CL_MEM_MOST_NO_ACCESS创建的,并且CL_MAP_READ设置在MAP_flags中,或者如果图像是使用CL_MEM_HOST_READ_ONLY、CL_MEM_HOST_NO_ACCESS创建并且CL_MAP_WRITE或CL_MAP_WRITE_INVALIDATE_REGION设置在map_flags中。

  • 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_OPERATION if mapping would lead to overlapping regions being mapped for writing.

  • CL_INVALID_OPERATION,如果映射会导致为写入而映射的重叠区域。

The pointer returned maps a 1D, 2D or 3D region starting at origin and is at least region[0] pixels in size for a 1D image, 1D image buffer or 1D image array, (image_row_pitch × region[1]) pixels in size for a 2D image or 2D image array, and (image_slice_pitch × region[2]) pixels in size for a 3D image. The result of a memory access outside this region is undefined.

返回的指针映射从原点开始的1D、2D或3D区域,并且对于1D图像、1D图像缓冲区或1D图像阵列,其大小至少为region[0]像素,对于2D图像或2D图像阵列,大小至少为(image_row_pitch×region[1])像素,对于3D图像,其大小为(image_slice_pitch×region[2])像素。此区域外的内存访问结果未定义。

If the image object is created with CL_MEM_USE_HOST_PTR set in mem_flags, the following will be true:

​如果创建图像对象时在mem_flags中设置了CL_MEM_USE_HOST_PTR,则以下情况将为真:

  • The host_ptr specified in clCreateImage, clCreateImageWithProperties, clCreateImage2D, or clCreateImage3D is guaranteed to contain the latest bits in the region being mapped when the clEnqueueMapImage command has completed.

  • clCreateImage、clCreateImageWithProperties、clCreateImage2D或clCreateImage3D中指定的host_ptr保证在clEnqueueMapImage命令完成后包含要映射的区域中的最新位。

  • The pointer value returned by clEnqueueMapImage will be derived from the host_ptr specified when the image object is created.

  • ​clEnqueueMapImage返回的指针值将从创建图像对象时指定的host_ptr派生。

Mapped image objects are unmapped using clEnqueueUnmapMemObject. This is described in Unmapping Mapped Memory Objects.

​使用clEnqueueUnmapMemObject取消映射映射的图像对象。这在“取消映射映射的内存对象”中有描述。

OpenCL编程入门 通过一个样例程序介绍OpenCL编程的一些基本概念和过程,适合刚开始接触异构计算和OpenCL的编程人员 立即下载

相关推荐

国内知名技术转移机构在推动区域产业升级方面有哪些代表性案例?.docx

国内知名技术转移机构在推动区域产业升级方面有哪些代表性案例?

openCL缓存对象的传输与映射

用GPU进行加速运行运算时,通常首先将数据copy(clEnqueueWriteBuffer)到GPU缓存对象,运算结束后,再将数据copy(clEnqueueReadBuffer)到内存;OpenCL提供了内存映射机制,无需读写操作,将设备上的内存映射到主机上,便可以通过指针方式直接修改主机上的内存对象,内存映射的运行性能远远高于普通的读写函数。 用OpenCL来操作映射内存中的数据通常分为三步: Step1:调用函数clEnqueueMapBuffer或函数clEnqueueMapImage,将内存映

u012507022的博客 5947

利用腾讯云轻量服务器快速搭建网站CDN

腾讯云的轻量最近在主机和站长中间可谓是占尽来风头,优秀的线路,低廉的价格使得越来越多的人开始使用腾讯云的轻量级服务器来部署应用。由于腾讯云轻量服务器的海外服务器电信走的是CN2GIA线路带宽30m挺适合做CDN的,我就记录一下如何利用腾讯云香港的轻量服务器搭建一个CDN。 购买服务器 首先选购服务器,最近腾讯云在做活动,力度很大国内备案用户可以选用国内的服务器最低128元/年,未备案的可以选用香港或者新加坡的服务器。 购买链接 服务器系统选Debian、Ubuntu、centos都可以 一键脚

demo_top的博客 2573

《Mali OpenCL SDK v1.1.0》教程样例之四“图像对象”

介绍   纹理(图像)是现代图像应用的很大一部分。正因为如此,图形硬件已经发展到允许高访问性能地对纹理进行访问和操作。为充分使用这一硬件,OpenCL包括了一个可选的图像数据类型。这些"图像对象"在所有Mali-T600系列GPU上受到支持。图像代表大型数据网格,可以并行地被处理。正应为如此,图像数据和图像操作通常非常适合在OpenCL中做加速。图像数据有两种方式可以被OpenCL存储和

Johnson的技术博客 4485

【Arduino】入门篇——交通信号灯

模拟交通信号灯一、实验目的二、实验材料三、电路图四、实验过程五、代码块六、实验结果 一、实验目的 我想大家都看见过交通灯,就是马路上十字路口的红绿灯。如果您开过车,我想您一定仔细观察过交通灯,如果您还没有驾驶过车,您是否仔细观察过交通灯呢?交通灯包括三种个不同颜色的灯:红灯、黄灯和绿灯。 每个路口的红绿灯切换的时间并不是相同,这个是根据不同路口的车流情况来设定的,下面就是模仿交通灯的一个实验 二...

漠宸离若的博客 1万+

【STM32项目】老人健康跌倒检测系统实现(附教程PCB资料)

功能概述 跌倒检测 倾倒告警,人体角度倾斜至阈值触发蜂鸣报警 异常运动,加速度超过正常行动阈值时触发报警 心率监测 实时检测心率数据 血氧监测 实时检测采集血氧 血压测量 血压在线测量 红外体温 非接触体温采集方案 接触式体温采集方案 实时定位 中科微GPSGT-U12双频GPS北斗 GLONASS IRNSS定位系统 NEMA数据解析 可扩展高精度定位方案厘米级 屏幕显示 数据采集显示 告警阈值设置 语音提示 1欢迎使用老人智慧监测系统

洋洋的博客 1万+

[OpenCL] 主机编程:数据传输和分区(11)

3.4 获取有关缓冲区对象的信息   clGetImageInfo 仅提供有关图像对象的信息,而您可以使用 clGetMemObjectInfo 获取有关图像对象和缓冲区对象的信息。 其签名如下: clGetMemObjectInfo (cl_mem object, cl_mem_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret)   这些论点是直截了当的。 前三个提供输入

unity尧明的博客 1164

声音事件检测metric:PSDS

这项工作为多声道声音事件检测(SED)系统的性能评估定义了一个新的框架,它克服了传统的collar-based事件决定、事件F-cores和事件错误率的限制。拟议的框架引入了对事件检测的定义,该定义对标签的主观性更为稳健。它还采用了多声道接收器操作特性(ROC)曲线,以提供比F1分数更全面的系统性能洞察力,并建议将这些曲线简化为单一的多声道声音检测分数(PSDS),这允许系统独立于操作点(OPs)进行比较。所提出的方法还能更好地了解不同声音类别的数据偏差和分类稳定性。

Maestro_T的博客 2734

OpenCL 映射和解映射

1.主机使用函数clSetKernelArg将内存对象发送给设备,完成设备到主机的数据传输最为简单的函数是调用函数clEnqueueReadBuffer。每个函数都包含一个名为blocking的布尔型变量,如果它的值为CL_TRUE,这个函数在完成读写操作之前都不会返回。如果它的值为CL_FALSE,这个函数将入列读写命令,但是不会等到整个数据传输操作结束之后才返回。 2.offset参数表示的是...

INFINALGEORGE的博客 1901

Pyradiomics 医学影像提取放射组学特征(下)

Pyradiomics 医学影像提取放射组学特征(下)

LetsonH的博客 1335

【学习系列】SAP RAP 3:添加多层级的子节点

本文详细介绍了在SAP ABAP RAP开发中如何创建多层级业务对象。主要内容包括:1)创建明细和计划行层级的数据库表及CDS视图;2)使用association和composition关键字建立父子关联关系;3)创建各层级的投影视图并设置层级关系;4)更新行为定义,添加关联、操作权限等控制;5)更新服务定义公开新增视图;6)创建元数据扩展优化UI展示。通过这一系列步骤,实现了从抬头到明细再到计划行的完整业务对象层级结构,为后续UI功能扩展奠定了基础。

DeveloperMrMeng的博客 605

OpenCL™规范 5.5.3. 取消映射的内存对象

如果event_wait_list为NULL,则num_events_in_wait_list必须为0。如果event_wait_list不为NULL,则event_wail_list指向的事件列表必须有效,并且num_events_in_wait_list必须大于0。CL_INVALID_CONTEXT如果与command_queue和memobj关联的上下文不相同,或者与command_ queue关联的上下文和event_wait_list中的事件不相同。中的事件对象不是有效事件。

aggs1990的专栏 265

极智嘉嵌入式面试题及参考答案

IIC(Inter-Integrated Circuit)即集成电路总线,是一种由 PHILIPS 公司开发的两线式串行总线,用于连接微控制器及其外围设备。它仅使用两根线,即串行数据线 SDA 和串行时钟线 SCL,就能实现多个设备之间的通信,具有简单、高效、占用资源少等优点,广泛应用于各种嵌入式系统中。

大模型大数据攻城狮的专栏 927

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

OpenCL™规范-CSDN博客

aggs1990的专栏 1669

工业级稳定!C# 实现 Modbus RTU 多设备并发通信实战

摘要:本文提出一种基于C#的Modbus RTU多设备并发通信方案,解决工业自动化中单线程通信的串口抢占、数据阻塞等问题。采用任务队列+线程安全锁+异步调度的三层架构,实现16台及以上RTU设备的稳定并发读写。方案包含串口管理单例、Modbus通信核心和任务调度层,支持超时重试、异常捕获等工业级容错机制。通过NModbus库和.NET框架,提供可直接用于工业现场的代码实现,已在工控项目中长期验证,有效提升多设备通信效率和稳定性。

这里只有干货:从 Modbus 通信到 MES 对接,从 YOLO 训练到工控机部署,带你搞定工业软件开发全流程。 585

NTscan扫描工具

ntscan是一个扫描器,可以扫描没有密码和弱密码的共享,先到配置文件中填写猜测的用户名和密码,扫描过程中右侧出现的是扫描日志。

AMD OpenCL 大学课程

AMD OpenCL大学课程是非常好的入门级OpenCL教程,通过看教程中的PPT,我们能够很快的了解OpenCL机制以及编程方法。下载地址:http://developer.amd.com/zones/OpenCLZone/universities/Pages/default.aspx      教程中的英文很简单,我相信学OpenCL的人都能看得懂,而且看原汁原味的英文表述,更有利于我们了解

szu030606的专栏 6738

华为的C语言编程规范.pdf

华为技术有限公司内部技术规范。本规范制定了编写C语言程序的基本原则、规则和建议。从代码的清晰、简洁、可测试、安全、程序效率、可移植各个方面对C语言编程作出了具体指导。

OpenCL memory object 传输优化

(一)首先了解一些优化时的术语及其定义: (1)deferred allocation(延迟分配) (2)peak interconntect bandwith(峰值内联带宽) (3)Pinning(对内存实施pinning操作) (4)WC(write combined operation) (5)uncached access (6)USWC(无

Fighting for freedom! 1330

Devexpress16.2.6破解工具

Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具

IDEA的使用指南

IDEA基于java的使用手册,可以最快速的上手,在使用中不断的丰富自己的使用技巧.

OpenCL中三种内存创建image的效率对比

第一种:使用ION: cl_mem_ion_host_ptr ion_host_ptr1; ion_host_ptr1.ext_host_ptr.allocation_type = CL_MEM_ION_HOST_PTR_QCOM; ion_host_ptr1.ext_host_ptr.host_cache_policy = CL_MEM_HOST_UNCACHED_QCOM; ion_host_ptr1.ion_filedesc = fd_data.fd; ion_host_ptr1.io...

whyrookie的博客 1802

OpenCL简单入门介绍(根据《OpenCL Overview》翻译整理)

根据《OpenCL Overview》与《OpenCL Technical Overview》整理编写,由于第一次接触OpenCL,定会有部分的专业词汇翻译不当,敬请指正。 1.《OpenCL Overview》整理笔记 这是一个异构的世界   OpenCL让程序员写单一的可移植程序,在一个异构平台上使用所有的资源。 OpenCL使用   1. 定义平台; 2.

Johnson的技术博客 5466

AMD编程手册小译

小译之5.5.3 Memory Allocation 5.5.3.1 使用CPU

hanxing0的专栏 5153

OpenCL buffer使用及两个简单例子

摘要:在本节,我们主要介绍OpenCL中buffer的使用,同时提供了2个完整的例子,一个是图像的旋转,一个是矩阵乘法(非常简单,没有分块优化)。 在本节,我们主要介绍OpenCL中buffer的使用,同时提供了2个完整的例子,一个是图像的旋转,一个是矩阵乘法(非常简单,没有分块优化)。 1、创建OpenCL设备缓冲(buffer) OpenCL设备使用的数据都存放在设备的b

jaccen的专栏 8185

从零开始学习OpenCL开发(三)深入API

欢迎关注,转载引用请注明 http://blog.csdn.net/leonwei/article/details/8909897 这里将更深入的说明一些OpenCL API的功能 1. 创建buffer 涉及到内存与显存的操作总是复杂麻烦的,这个函数也一样。。。 cl_memclCreateBuffer ( cl_contextcontext,...

weixin_34362875的博客 889

内存映射设备

#size-cells 声明每个子节点的 reg 元组中长度字段的大小 / { #address-cells = <1>; #size-cells = <1>; gpio@101f3000 { compatible = "arm,pl061"; reg = <0x101f3000 0x1000 ...

weixin_30501857的博客 404

图像旋转在opencL 实现方法

// kernel 代码 theta 为旋转角度 如45 __constant sampler_t sampler = CLK_NORMALIZED_COORDS_FALSE | CLK_FILTER_LINEAR | CLK_ADDRESS_CLAMP; __kernel void rotation(__read_only image2d_t inputImage, __write_only i

张利 的博客 1730

OpenCL笔记

OpenCL笔记

Leoeon的博客 752
上一篇: OpenCL™规范 5.3.6. 在图像和缓冲区对象之间复制
下一篇: OpenCL™规范 5.3.8. 为图像操作指定Mipmap级别
꧁白杨树下꧂
博客等级 码龄15年 1019粉丝 209原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值