KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have worked with OpenCL on a couple of projects, but have always written the kernel as one (sometimes rather large) function. Now I am working on a more complex project and would like to share functions across several kernels. But the examples I can find all show the kernel as a single file (very few even call secondary functions). It seems like it should be possible to use multiple files - clCreateProgramWithSource() accepts multiple strings (and combines them, I assume) - although pyopencl's Program() takes only a single source. So I would like to hear from anyone with experience doing this: Are there any problems associated with multiple source files? Is the best workaround for pyopencl to simply concatenate files? Is there any way to compile a library of functions (instead of passing in the library source with each kernel, even if not all are used)? If it's necessary to pass in the library source every time, are unused functions discarded (no overhead)? Any other best practices/suggestions? Thanks.
Tags (comma-separated)
Save Edits
Cancel