[英]How to pass parameters to ocl kernel using c++ opencl api?
how to pass parameters being treated in the .cl file as a preprocessor define using c++ ocl bindings? 如何使用c ++ ocl绑定传递在.cl文件中作为预处理程序定义的参数?
Meaning: 含义:
foo.cl foo.cl
# define LIMIT 12
typedef struct {
uint i[LIMIT];
} foomatic;
turns to 转向
foo_nodefs.cl foo_nodefs.cl
typedef struct {
uint i[LIMIT]; // main.cpp passing LIMIT to set it
} foomatic;
Thanks, 谢谢,
John 约翰
使用带有选项“ -D LIMIT = 12”的cl :: Program :: build。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.