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