Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何将 .cl 文件中处理的参数作为使用 c++ ocl 绑定定义的预处理器传递?
意义:
foo.cl
# define LIMIT 12 typedef struct { uint i[LIMIT]; } foomatic;
转向
foo_nodefs.cl
typedef struct { uint i[LIMIT]; // main.cpp passing LIMIT to set it } foomatic;
谢谢,
约翰
使用带有选项“-D LIMIT=12”的 cl::Program::build。