All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CLComputeController Class Reference

Compute controller for launching OpenCL Compute subdivision kernels. More...

#include <clComputeController.h>

Public Types

typedef CLComputeContext ComputeContext
 

Public Member Functions

 CLComputeController (cl_context clContext, cl_command_queue queue)
 
 ~CLComputeController ()
 Destructor. More...
 
template<class VERTEX_BUFFER , class VARYING_BUFFER >
void Compute (CLComputeContext const *context, Far::KernelBatchVector const &batches, VERTEX_BUFFER *vertexBuffer, VARYING_BUFFER *varyingBuffer, VertexBufferDescriptor const *vertexDesc=NULL, VertexBufferDescriptor const *varyingDesc=NULL)
 
template<class VERTEX_BUFFER >
void Compute (CLComputeContext const *context, Far::KernelBatchVector const &batches, VERTEX_BUFFER *vertexBuffer)
 
void Synchronize ()
 Waits until all running subdivision kernels finish. More...
 
cl_context GetContext () const
 Returns CL context. More...
 
cl_command_queue GetCommandQueue () const
 Returns CL command queue. More...
 

Protected Member Functions

void ApplyStencilTableKernel (Far::KernelBatch const &batch, ComputeContext const *context)
 
template<class VERTEX_BUFFER , class VARYING_BUFFER >
void bind (VERTEX_BUFFER *vertexBuffer, VARYING_BUFFER *varyingBuffer, VertexBufferDescriptor const *vertexDesc, VertexBufferDescriptor const *varyingDesc)
 
void unbind ()
 

Friends

class Far::KernelBatchDispatcher
 

Detailed Description

Compute controller for launching OpenCL Compute subdivision kernels.

CLComputeController is a compute controller class to launch OpenCL subdivision kernels. It requires CLVertexBufferInterface as arguments of Refine function.

Controller entities execute requests from Context instances that they share common interfaces with. Controllers are attached to discrete compute devices and share the devices resources with Context entities.

Definition at line 54 of file clComputeController.h.

Member Typedef Documentation

Definition at line 56 of file clComputeController.h.

Constructor & Destructor Documentation

CLComputeController ( cl_context  clContext,
cl_command_queue  queue 
)

Constructor.

Parameters
clContexta valid instanciated OpenCL context
queuea valid non-zero OpenCL command queue

Destructor.

Member Function Documentation

void ApplyStencilTableKernel ( Far::KernelBatch const &  batch,
ComputeContext const *  context 
)
protected
void bind ( VERTEX_BUFFER *  vertexBuffer,
VARYING_BUFFER *  varyingBuffer,
VertexBufferDescriptor const *  vertexDesc,
VertexBufferDescriptor const *  varyingDesc 
)
inlineprotected

Definition at line 139 of file clComputeController.h.

void Compute ( CLComputeContext const *  context,
Far::KernelBatchVector const &  batches,
VERTEX_BUFFER *  vertexBuffer,
VARYING_BUFFER *  varyingBuffer,
VertexBufferDescriptor const *  vertexDesc = NULL,
VertexBufferDescriptor const *  varyingDesc = NULL 
)
inline

Execute subdivision kernels and apply to given vertex buffers.

Parameters
contextThe CLContext to apply refinement operations to
batchesVector of batches of vertices organized by operative kernel
vertexBufferVertex-interpolated data buffer
vertexDescThe descriptor of vertex elements to be refined. if it's null, all primvars in the vertex buffer will be refined.
varyingBufferVertex-interpolated data buffer
varyingDescThe descriptor of varying elements to be refined. if it's null, all primvars in the vertex buffer will be refined.

Definition at line 89 of file clComputeController.h.

void Compute ( CLComputeContext const *  context,
Far::KernelBatchVector const &  batches,
VERTEX_BUFFER *  vertexBuffer 
)
inline

Execute subdivision kernels and apply to given vertex buffers.

Parameters
contextThe CLContext to apply refinement operations to
batchesVector of batches of vertices organized by operative kernel
vertexBufferVertex-interpolated data buffer

Definition at line 115 of file clComputeController.h.

cl_command_queue GetCommandQueue ( ) const
inline

Returns CL command queue.

Definition at line 129 of file clComputeController.h.

cl_context GetContext ( ) const
inline

Returns CL context.

Definition at line 126 of file clComputeController.h.

void Synchronize ( )

Waits until all running subdivision kernels finish.

void unbind ( )
inlineprotected

Definition at line 168 of file clComputeController.h.

Friends And Related Function Documentation

friend class Far::KernelBatchDispatcher
friend

Definition at line 133 of file clComputeController.h.


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