CLVertexBuffer Class Reference

Concrete vertex buffer class for OpenCL subvision. More...

#include <clVertexBuffer.h>

Public Member Functions

 ~CLVertexBuffer ()
 Destructor. More...
 
void UpdateData (const float *src, int startVertex, int numVertices, cl_command_queue clQueue)
 
template<typename DEVICE_CONTEXT >
void UpdateData (const float *src, int startVertex, int numVertices, DEVICE_CONTEXT context)
 
int GetNumElements () const
 Returns how many elements defined in this vertex buffer. More...
 
int GetNumVertices () const
 Returns how many vertices allocated in this vertex buffer. More...
 
cl_mem BindCLBuffer (cl_command_queue queue)
 Returns the CL memory object. More...
 

Static Public Member Functions

static CLVertexBufferCreate (int numElements, int numVertices, cl_context clContext)
 Creator. Returns NULL if error. More...
 
template<typename DEVICE_CONTEXT >
static CLVertexBufferCreate (int numElements, int numVertices, DEVICE_CONTEXT context)
 

Protected Member Functions

 CLVertexBuffer (int numElements, int numVertices, cl_context clContext)
 Constructor. More...
 
bool allocate (cl_context clContext)
 

Detailed Description

Concrete vertex buffer class for OpenCL subvision.

CLVertexBuffer implements CLVertexBufferInterface. An instance of this buffer class can be passed to CLEvaluator

Definition at line 42 of file clVertexBuffer.h.

Constructor & Destructor Documentation

Destructor.

CLVertexBuffer ( int  numElements,
int  numVertices,
cl_context  clContext 
)
protected

Constructor.

Member Function Documentation

bool allocate ( cl_context  clContext)
protected

Allocates CL memory for this buffer. Returns true if success.

cl_mem BindCLBuffer ( cl_command_queue  queue)

Returns the CL memory object.

static CLVertexBuffer* Create ( int  numElements,
int  numVertices,
cl_context  clContext 
)
static

Creator. Returns NULL if error.

static CLVertexBuffer* Create ( int  numElements,
int  numVertices,
DEVICE_CONTEXT  context 
)
inlinestatic

Definition at line 49 of file clVertexBuffer.h.

int GetNumElements ( ) const

Returns how many elements defined in this vertex buffer.

int GetNumVertices ( ) const

Returns how many vertices allocated in this vertex buffer.

void UpdateData ( const float *  src,
int  startVertex,
int  numVertices,
cl_command_queue  clQueue 
)

This method is meant to be used in client code in order to provide coarse vertices data to Osd.

void UpdateData ( const float *  src,
int  startVertex,
int  numVertices,
DEVICE_CONTEXT  context 
)
inline

Definition at line 62 of file clVertexBuffer.h.


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