#include <PDGE_Evaluator.h>
Definition at line 54 of file PDGE_Evaluator.h.
The state of the evaluator object.
Enumerator |
---|
eUninitialized |
The evaluator is uninitialize and evaluation has not yet begun.
|
eEvaluating |
The evaluator is evaluating.
|
eCanceling |
The evaluator is canceling the current evaluation.
|
eCompleted |
The evaluator has completed, either because it ran normally or because it was canceled.
|
eInvalid |
This object is invalid because it was cleaned up during shutdown.
|
Definition at line 58 of file PDGE_Evaluator.h.
PDGE_Evaluator::PDGE_Evaluator |
( |
| ) |
|
PDGE_Evaluator::~PDGE_Evaluator |
( |
| ) |
|
|
overridenoexcept |
Adds a root dependency – a dependency that must be completed before this evaluator can be marked as a Completed.
void PDGE_Evaluator::cancelEvaluator |
( |
| ) |
|
Cancels the current evaluation. If this object is not evaluating, this method does nothing.
Called when all dependencies on this object's root dependency have resolved. This indicates that the cook is complete.
Reimplemented from PDGE_DependencyOwner.
Evaluates the dependency graph. If blocking is true, this method waits until the evaluation is completed. When blocking the functors created by the evaluator will be created in a task scope that is parented to the calling code's current task scope. Otherwise, if the cook is not blocking, an empty task scope will be used and evaluating dependencies will be unable to share task locks held by the calling code.
Returns the evaluation options used for the current cook.
Definition at line 92 of file PDGE_Evaluator.h.
State PDGE_Evaluator::evaluationState |
( |
| ) |
const |
|
inline |
Returns the current state of the evaluator. This method is not thread- safe when called off the main thread if the main thread may be calling cancel().
Definition at line 87 of file PDGE_Evaluator.h.
int64 PDGE_Evaluator::getMemoryUsage |
( |
bool |
inclusive | ) |
const |
|
overridevirtual |
Returns true if this evaluator depends on the specified dependency.
Definition at line 123 of file PDGE_Evaluator.h.
void PDGE_Evaluator::invalidateEvaluator |
( |
| ) |
|
Sets this evaluator as invalid, which disables any additional work creation. It also waits for the contained task group to finish any pending work, so that it can be cleanly destroyed.
Immediately processes partial evaluations in a dependency resolution array on the calling thread. Adds additional non-partial resolutions that become unblocked to the array.
void PDGE_Evaluator::postEvaluate |
( |
| ) |
|
|
protected |
virtual void PDGE_Evaluator::postEvaluation |
( |
State |
state, |
|
|
bool |
canceled |
|
) |
| |
|
inlineprotectedvirtual |
bool PDGE_Evaluator::preEvaluate |
( |
| ) |
|
|
protected |
virtual bool PDGE_Evaluator::preEvaluation |
( |
| ) |
|
|
inlineprotectedvirtual |
Adds an initial dependency resolution, which will be processed as soon as evaluation begins.
Queues a dependency resolution array, which will be processed in the background with the task group owned by this object.. This method should be used when queueing resolutions from a different TBB task or a thread that is NOT already being run through the task group associated with this evaluator object.
void PDGE_Evaluator::resetEvaluator |
( |
| ) |
|
Resets the object back to its default state. This method cannot be called unless the evaluator is the Completed or Uninitialized state.
Immediately processes a dependency resolution array on the calling thread. This should only be called within the task hierarchy of the task group associated with the evaluator object. Otherwise, for external code that wishes to dynamically submit additional work, the queueResolve method should be used instead.
template<typename WrappedFunction , typename... Args>
void PDGE_Evaluator::runFunctor |
( |
Args &&... |
args | ) |
|
|
inline |
Runs a functor with the evaluator's task group and returns immediately. The functor will eventually run in the background.
Definition at line 162 of file PDGE_Evaluator.h.
virtual bool PDGE_Evaluator::tickEvaluation |
( |
| ) |
|
|
inlineprotectedvirtual |
The documentation for this class was generated from the following file: