OpenCL support for C++ template

OpenCL support for C++ template


I'm trying to port to Xeon Phi an OpenCL kernel that contains C++ template declarations originally written against AMD APP SDK. The compilation of the kernel code (with clCreateProgramWithSource) fails because it does not recognise the "template" symbol. Even though the OpenCL specification does not mention anything about C++ templates, I was wondering if the latest OpenCL SDK support C++ templates. Previously it was suggested to me to get rid of the templates with specific definitions, however this is not practically possible because of the code size. (a dozen template definitions and few thousand lines of kernel code)

Can you suggest me a possible solution around this?

Many thanks.

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

This issue is closed at the request of the customer. I have not deleted it due to our general policy being that posts after a certain interval should not be changed or modified..


Leave a Comment

Please sign in to add a comment. Not a member? Join today