上一页 1 ··· 3 4 5 6 7
摘要: 1:将缓存对象的内容读到缓存对象中(从设备到主机) cl_int clEnqueuReadBuffer( cl_command_queue command_queue, //命令队列 cl_mem buffer, // 缓存对象 cl_bool blocking_read, //是否堵塞CL_TRU 阅读全文
posted @ 2020-01-09 17:36 糖糖_彭 阅读(610) 评论(0) 推荐(0) 编辑
摘要: //创建的内存对象由内核访问,将缓冲区作为参数传递给内核 1:创建缓存对象 cl_mem clCreateBuffer( cl_context context, //上下文 cl_mem_flags flags, //内存对象性质标签 size_t size, //大小 void* host_ptr 阅读全文
posted @ 2020-01-09 16:43 糖糖_彭 阅读(335) 评论(0) 推荐(0) 编辑
摘要: 1:创建命令队列 cl_command _queue clCreateCommandQueue( cl_context context, //上下文 cl_device_id device, //设备 cl_command_queue_properties properties, //队列属性 cl 阅读全文
posted @ 2020-01-09 15:13 糖糖_彭 阅读(521) 评论(0) 推荐(0) 编辑
摘要: 1:程序 1)从上下文中创建程序 cl_program clCreateProgramWithSource( cl_context context, //上下文 cl_uint count, //文本个数 const char**strings, //程序文本 const size_t *lengt 阅读全文
posted @ 2020-01-08 21:55 糖糖_彭 阅读(248) 评论(0) 推荐(0) 编辑
摘要: 1:平台 1)获取平台id cl_int clGetPlatformIDs( cl_uint num_entries, //想要获取的平台数 cl_platform_id * flatformids, //获取到设备会保存在该指针中 cl_uint *platforms //环境中存在的平台数量 ) 阅读全文
posted @ 2020-01-08 21:16 糖糖_彭 阅读(558) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7