|
|
Version: 2.0 Posted: 2009-10-09 Build Requirements: Mac OS X v10.6 or later Runtime Requirements: Mac OS X v10.6 or later Download Sample Code (OpenCL_NBody_Simulation_Example.zip, 5.44M) |
||||||||||
DescriptionThis example performs an NBody simulation which calculates a gravity field and corresponding velocity and acceleration contributions accumulated by each body in the system from every other body. This example also shows how to mitigate computation between all available devices including CPU and GPU devices, as well as a hybrid combination of both, using separate threads for each simulator. Click on the corresponding buttons to select the active simulation and render devices, and/or press the following keyboard shortcuts: 1-6: Select an N-Body System Configuration g: Select the next Graphics Device s: Select the next Simulation Device r: Enable/Disable Auto Rotation d: Show/Hide Dock UI h: Show/Hide HUD UI u: Show/Hide Simulation Updates Meter f: Show/Hide FPS Meter space: Pause/Unpause Simulation Note that the .cl compute kernel file(s) are loaded and compiled at runtime. The example source assumes that these files are in the same path as the built executable. Document Revision History
|