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

An interface class for GPU computation. More...

+ Inheritance diagram for HdComputation:

Public Member Functions

virtual void Execute (HdBufferArrayRangeSharedPtr const &range, HdResourceRegistry *resourceRegistry)=0
 Execute computation. More...
 
virtual int GetNumOutputElements () const =0
 Returns the size of its destination buffer (located by range argument of Execute()). More...
 
virtual void GetBufferSpecs (HdBufferSpecVector *specs) const =0
 Add the buffer spec for this computation into given bufferspec vector. More...
 
bool IsValid ()
 This function is needed as HdComputation shares a templatized interface with HdBufferSource. More...
 

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.

Member Function Documentation

virtual void Execute ( HdBufferArrayRangeSharedPtr const &  range,
HdResourceRegistry resourceRegistry 
)
pure virtual

Execute computation.

Implemented in HdStExtCompGpuComputation, and HdStCopyComputationGPU.

virtual void 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, and HdStCopyComputationGPU.

virtual int 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, and HdStCopyComputationGPU.

bool IsValid ( )
inline

This function is needed as HdComputation 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: