7#ifndef PXR_EXEC_EF_MASKED_SUB_EXECUTOR_H
8#define PXR_EXEC_EF_MASKED_SUB_EXECUTOR_H
14#include "pxr/exec/ef/api.h"
21#include <tbb/concurrent_unordered_map.h>
23PXR_NAMESPACE_OPEN_SCOPE
50 VdfDataManagerDeallocationMode::Background > > >
70 const VdfExecutorFactoryBase &
GetFactory()
const override {
117 const VdfMask &invalidationMask)
override;
130 const VdfRequest &computeRequest,
137 const VdfMask &mask)
const override;
143 const VdfId outputId,
144 const VdfMask &invalidationMask)
const override;
148 static const _Factory _factory;
154 using _InvalidOutputs = tbb::concurrent_unordered_map<VdfId, VdfMask>;
155 _InvalidOutputs _invalidOutputs;
161EfMaskedSubExecutor::_GetOutputValueForReading(
168 _InvalidOutputs::const_iterator it =
169 _invalidOutputs.find(output.
GetId());
170 if (parentExecutor &&
171 (it == _invalidOutputs.end() || !it->second.Overlaps(mask))) {
177PXR_NAMESPACE_CLOSE_SCOPE
This sub-executor masks the parent executor.
virtual EF_API ~EfMaskedSubExecutor()
Destructor.
virtual void _ClearData() override
Clears all the data caches associated with any output in the network.
virtual bool IsEmpty() const override
Indicates whether this executor contains data.
virtual EF_API void DuplicateOutputData(const VdfOutput &sourceOutput, const VdfOutput &destOutput) override
Duplicates the output data associated with sourceOutput and copies it to destOutput.
const VdfExecutorFactoryBase & GetFactory() const override
Factory construction.
EF_API EfMaskedSubExecutor(const VdfExecutorInterface *parentExecutor)
Constructor.
virtual bool _InvalidateOutput(const VdfOutput &output, const VdfMask &invalidationMask) override
Called during invalidation to mark outputs as invalid and determine when the traversal can terminate ...
virtual bool HasInvalidationTimestampMismatch(const VdfOutput &source, const VdfOutput &dest) const override
Returns true if the invalidation timestamps mismatch between the source and dest outputs.
This is a data manager for executors that uses data stored in a vector indexed by output ids.
An abstract base class for executors, which do not store any data at all.
virtual const VdfVector * _GetOutputValueForReading(const VdfOutput &output, const VdfMask &mask) const override
Returns an output value for reading.
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.
virtual bool HasInvalidationTimestampMismatch(const VdfOutput &source, const VdfOutput &dest) const =0
Returns true, if the invalidation timestamps between the source and dest outputs do not match,...
virtual void _Run(const VdfSchedule &schedule, const VdfRequest &computeRequest, VdfExecutorErrorLogger *errorLogger)=0
Run this executor with the given schedule and request.
const VdfVector * GetOutputValue(const VdfOutput &output, const VdfMask &mask) const
Returns the cached value for a given output if it has a cache that contains all values specified by m...
const VdfExecutorInterface * GetParentExecutor() const
Returns the parent executor, if any.
virtual bool _IsOutputInvalid(const VdfId outputId, const VdfMask &invalidationMask) const =0
Returns true if the output is already invalid for the given invalidationMask.
A VdfMask is placed on connections to specify the data flowing through them.
A VdfOutput represents an output on a node.
VdfId GetId() const
The unique id of this output.
Contains a specification of how to execute a particular VdfNetwork.
This class provides an executor engine to the speculation executor.
Executor used in speculation.
This class is used to abstract away knowledge of the cache data used for each node.
uint64_t VdfId
The unique identifier type for Vdf objects.