Games Task Scheduler (GTS)
A multi-processor scheduling framework for games engines
|
A construct that maps parallel-for behavior to a MicroScheduler. More...
#include <ParallelFor.h>
Public Member Functions | |
GTS_INLINE | ParallelFor (MicroScheduler &scheduler, uint32_t priority=0) |
template<typename TPartitioner , typename TRange , typename TFunc > | |
GTS_INLINE void | operator() (TRange const &range, TFunc func, TPartitioner partitioner, void *pUserData, bool block=true) |
Applies the given function 'func' to the specified iteration 'range'. More... | |
template<typename TIter , typename TFunc , typename TPartitioner = AdaptivePartitioner> | |
GTS_INLINE void | operator() (TIter begin, TIter end, TFunc func, TPartitioner partitioner=TPartitioner()) |
Applies the given function 'func' to the specified 1D iteration range [begin, end). Always uses an AdaptivePartitioner with a minimum block size of 1. More... | |
A construct that maps parallel-for behavior to a MicroScheduler.
|
inline |
Creates a ParallelFor object bound to the specified 'scheduler'. All parallel-for operations will be scheduled with the specified 'priority'.
|
inline |
Applies the given function 'func' to the specified 1D iteration range [begin, end). Always uses an AdaptivePartitioner with a minimum block size of 1.
func | The function to apply to each element of range. Signature: void(*)(TIter iter, void* pUserData, TaskContext const&);
|
|
inline |
Applies the given function 'func' to the specified iteration 'range'.
range | An iteration range. |
func | The function to apply to each element of range. Signature: void(*)(TRange& range, void* pUserData, TaskContext const&);
|
partitioner | The partitioner object that determines when work is subdivided during scheduling. |
pUserData | Optional user data that will be passed into func. |
block | Flag true to block until all ParallelFor tasks complete |