cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

krishnapg
Journeyman III

clBuildProgramWithSource - how to use static C++ OpenCL Extension ??

Jump to solution

Hello,

I am trying to use Static C++ OpenCL - and in the documentation it says use '-x language' option with the clBuildProgramWithSource method. (Documentation: http://developer.amd.com/Assets/CPP_kernel_language.pdf)

But I could not find this method anywhere in the cl header files. I tried the sample code from that document - but it gave error compiling.

I have the latest AppSDK 2.6 downloaded along with the OpenCL 1.2 beta files updated. But where is this static C++ Extension?

Could some one please point the right direction. Appreciate help.

Thank you

0 Likes
1 Solution

Accepted Solutions
brg
Staff
Staff

Re: clBuildProgramWithSource - how to use static C++ OpenCL Extension ??

Jump to solution

This is a error in the documentation.

The APIs for programs are as follows:

clCreateProgramWithSource - create a program object from a source string

clBuildProgram                    - build a program object, for a set of devices

The later function has a parameter "const char * options" and it is this that should set the flag for building C++:

"-x clc++"

Sorry for the confusion.

View solution in original post

0 Likes
1 Reply
brg
Staff
Staff

Re: clBuildProgramWithSource - how to use static C++ OpenCL Extension ??

Jump to solution

This is a error in the documentation.

The APIs for programs are as follows:

clCreateProgramWithSource - create a program object from a source string

clBuildProgram                    - build a program object, for a set of devices

The later function has a parameter "const char * options" and it is this that should set the flag for building C++:

"-x clc++"

Sorry for the confusion.

View solution in original post

0 Likes