MGPUDeformerBuffer Class Reference

#include <MPxGPUDeformer.h>

Class Description

Store GPU Representation of a data buffer.

MGPUDeformerBuffer is a simple buffer structure to group data related to a single GPU buffer.

Public Member Functions

 MGPUDeformerBuffer (const MUniqueString &name, bool readOnly, unsigned int elementSizeInBytes, unsigned int elementCount, unsigned int capacityInBytes, const MAutoCLMem &buffer, const MAutoCLEvent &event)
 Constructs an MGPUDeformerBuffer for an existing MAutoCLMem. More...
 
 MGPUDeformerBuffer ()
 Constructs an empty MGPUDeformerBuffer which cannot be used.
 
 ~MGPUDeformerBuffer ()
 Destructor.
 
bool isValid () const
 

Constructor & Destructor Documentation

MGPUDeformerBuffer ( const MUniqueString name,
bool  readOnly,
unsigned int  elementSizeInBytes,
unsigned int  elementCount,
unsigned int  capacityInBytes,
const MAutoCLMem buffer,
const MAutoCLEvent event 
)

Constructs an MGPUDeformerBuffer for an existing MAutoCLMem.

capacityInBytes must be less than or equal to the actual size of the cl_mem held by buffer. elementSizeInBytes() * elementCount must be less than or equal to capacityInBytes.

Parameters
[in]nameThe name of the buffer.
[in]readOnlyTrue if the MGPUDeformerBuffer is a read only buffer.
[in]elementSizeInBytesThe size of each element in the buffer in bytes.
[in]elementCountThe number of elements stored in the buffer.
[in]capacityInBytesThe capacity of the cl_mem in bytes.
[in]bufferThe OpenCL memory resource.
[in]eventThe data is buffer is safe to read when event holds a NULL event or event is complete.

Member Function Documentation

bool isValid ( ) const
Returns
true if the MGPUDeformerBuffer is valid and safe to use.

The documentation for this class was generated from the following files:
  • MPxGPUDeformer.h
  • MPxGPUDeformer.cpp