7#ifndef PXR_EXEC_VDF_SPECULATION_EXECUTOR_H
8#define PXR_EXEC_VDF_SPECULATION_EXECUTOR_H
23PXR_NAMESPACE_OPEN_SCOPE
35 template <
typename>
class EngineType,
36 typename DataManagerType>
38 public VdfDataManagerBasedSubExecutor <
40 VdfSpeculationExecutorBase >
44 VdfDataManagerBasedSubExecutor <
46 VdfSpeculationExecutorBase >
82 const VdfMask &mask)
override final;
89 const VdfMask &mask)
override final;
93 virtual const VdfExecutorFactoryBase &
GetFactory() const override final {
103 const VdfRequest &computeRequest,
111 virtual void _TouchOutput(
const VdfOutput &output)
const override final {
112 Base::GetNonSpeculationParentExecutor()->_TouchOutput(output);
119 static const _Factory _factory;
123 EngineType<DataManagerType> _engine;
129template <
template <
typename>
class EngineType,
typename DataManagerType>
130const typename VdfSpeculationExecutor<EngineType, DataManagerType>::_Factory
133template <
template <
typename>
class EngineType,
typename DataManagerType>
137 Base(parentExecutor),
138 _engine(*this, &this->_dataManager)
141 Base::_SetSpeculationNode(speculationNode);
150 Base::SetExecutionStats(subStats);
159template <
template <
typename>
class EngineType,
typename DataManagerType>
167 Base::SetOutputValue(output, value, mask);
170 _TouchOutput(output);
173template <
template <
typename>
class EngineType,
typename DataManagerType>
181 const bool success = Base::TakeOutputValue(output, value, mask);
184 _TouchOutput(output);
189template <
template <
typename>
class EngineType,
typename DataManagerType>
193 const VdfRequest &computeRequest,
208 [&engine = _engine, &schedule, &computeRequest, errorLogger]() {
209 engine.RunSchedule(schedule, computeRequest, errorLogger);
213PXR_NAMESPACE_CLOSE_SCOPE
Low-level utilities for informing users of various internal and external diagnostic conditions.
Execution stats profiling event logger.
VDF_API VdfExecutionStats * AddSubStat(const VdfNetwork *network, const VdfNode *invokingNode)
Push execution stats onto the hierarchy queue.
A client may instantiate an object of this class and set it in an executor, to collect errors that ma...
Abstract base class for classes that execute a VdfNetwork to compute a requested set of values.
const std::atomic_bool * GetInterruptionFlag() const
Returns the interruption flag.
VdfExecutionStats * GetExecutionStats() const
Returns the Execution Stats object, if any.
A VdfMask is placed on connections to specify the data flowing through them.
const VdfNetwork & GetNetwork() const
Returns the network to which this node belongs.
A VdfOutput represents an output on a node.
Contains a specification of how to execute a particular VdfNetwork.
Executor used in speculation.
VdfSpeculationExecutor(const VdfSpeculationNode *speculationNode, const VdfExecutorInterface *parentExecutor)
Constructs a speculation executor that was initiated from speculationNode while being computed by par...
virtual void SetOutputValue(const VdfOutput &output, const VdfVector &value, const VdfMask &mask) override final
Set the cached value for a given output.
virtual bool TakeOutputValue(const VdfOutput &output, VdfVector *value, const VdfMask &mask) override final
Transfers ownership of value to the given output.
virtual ~VdfSpeculationExecutor()
Destructor.
virtual const VdfExecutorFactoryBase & GetFactory() const override final
Returns the factory instance for this executor.
VdfSpeculationExecutor(const VdfExecutorInterface *parentExecutor)
Construct a speculation executor with the given parentExecutor, without registering a speculation nod...
A node that pulls on a vector of value that are downstream of the current execution position.
This class is used to abstract away knowledge of the cache data used for each node.
#define TF_VERIFY(cond, format,...)
Checks a condition and reports an error if it evaluates false.
auto WorkWithScopedParallelism(Fn &&fn, bool dropPythonGIL=true)
Invoke fn, ensuring that all wait operations on concurrent constructs invoked by the calling thread o...