View Full Version : Running Cg Programs on the CPU
I looked at the sample declaration and I don't see anything special about it. Can someone explain how to run CG on the CPU?
I have never heard that something like this is supported.
Cg or that CUDA emulator that was just recently released?
It's in the CG 1.5 manual near the middle. Personally I don't think that manual makes any sense.
Look like I have overseen this so far.
The secret is not the Cg program itself. To run a Cg program on the CPU you first have to compile it with CG_PROFILE_GENERIC. Then you can pass the handle to your program to the cgEvaluateProgram function. This one is responsible to execute the program on the CPU. But the usage is limited as you can’t access any buffers for input and output only up to 4 elements of an vector.
vBulletin® v3.8.6, Copyright ©2000-2013, Jelsoft Enterprises Ltd.