How Kernel Works?

In version 0.7.8 user cannot create kernel directly, instead of this he must have created Task object, and with this object he can create Kernel object: Task::createActiveKernel. This method creates kernel and corresponding FrameBuffer object.
After that user can add Shader. Independently of shader user can add static textures to our Kernel object, but uniform variables can be added only after successfull shader compilation.
When user finished to add objects to our kernel we may compile it, but usually compilation performs in corresponding Task object.
Kernel has three methods related to computation: Kernel::PreComputeKernel, Kernel::ComputeKernel, Kernel::PostComputeKernel. These methods are designed for flexible way to control computational process.
First method perform binding of Shader and FrameBuffer, attaching all static textures to Shader.
Second method performs computations, and third method sets kernel in special state, when all results are available for downloading.


In version 0.7.8 user can create only one kernel with one framebuffer for current Task object. This is done because method of consequent computation is not ready yet. Need more time to explore this method and create good code.
In older vesrions user can create Kernel directly, and maybe in newer versions situation can be changed.

Generated on Thu Mar 5 22:36:42 2009 for gpucalc by  doxygen 1.5.6