Photon Engine 2.0.0-beta
A physically based renderer.
|
#include <Workflow.h>
Classes | |
class | WorkHandle |
Lightweight handle for an added work. More... | |
Public Types | |
using | Work = std::function<void()> |
Public Member Functions | |
Workflow () | |
Workflow (std::size_t numExpectedWorks) | |
WorkHandle | addWork (Work work) |
WorkHandle | acquireWork (std::size_t workIndex) |
template<typename... WorkTypes> | |
auto | addWorks (WorkTypes &&... works) |
void | dependsOn (WorkHandle target, WorkHandle targetDependency) |
void | runAndWaitAllWorks (FixedSizeThreadPool &workers) |
std::size_t | numWorks () const |
using ph::Workflow::Work = std::function<void()> |
ph::Workflow::Workflow | ( | ) |
|
explicit |
Workflow::WorkHandle ph::Workflow::acquireWork | ( | std::size_t | workIndex | ) |
Workflow::WorkHandle ph::Workflow::addWork | ( | Work | work | ) |
|
inline |
void ph::Workflow::dependsOn | ( | WorkHandle | target, |
WorkHandle | targetDependency ) |
std::size_t ph::Workflow::numWorks | ( | ) | const |
void ph::Workflow::runAndWaitAllWorks | ( | FixedSizeThreadPool & | workers | ) |