24 #ifndef PXR_IMAGING_HD_EXT_COMP_CPU_COMPUTATION_H
25 #define PXR_IMAGING_HD_EXT_COMP_CPU_COMPUTATION_H
28 #include "pxr/imaging/hd/api.h"
29 #include "pxr/imaging/hd/extCompInputSource.h"
31 #include "pxr/usd/sdf/path.h"
34 #include "pxr/base/vt/value.h"
38 PXR_NAMESPACE_OPEN_SCOPE
44 using HdExtCompCpuComputationSharedPtr =
45 std::shared_ptr<HdExtCompCpuComputation>;
63 static const size_t INVALID_OUTPUT_INDEX;
75 const Hd_ExtCompInputSourceSharedPtrVector &inputs,
83 static HdExtCompCpuComputationSharedPtr
86 HdBufferSourceSharedPtrVector *computationSources);
98 virtual bool Resolve()
override;
120 Hd_ExtCompInputSourceSharedPtrVector _inputs;
125 std::vector<VtValue> _outputValues;
133 PXR_NAMESPACE_CLOSE_SCOPE
135 #endif // PXR_IMAGING_HD_EXT_COMP_CPU_COMPUTATION_H
A Buffer Source that represents a CPU implementation of a ExtComputation.
Hydra Representation of a Client defined computation.
virtual HD_API TfToken const & GetName() const override
Returns the id for this computation as a token.
HD_API const VtValue & GetOutputByIndex(size_t index) const
Returns the value of the specified output (after the computations been Resolved). ...
virtual HD_API bool Resolve() override
Ask the scene delegate to run the computation and captures the output signals.
Token for efficient comparison, assignment, and hashing of known strings.
virtual HD_API bool _CheckValid() const override
Returns if the computation is specified correctly.
A abstract base class for pure cpu computation.
Adapter class providing data exchange with the client scene graph.
std::vector< TfToken > TfTokenVector
Convenience types.
A path value used to locate objects in layers or scenegraphs.
virtual HD_API size_t GetNumElements() const override
Returns the number of elements (e.g.
HD_API size_t GetOutputIndex(const TfToken &outputName) const
Converts a output name token into an index.
static HD_API HdExtCompCpuComputationSharedPtr CreateComputation(HdSceneDelegate *sceneDelegate, const HdExtComputation &computation, HdBufferSourceSharedPtrVector *computationSources)
Create a CPU computation implementing the given abstract computation.
Provides a container which may hold any type, and provides introspection and iteration over array typ...
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...