-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make IrrBAW "Fibreable" a-la Naughty Dog #214
Comments
ASIO has this capability that I used to create a thread-pool for jobs scheduling.
So you can consider to have the same I/O service objects for scheduling in a job example, maybe. I've learnt a bit about fiber but haven't coded with it yet. Will do soon since I'm also interested in it. |
Jobs are not pwoerful enough, I need an std::mutex and std::condition_variable replacement that can "pause" a job (save its whole stack) and "resume" it at a later time. I considered Boost.Fiber but I don't like the fact it schedules your fibers for you. I want fiber scheduling to live outside of IrrBAW and boost, ergo the reason for using Boost::Context. |
How do you think about Coroutine? Well I think I forgot, I probably want Intel TBB more than Boost.Fiber for my game engine. |
Coroutine is still stackless... i.e. coroutine is a generalized routine (routine = function call). |
I'm also considering this: https://github.com/dougbinks/enkiTS |
Mutexes, Barriers, wait for all, async file I/O and custom schedulers |
http://www.1024cores.net/home/lock-free-algorithms/tricks/fibers We should probably benchmark using the case of filtering a 4096^2 or 8192^2 image's mip-maps on a CPU with the following techniques:
We should gather data about the performance characteristics of the following hardware:
We should gather a performance chart of time-to-finish vs. task size for every "concurrency method" |
Unlike your traditional coroutine vs. fiber benchmark, we'll be focusing on tasks with a duration in microseconds, not nanoseconds |
Really want/need this in core C++23 |
Asynchronous I/O requires an Probably an |
We want to achieve this, so that we can control the pre-emption of threads and affinity
http://twvideo01.ubm-us.net/o1/vault/gdc2015/presentations/Gyrling_Christian_Parallelizing_The_Naughty.pdf
NOTE: Engine should still work and be compatible with non-fibered/jobbed execution.
However we don't want to take responsibility for the job-scheduling.
We can build a default scheduler for the user to build-off, but should make it easily replaceable (like IAssetLoaderOverride).
We shall provide fiber-safe replacement for std::mutex and std::condition_variable.
The library should be able to change between normal C++11 threading and fiber-threading via a compile flag ( switching out std::mutex, std::confition_variable for alternates).
We should look into and how they achieve the stack allocation, register saving etc.
https://www.boost.org/doc/libs/1_69_0/libs/context/doc/html/index.html
For some ideas for synch primitives:
https://www.boost.org/doc/libs/1_69_0/libs/fiber/doc/html/index.html
https://www.boost.org/doc/libs/1_69_0/libs/coroutine2/doc/html/index.html
https://www.boost.org/doc/libs/1_69_0/doc/html/lockfree.html
The text was updated successfully, but these errors were encountered: