Hi,
I am trying to compile Open CL programs on windows on command line. I went through the documentation and figured out ways of compling the code with MSVC and linking up with OpenCL libraries. I couldn't figure out any documentation with respect to directly invoking the Open CL compiler on device code and then linking together the code produced by the MSVC compiler and OpenCL compiler.
thanks
shankha
you compile device code or kernels at runtime throuth clCreateProgramWithSource() and then clBuildProgram()
Hi,
I don't want to compile the program at runtime. I want to compile them statically and link with the main executable. IS there a way I can invoke the Open CL compiler from command line.
Thanks
Shankha
then you can use clCreateProgramWithBinary(). but you still need compile it at runtime first time.
second binary format is specific for each device. that mean you cant load binary program compiled for radeon card to nvidia and even radeon cards are different. like you cant load program compiled for 4780 card onto any 5xxx card.
for AMD there is around twelve different device. so you must distibute compiled binary image of device code for each device. refer to AMD OpenCL programing guide.