pixelshader
Newcomer
Hello,
I am trying to optimise an algorithm using CG. The kernel calculates Mutual information. It has to be executed for a fixed number of iteration. But it can do an early exit in case an acceptable MI value is achieved.
while ( MI > 0.8 )
{
Call Render function to execute kernel.
Retrieve MI value to CPU.
}
The kernel outputs MI value to a texture location. So in order to take decision i need to read that value to CPU which i think can be a performance hit.
So how shud i go forward.. Please suggest.
Am using Opengl + Cg
Thanks..
I am trying to optimise an algorithm using CG. The kernel calculates Mutual information. It has to be executed for a fixed number of iteration. But it can do an early exit in case an acceptable MI value is achieved.
while ( MI > 0.8 )
{
Call Render function to execute kernel.
Retrieve MI value to CPU.
}
The kernel outputs MI value to a texture location. So in order to take decision i need to read that value to CPU which i think can be a performance hit.
So how shud i go forward.. Please suggest.
Am using Opengl + Cg
Thanks..