openCL
singing1001
码农
展开
-
ubuntu intel 显卡 opencl安装
参考https://www.linuxidc.com/Linux/2017-03/141455.htm查看设备上的显卡:songqing@songqing-Latitude-5290:~/opencl_learning/chater3$ lspci00:00.0 Host bridge: Intel Corporation Device 5914 (rev 08)00:02.0 VGA ...转载 2019-06-18 09:37:14 · 2641 阅读 · 0 评论 -
opencl get suppported image formats
以image2D为例,代码如下:#if 0/* cl_channel_order */#define CL_R 0x10B0#define CL_A 0x10B1#define CL_RG ...原创 2019-06-24 20:58:29 · 251 阅读 · 0 评论 -
opencl subbuffer
主机端代码如下: cl_uint numDevice = 2; cl_event event[2]; int NumBufferDevice = 512; int DataSize = NumBufferDevice * numDevice; int *d_SrcData; d_SrcData = (...原创 2019-06-24 18:21:28 · 301 阅读 · 0 评论 -
OpenCL 第10课:kernel,work_item和workgroup
转载自:http://www.cmnsoft.com/wordpress/?p=1429前几节我们一起学习了几个用OPENCL完成任务的简单例子,从这节起我们将更详细的对OPENCL进行一些“理论”学习。kernel:是指一个用opencl c语言编写的、代表一个单一执行实例的代码单元。opencl c语言看起来跟C语言函数非常相像,都有一个参数列表“局部”变量定义和标准控制流结构。...转载 2019-06-27 15:40:36 · 626 阅读 · 0 评论 -
opencl device queue
主机端代码: //create device queue cl_queue_properties props[]={ CL_QUEUE_PROPERTIES, CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE| ...原创 2019-06-24 16:31:26 · 551 阅读 · 0 评论 -
opencl using pipeline
其中,opencl code如下://pipeline__kernel void pipe_producer(__global float *src, write_only pipe float out_pipe){ int gid = get_global_id(0); reserve_id_t res_id; //every work-item read one...原创 2019-06-23 09:30:45 · 425 阅读 · 0 评论 -
opencl 获取第一个可用的设备
cl_device_id get_gpu_device(){ cl_uint nr_platforms = 0; opencl_check(clGetPlatformIDs(0, nullptr, &nr_platforms));//get available platforms assert(nr_platforms > 0); std::vec...原创 2019-06-18 18:38:35 · 397 阅读 · 0 评论 -
opencl coarse svm
设备端代码://using for coarse svm testtypedef struct _Element{ __global float *internal; __global float *external; float value;}Element;__kernel void svmbasic(__global Element *elements, ...原创 2019-06-26 09:38:01 · 418 阅读 · 0 评论 -
opencl img rotate
gray图像处理的主机端代码: //follow is image objects and sample objects example code {#if 0/* cl_channel_order */#define CL_R 0x10B0#define CL_A ...原创 2019-06-25 16:23:31 · 475 阅读 · 0 评论 -
get opencl information
int get_device_info(cl_device_id deviceID){ char param_value[1024]; size_t ret_size; //get device Type/* /usr/include/CL/cl.h#define CL_DEVICE_TYPE_DEFAULT (1 <&...原创 2019-06-19 11:11:51 · 184 阅读 · 0 评论