7#ifndef PXR_EXEC_VDF_SPECULATION_EXECUTOR_BASE_H
8#define PXR_EXEC_VDF_SPECULATION_EXECUTOR_BASE_H
14#include "pxr/exec/vdf/api.h"
17PXR_NAMESPACE_OPEN_SCOPE
32 virtual ~VdfSpeculationExecutorBase();
37 inline bool IsSpeculatingNode(
const VdfNode *node)
const;
43 return _parentNonSpeculationExecutor;
51 explicit VdfSpeculationExecutorBase(
56 void _SetSpeculationNode(
const VdfNode *speculationNode) {
57 _speculationNode = speculationNode;
63 const VdfNode *_speculationNode;
66 const VdfSpeculationExecutorBase *_parentSpeculationExecutor;
76VdfSpeculationExecutorBase::IsSpeculatingNode(
const VdfNode *node)
const
78 bool isSpeculatingNode =
false;
79 const VdfSpeculationExecutorBase *speculationExecutor =
this;
80 while (speculationExecutor) {
81 isSpeculatingNode |= (node == speculationExecutor->_speculationNode);
82 speculationExecutor = speculationExecutor->_parentSpeculationExecutor;
84 return isSpeculatingNode;
87PXR_NAMESPACE_CLOSE_SCOPE
Abstract base class for classes that execute a VdfNetwork to compute a requested set of values.
This is the base class for all nodes in a VdfNetwork.