Another implementation of "save binaries"
Status: Beta
Brought to you by:
george_vv
This patch is yet another implementation for saving binaries. This differs from the "2010-09-13 fredrior" patch in several ways:
1) it adds a few other command-line options, in particular options for the OpenCL compiler.
2) it does not overwrite the .o for each device. All binaries are placed in one .o file. See comments for the structure.
3) it has code for reading the .o file. This code takes great pain to look up the correct binary for the device, so there is no confusion and inappropriately used binary.
This implementation needs improvements. When compiling for different platforms, the compiler options for OpenCL often are not compatible.
This is a fairly major change which warrants further investigation. I would like to get some input on compiling binaries before deciding on the approach to use.
It would be really great with support for specifying OpenCL compiler options, like preprocessor defines and the options described in http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clBuildProgram.html
This patch parses compiler options into the options::cloptions_ member, but the options do not appear to be utilized in the clBuildProgram call to do the actual building. Am I missing something?