2014年3月19日

GPGPU OpenCL使用结构体数据

摘要: OpenCL编程中可以使用结构体,只需要在核函数kernel中提供同样的结构体申明就可以啦。如果在主函数中定义了结构体:1 typedef struct studentNode{2 int age;3 float height;4 }student;主函数中定义数据,并传输给OpenCL kernel: 1 student *stu_input=(student*)malloc(sizeof(studentNode)); 2 stu_input->age=25; 3 stu_input->height=1.8l; 4 student *stu_o... 阅读全文

posted @ 2014-03-19 15:44 旭东的博客 阅读(3612) 评论(0) 推荐(0) 编辑

导航