C++ API Reference
|
Topology override evaluator for fine grain evaluation graphs. More...
#include <MPxTopologyEvaluator.h>
Public Member Functions | |
MPxTopologyEvaluator () | |
Constructor. More... | |
virtual | ~MPxTopologyEvaluator () |
Destructor. | |
bool | active (MStatus *ReturnStatus=nullptr) const |
Is evaluator active. More... | |
void | setActive (bool isNowActive, MStatus *ReturnStatus=nullptr) |
Change evaluator active state. More... | |
virtual bool | markIfSupported (const MEvaluationNode *node) |
Mark supported nodes. More... | |
virtual void | preMakeTopology (const MEvaluationGraph *graph) |
Prepare for making topology for given graph. More... | |
virtual bool | makeTopology (MTopologyClusterNode *cluster) |
Create subgraph nodes and connect to connection ports for given topology cluster. More... | |
virtual void | postMakeTopology (const MEvaluationGraph *graph) |
Finalize making of topology for given graph. More... | |
Static Public Member Functions | |
static const char * | className () |
Returns the name of this class. More... | |
Topology override evaluator for fine grain evaluation graphs.
Evaluation graph is representing evaluation requirements and dependencies between them. We coupled granularity of evaluation graph to granularity of dependency graph by making smallest execution equal to single dependency node. In many cases this causes no trouble and we can use custom evaluators to group bunch of nodes together and reduce the number of execution. But there are real cases where being able to express single dependency node as multiple executions (= multiple evaluation nodes) can give us better control about how things are evaluated and unlock even more performance. Some of this was possible as part of cluster evaluation, but evaluating a single node and scheduling evaluation of cluster evaluation was non-trivial and in many cases would just create instabilities.
New concept was created which allows topology override of evaluation graph. This makes possible to have total control over granularity, leverage already existing scheduling constraints and scheduling graph. Supports partial evaluation for minimal evaluation of cluster content. Finally, allows better resource utilization since execution of cluster content doesn't have to wait for entire upstream to start and downstream can start as soon as dependencies are ready (sort of transparent clusters, but much more configurable and with no constraints on granularity).
Constructor.
Also creates our internal evaluator.
bool active | ( | MStatus * | ReturnStatus = nullptr | ) | const |
Is evaluator active.
[out] | ReturnStatus | Returns success or object error when internal object is not associated with this evaluator |
void setActive | ( | bool | isNowActive, |
MStatus * | ReturnStatus = nullptr |
||
) |
Change evaluator active state.
[in] | isNowActive | New active state |
[out] | ReturnStatus | Returns success or object error when internal object is not associated with this evaluator |
|
virtual |
Mark supported nodes.
This call marks node as supported by the evaluator. It is safe to cause evaluation in this call, but this evaluation cost will increase partitioning time and won't reduce the next evaluation time. It is up to the developer to decide whether evaluation is required or the already-evaluated data in the datablock can be used. Call .outputValue/.outputArrayValue in the first case and .inputValue/.inputArrayValue in the second (the first is preferred).
Zero, one or more nodes can be marked by this call, since the dependency node design can involve multiple nodes being joined in a single setup (e.g. IK chains).
[in] | node | Node to set or clear supported bit |
|
virtual |
Prepare for making topology for given graph.
Topology for this evaluation is about to be created. This call happens once, just before makeTopology for each cluster is called.
[in] | graph | Graph which is constructing override topology |
|
virtual |
Create subgraph nodes and connect to connection ports for given topology cluster.
[in] | cluster | Topology cluster which to construct override topology |
|
virtual |
Finalize making of topology for given graph.
This call happens once, just after makeTopology for each cluster was called.
[in] | graph | Graph which is constructing override topology |
|
static |
Returns the name of this class.