Photon Engine 2.0.0-beta
A physically based renderer.
|
A manager that distributes a fixed amount of work to workers. More...
#include <WorkScheduler.h>
Public Member Functions | |
WorkScheduler () | |
A scheduler with no work load. | |
WorkScheduler (std::size_t numWorkers, const WorkUnit &totalWorkUnit) | |
A scheduler with specific number of workers and work load. | |
bool | dispatch (WorkUnit *out_workUnit) override |
Get some amount of work. | |
bool | schedule (WorkUnit *out_workUnit) |
Get some amount of work. | |
void | scheduleAll (std::vector< WorkUnit > &out_workUnits) |
void | submit (const WorkUnit &workUnit) |
float | getScheduledFraction () const |
float | getSubmittedFraction () const |
bool | isExhausted () const |
Checks if all works had been scheduled. | |
Public Member Functions inherited from ph::IWorkDispatcher | |
virtual | ~IWorkDispatcher ()=default |
Protected Attributes | |
std::size_t | m_numWorkers |
WorkUnit | m_totalWorkUnit |
std::size_t | m_totalVolume |
std::size_t | m_scheduledVolume |
std::size_t | m_submittedVolume |
A manager that distributes a fixed amount of work to workers.
The scheduler will deliver some amount of work on demand, where the total amount of work is fixed. The sizes of each delivered work is implementation defined.
|
inline |
A scheduler with no work load.
|
inline |
A scheduler with specific number of workers and work load.
|
inlineoverridevirtual |
Get some amount of work.
The meaning of the work dimensions is depending on the use case.
Implements ph::IWorkDispatcher.
|
inline |
|
inline |
|
inline |
Checks if all works had been scheduled.
|
inline |
Get some amount of work.
|
inline |
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |