Soul-Engine icon indicating copy to clipboard operation
Soul-Engine copied to clipboard

Add Parallel For with the Fiber Schedular

Open Behemyth opened this issue 8 years ago • 0 comments

The "ParallelFor" function should divide a for loop into chucks which are each their own job. These jobs then execute through the fiber scheduler. Take a look at Soul Engine\Source\Parallelism\Fiber\Scheduler.h/.cpp at ForEachThread which executes a callable on each thread. You can implement different varieties of the "ParallelFor" function. Maybe one would be for std conforming containers like https://en.cppreference.com/w/cpp/algorithm/for_each. Maybe for pure iteration, you would take a parameter such as iterationCount and another for taskCount. Maybe the given callable would require a value i as its first parameter, allowing it to make use of its ID.

This is a smaller task, but heavy on C++ knowledge.

Behemyth avatar Jul 23 '17 03:07 Behemyth