HDK
|
#include <computation.h>
Public Member Functions | |
virtual HDST_API | ~HdStComputation () |
virtual void | Execute (HdBufferArrayRangeSharedPtr const &range, HdResourceRegistry *resourceRegistry)=0 |
Execute computation. More... | |
virtual int | GetNumOutputElements () const =0 |
virtual void | GetBufferSpecs (HdBufferSpecVector *specs) const =0 |
bool | IsValid () |
An interface class for GPU computation.
GPU computation fills the result into range, which has to be allocated using buffer specs determined by GetBufferSpecs, and registered as a pair of computation and range.
Definition at line 52 of file computation.h.
|
virtual |
|
pure virtual |
Execute computation.
Implemented in HdStExtCompGpuComputation, HdSt_SmoothNormalsComputationGPU, HdSt_FlatNormalsComputationGPU, and HdStCopyComputationGPU.
|
pure virtual |
Add the buffer spec for this computation into given bufferspec vector. Caller has to allocate the destination buffer with respect to the BufferSpecs, and passes the range when registering the computation.
Implemented in HdStExtCompGpuComputation, HdSt_SmoothNormalsComputationGPU, HdSt_FlatNormalsComputationGPU, and HdStCopyComputationGPU.
|
pure virtual |
Returns the size of its destination buffer (located by range argument of Execute()). This function will be called after all HdBufferSources have been resolved and commited, so it can use the result of those buffer source results. Returning 0 means it doesn't need to resize.
Implemented in HdStExtCompGpuComputation, HdSt_SmoothNormalsComputationGPU, HdSt_FlatNormalsComputationGPU, and HdStCopyComputationGPU.
|
inline |
This function is needed as HdStComputation shares a templatized interface with HdBufferSource.
It is a check to see if the GetBufferSpecs would produce a valid result.
Definition at line 79 of file computation.h.