I’m trying to figure out a way how to align tasks in a thread pool.
I have 4 ( parallel ) threads and at the beginning ( of each thread execution step ) 10 tasks. My first attempt was to measure the time of each task, and based on that time find the best combination of tasks in threads to get the best possible result. I’m attempting to write a parallel game engine based on this article http://software.intel.com/en-us/articles/designing-the-framework-of-a-parallel-game-engine/
The problem is that my ‘solution’ does not work. Are there any more ways to align tasks?
(The project is in c++)
You should check out both smoke (their multithreaded processing tech demo engine) and nullstien from intels visual computing site, they both tackle thread pooling tasks (nullstien has two variants, a tbb based scheduler and a custom built one)