7#ifndef PXR_EXEC_VDF_SPECULATION_NODE_H
8#define PXR_EXEC_VDF_SPECULATION_NODE_H
14#include "pxr/exec/vdf/api.h"
20#include <tbb/concurrent_hash_map.h>
24PXR_NAMESPACE_OPEN_SCOPE
58 return VdfRequiredInputsPredicate::NoReads(*
this);
82 return context._GetExecutor();
90 VdfRequest _GetInputRequest(
const VdfSchedule &requestingSched)
const;
95 const VdfSchedule *_GetSchedule(
const VdfRequest &request)
const;
103 const VdfMask &inputDependencyMask,
117 struct _HashRequest {
118 bool equal(
const VdfRequest &lhs,
const VdfRequest &rhs)
const {
122 size_t hash(
const VdfRequest &request)
const {
123 return VdfRequest::Hash()(request);
130 using _ScheduleMap = tbb::concurrent_hash_map<
131 VdfRequest, std::unique_ptr<VdfSchedule>, _HashRequest>;
132 mutable _ScheduleMap _scheduleMap;
135PXR_NAMESPACE_CLOSE_SCOPE
Fast, compressed bit array which is capable of performing logical operations without first decompress...
A class that fully represents a connection between two VdfNodes.
A context is the parameter bundle passed to callbacks of computations.
Abstract base class for classes that execute a VdfNetwork to compute a requested set of values.
A VdfMask is placed on connections to specify the data flowing through them.
Class to hold on to an externally owned output and a mask.
A VdfNetwork is a collection of VdfNodes and their connections.
This is the base class for all nodes in a VdfNetwork.
virtual VDF_API VdfMask::Bits _ComputeInputDependencyMask(const VdfMaskedOutput &maskedOutput, const VdfConnection &inputConnection) const
Returns a mask that indicates which elements of the data that flows along inputConnection are needed ...
virtual VDF_API VdfMask _ComputeOutputDependencyMask(const VdfConnection &inputConnection, const VdfMask &inputDependencyMask, const VdfOutput &output) const
Returns a mask that indicates which elements of the data that flows along output depend on the elemen...
A VdfOutput represents an output on a node.
VdfOutputSpecs is a container for VdfOutputSpec objects.
Contains a specification of how to execute a particular VdfNetwork.
A node that pulls on a vector of value that are downstream of the current execution position.
virtual VdfRequiredInputsPredicate GetRequiredInputsPredicate(const VdfContext &context) const
Returns a predicate to determine the required read inputs.
virtual bool IsSpeculationNode() const
Returns true, indicating that this node performs speculation.
VDF_API VdfSpeculationNode(VdfNetwork *network, const VdfInputSpecs &inputSpecs, const VdfOutputSpecs &outputSpecs)
Construct a new speculation node.
VDF_API const VdfSchedule & GetSchedule(const VdfSchedule *requestingSched) const
Returns the schedule for this speculation node.
virtual VDF_API void Compute(const VdfContext &context) const
Executes the speculation node.