cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

omac
Journeyman III

clCreateProgramWithSource has no text file encoding type parameter

Hi there,

I noticed the clCreateProgramWithSource has no text file encoding type parameter.  Is there anywhere in the documentation that states what the default text file encoding type is for OpenCL?

i.e. ASCII, utf-8, utf-16.

As it stands I am making the assumption that its ASCII because when I run:

file /opt/AMDAPP/samples/opencl/cl/app/BoxFilterGL/BoxFilterGL_Kernels.cl

It shows:

/opt/AMDAPP/samples/opencl/cl/app/BoxFilterGL/BoxFilterGL_Kernels.cl: ASCII English text

Perhaps a "#pragma" tag at the beginning input file would be helpful for this in the same manner that html and xml have encoding type tags at the beginning of their file.  xml/xhtml have the default file encoding-type as "utf-8" in order to make a particular file able to support all the world's languages in one single file.  ASCII cannot support all the world's languages in one single text file.  It relies on ASCII dos pages and are limited to displaying one language at a time in one particular ASCII text file.

I can recognize that it would be beneficial to have more internationalization and string-processing apis in opencl to speed things up by adding the capability for example to sort/parse strings on a multi-core cpu, but also on the available opencl-compliant devices at the same time.

Is the opencl compiler a complete gcc/g++ compiler? Does it imply having all those gcc/g++ internationalization and string-processing apis available from within the OpenCL kernel?

Thank you.

0 Likes
1 Reply

The OpenCL spec does not specify this and I don't believe the C99 spec does either.

The OpenCL compiler is a full C compiler, as is required by the spec. The only API's available are those that are specified in the OpenCL spec.

If you want to improve OpenCL, please contact khronos here: http://www.khronos.org/message_boards/viewforum.php?f=28&sid=6e235d1184a90edae37dc18a389c6f23

0 Likes