Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ph::Workflow Class Referencefinal

#include <Workflow.h>

Inheritance diagram for ph::Workflow:
ph::INoCopyAndMove

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
 

Member Typedef Documentation

◆ Work

using ph::Workflow::Work = std::function<void()>

Constructor & Destructor Documentation

◆ Workflow() [1/2]

ph::Workflow::Workflow ( )

◆ Workflow() [2/2]

ph::Workflow::Workflow ( std::size_t numExpectedWorks)
explicit

Member Function Documentation

◆ acquireWork()

Workflow::WorkHandle ph::Workflow::acquireWork ( std::size_t workIndex)

◆ addWork()

Workflow::WorkHandle ph::Workflow::addWork ( Work work)

◆ addWorks()

template<typename... WorkTypes>
auto ph::Workflow::addWorks ( WorkTypes &&... works)
inline

◆ dependsOn()

void ph::Workflow::dependsOn ( WorkHandle target,
WorkHandle targetDependency )

◆ numWorks()

std::size_t ph::Workflow::numWorks ( ) const

◆ runAndWaitAllWorks()

void ph::Workflow::runAndWaitAllWorks ( FixedSizeThreadPool & workers)

The documentation for this class was generated from the following files: