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

#include <computation.h>

+ Inheritance diagram for HdComputation:

Public Member Functions

virtual HD_API ~HdComputation ()
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 HD_API HdComputation::~HdComputation ( )

Member Function Documentation

virtual void HdComputation::Execute ( HdBufferArrayRangeSharedPtr const range,
HdResourceRegistry resourceRegistry 
pure virtual
virtual void HdComputation::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_FlatNormalsComputationGPU, HdStCopyComputationGPU, and HdSt_SmoothNormalsComputationGPU.

virtual int HdComputation::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_FlatNormalsComputationGPU, HdSt_SmoothNormalsComputationGPU, and HdStCopyComputationGPU.

bool HdComputation::IsValid ( )

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: