Document Revision History
This table describes the changes to OpenCL N-Body Simulation.
(1) Utilities for acquiring host info., and computing the load on CPU cores. (2) Added CPU utilization performance meter. (3) Moved from std i/o stream file management to Core Foundation streams. (4) Property lists and data files are now read using the Core Foundation streams. (5) Utility for generating random numbers is using uniform random distribution. (6) N-Body button(s) moved to core and mediator objective-c utilities with properties. (7) N-Body meter(s) moved to core and mediator objective-c utilities with properties. (8) N-Body simulation data generation refactored and decoupled into split and packed utilities, matching split and packed data for cpu and gpu computes. (9) N-Body simulator properties are managed using a property list. (10) N-Body application preferences are managed using a property list. (11) N-Body engine moved to objective-c utility with properties. (12) View code is using the updated N-Body engine.
(1) Xcode 6 project updates. (2) Minor 10.10 updates. (3) Linear transformations of perspective geometry now use SIMD. (4) OpenGL text utility updated. (5) HUD image class updated.
(1) Decoupled the CoreText generation from GL text methods. (2) Moved GL text methods into a class. (3) The GL query class uses regular-expresion evaluation. (4) The n-body rendering is now moved into a visualizer class. (4) The n-body meters are now in a mediator class. (5) Removed the dependency on globals in the n-body engine, and encapsulated the engines's functionality into a class. (6) The dock labels are now derived from system properties. (6) Decoupled the host and device memories for CPU compute, and refactored into a mediator class as well as classes for managing split and packed data. (7) The initial random host data generation for CPU and GPU bound computes is encapsulated in a functor. (8) Gaussian and 2D textures are now encapsulated into their own classes. (9) Encapsulated program object generation into a class.
(1) Fixed a race condition caused by data copy to a base class. (2) Fixed a deadlock issue caused by out-of-order mutex locks. (3) Fixed a memory leak and race condition caused by multiple simulator iterations. (4) Fixed virtual destructors throughout leaking memory. (5) The application now properly deletes resources on termination. (6) Removed and refactored duplicate code into new classes and methods. (7) Refactored and wrote the hud button class that now includes a label. (8) Refactored and wrote the hud meter class that now includes a high-res timer. (9) OpenGL text generation now is generated from a bitmap context acquired from CoreText. (10) Removed dependency on glu linear transformation functions, (11) Quads are now generated using vbo. (12) To avoid compiler warnings, added [2,3,4] vector and 4x4 matrix classes and utility methods. (13) Added linear transformation utility methods. (14) Simplified the n-body methods by removing superfluous resources and functionality. (15) Performance is better approximated by using hardware properties. (16) Adjusted hud meter scale. (17) Added an OpenGL query class. (18) Better validation for shader compilation and linking. (19) Removed all code from main.mm that loaded nib and instantiated application's view. (20) The view code is now entirely in the derived class. (21) Included a XIB file for the window and the view. (22) Added a facade for abstracting cpu or gnu instantiation. (23) Added a mediator object for cpu or gnu bound simulators. (24) Cleaned the code for properly following modern OOP design patterns.
Fix problem reported by developer where application do run from xcode but not when clicking on it (on the bundle)
This is major change. We have modified the WWDC NBODY example from this year. 1) Removed scalar single core version 2) float4 vector operations in kernel, which really were operations on float3s (forth component was not being used) are now broken into three scalar operations. 3) CPU-GPU hybrid shown at WWDC, is removed for now since it requires careful load balancing. 4) Number of particles is now user provided parameter at command line with 32k being default.
Updated for bug fixes and to adapt to API changes.
Updated to new API.
OpenCL NBody Simulation Example