- Flock simulation using tasks in order to keep busy all the cpu cores. It uses the Vista Pool Thread API to make a really simple wrap for send multiple tasks to the pool. The video shows how most of cpu cores (hardware threads) are not working under a heavy load of work with only one task in the pool. If the work is spread across multiple tasks, the video shows how all the cpu cores are busy.
After seeing the gdc10 intel talk about tasks using the vista thread pool api, I wanted to give it a try. So, the objective of this test is just try the thread pool api that vista provides. I dont try to get a massive amount of geometry on screen, just have something cpu intensive and appealing like a flock simulation algorithm.
- Left click plus mouse movement to rotate the camera around the flock.
- Right click plus mouse move up/down to zoom in/out.
- Opengl 2.0
- Microsoft Visual Studio 2008 Professional Edition
- Windows 7 x64
Develop/Build/Test Machine Specs
- Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz
- 3072 Mb RAM
- Nvidia GeForce GTX 260
- Nvidia Driver Version: 196.21 WHQL
- Microsoft Windows 7 Professional x64
- Vista Thread Pool API from msdn
- “Steering Behaviors For Autonomous Characters” by Craig Reynolds
- “Task-based Multithreading — How to Program for 100 Cores” by Ron Fosner
- “Trefoil knot” from Wikipedia