SergeyMakeev / Taskscheduler
Projects that are alternatives of or similar to Taskscheduler
About
Cross-platform, fiber-based, multi-threaded task scheduler designed for video games.
Written under the influence by great GDC talk "Parallelizing the Naughty Dog engine using fibers" by Christian Gyrling
Compiled and worked on : Clang 3.4, GCC 4.8.2, MSVC 2010/2012/2015/2017, XCODE 6.4
Commercial games using Task Scheduler
- Skyforge (PC, PS4, X1)
Build status
Usage examples
Minimal example
#include <MTScheduler.h>
// Declare simple task
struct SimpleTask
{
MT_DECLARE_TASK(SimpleTask, MT::StackRequirements::STANDARD, MT::TaskPriority::NORMAL, MT::Color::Blue);
void Do(MT::FiberContext&)
{
// ... do thing here ...
}
};
int main()
{
// Create scheduler
MT::TaskScheduler scheduler;
// Declare tasks
static const int TASK_COUNT = 1000;
SimpleTask tasks[TASK_COUNT];
// Run everything
scheduler.RunAsync(MT::TaskGroup::Default(), &tasks[0], MT_ARRAY_SIZE(tasks));
// Wait and help to execute unfinished tasks
scheduler.WaitAll(1000)
return 0;
}
You can find a lot of usage examples in the test folder: https://github.com/SergeyMakeev/TaskScheduler/tree/master/SchedulerTests/Tests
Useful reading (in random order):
Parallelizing the Naughty Dog engine using fibers by Christian Gyrling
id Tech 5 Challenges From Texture Virtualization to Massive Parallelization by J.M.P. van Waveren
http://s09.idav.ucdavis.edu/talks/05-JP_id_Tech_5_Challenges.pdf
Doom3 BFG Source Code Review: Multi-threading by Fabien Sanglard
http://fabiensanglard.net/doom3_bfg/threading.php
How Ubisoft Develops Games for Multicore - Before and After C++11 by Jeff Preshing
http://www.youtube.com/watch?v=X1T3IQ4N-3g
Killzone Shadow Fall: Threading the Entity Update on PS4 by Jorrit Rouwe
Killzone Shadow Fall Demo Postmortem by Michal Valient
Infamous Second Son : Engine Postmortem by Adrian Bentley
http://adruab.net/wp-images/GDC14_infamous_second_son_engine_postmortem.pdf
Multithreading the Entire Destiny Engine - GDC 2015 by Barry Genova
http://www.gdcvault.com/play/1022164/Multithreading-the-Entire-Destiny (members only) http://chomikuj.pl/dexio21/GDC+2015/GDC+Vault+-+Multithreading+the+Entire+Destiny+Engine,4690817362.mp4%28video%29
Intel Threading Building Blocks - Scheduling Algorithm
CILK/CILK++ and Reducers
http://www.slideshare.net/yunmingzhang/yunming-zhang-presentations
Task Scheduling Strategies by Dmitry Vyukov
Implementing a Work-Stealing Task Scheduler on the ARM11 MPCore
Lost Planet graphics course for 3D game fan of Nishikawa Zenji
http://game.watch.impress.co.jp/docs/20070131/3dlp.htm
Dragged Kicking and Screaming: Source Multicore by Tom Leonard
Games: Playing with Threads by Ben Nicholson
http://www2.epcc.ed.ac.uk/downloads/lectures/BenNicholson/BenNicholson.pdf
Work Stealing by Pablo Halpern
https://github.com/CppCon/CppCon2015/tree/master/Presentations/Work%20Stealing
Enki Task Scheduler by Doug Binks
Molecule Engine blog - Job System 2.0 by Stefan Reinalter
Molecule Engine blog - Building a load-balanced task scheduler by Stefan Reinalter
Do-it-yourself Game Task Scheduling by Jerome Muffat-Meridol
Acquire and Release Semantics by Jeff Preshing
http://preshing.com/20120913/acquire-and-release-semantics/
Lockless Programming Considerations for Xbox 360 and Microsoft Windows
C/C++11 mappings to processors by Peter Sewell
https://www.cl.cam.ac.uk/~pes20/cpp/cpp0xmappings.html
Memory Ordering in Modern Microprocessors, Part I by Paul E. McKenney http://www.linuxjournal.com/node/8211/print
Memory Ordering in Modern Microprocessors, Part II by Paul E. McKenney http://www.linuxjournal.com/node/8212/print
Barrier Litmus Tests and Cookbook by ARM https://developer.arm.com/documentation/genc007826/latest https://documentation-service.arm.com/static/5ece8d6a56a54774bd17a1f4