HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HdStComputation Class Referenceabstract

#include <computation.h>

+ Inheritance diagram for HdStComputation:

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 ()
 

Detailed Description

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.

Constructor & Destructor Documentation

virtual HDST_API HdStComputation::~HdStComputation ( )
virtual

Member Function Documentation

virtual void HdStComputation::Execute ( HdBufferArrayRangeSharedPtr const range,
HdResourceRegistry resourceRegistry 
)
pure virtual
virtual void HdStComputation::GetBufferSpecs ( HdBufferSpecVector specs) const
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.

virtual int HdStComputation::GetNumOutputElements ( ) const
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.

bool HdStComputation::IsValid ( )
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.


The documentation for this class was generated from the following file: