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

#include <GridScheduler.h>

Inheritance diagram for ph::GridScheduler:
ph::WorkScheduler ph::IWorkDispatcher

Public Types

enum class  EOrigin { LowerLeft , LowerRight , UpperLeft , UpperRight }
 

Public Member Functions

 GridScheduler ()
 
 GridScheduler (std::size_t numWorkers, const WorkUnit &totalWorkUnit)
 
 GridScheduler (std::size_t numWorkers, const WorkUnit &totalWorkUnit, const math::Vector2S &numCells)
 
 GridScheduler (std::size_t numWorkers, const WorkUnit &totalWorkUnit, const math::Vector2S &numCells, EOrigin origin, std::size_t prioriAxis)
 
- Public Member Functions inherited from ph::WorkScheduler
 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
 

Additional Inherited Members

- Protected Attributes inherited from ph::WorkScheduler
std::size_t m_numWorkers
 
WorkUnit m_totalWorkUnit
 
std::size_t m_totalVolume
 
std::size_t m_scheduledVolume
 
std::size_t m_submittedVolume
 

Detailed Description

Slice work region into rectangular cells with similar dimensions, each region has complete depth.

Member Enumeration Documentation

◆ EOrigin

enum class ph::GridScheduler::EOrigin
strong
Enumerator
LowerLeft 
LowerRight 
UpperLeft 
UpperRight 

Constructor & Destructor Documentation

◆ GridScheduler() [1/4]

ph::GridScheduler::GridScheduler ( )
inline

◆ GridScheduler() [2/4]

ph::GridScheduler::GridScheduler ( std::size_t numWorkers,
const WorkUnit & totalWorkUnit )
inline

◆ GridScheduler() [3/4]

ph::GridScheduler::GridScheduler ( std::size_t numWorkers,
const WorkUnit & totalWorkUnit,
const math::Vector2S & numCells )
inline

◆ GridScheduler() [4/4]

ph::GridScheduler::GridScheduler ( std::size_t numWorkers,
const WorkUnit & totalWorkUnit,
const math::Vector2S & numCells,
EOrigin origin,
std::size_t prioriAxis )
inline

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