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

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

#include <tbbComputeController.h>

Public Types

typedef CpuComputeContext ComputeContext
 

Public Member Functions

 TbbComputeController (int numThreads=-1)
 
template<class VERTEX_BUFFER , class VARYING_BUFFER >
void Compute (CpuComputeContext 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 (CpuComputeContext const *context, Far::KernelBatchVector const &batches, VERTEX_BUFFER *vertexBuffer)
 
void Synchronize ()
 Waits until all running subdivision kernels finish. More...
 

Protected Member Functions

void ApplyStencilTableKernel (Far::KernelBatch const &batch, ComputeContext const *context) const
 
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 TBB subdivision kernels.

TbbComputeController is a compute controller class to launch TBB threaded subdivision kernels. It requires CpuVertexBufferInterface 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 49 of file tbbComputeController.h.

Member Typedef Documentation

Definition at line 51 of file tbbComputeController.h.

Constructor & Destructor Documentation

TbbComputeController ( int  numThreads = -1)
explicit

Constructor.

Parameters
numThreadsspecifies how many openmp parallel threads to use. -1 attempts to use all available processors.

Member Function Documentation

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

Definition at line 125 of file tbbComputeController.h.

void Compute ( CpuComputeContext 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 CpuContext 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 81 of file tbbComputeController.h.

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

Execute subdivision kernels and apply to given vertex buffers.

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

Definition at line 107 of file tbbComputeController.h.

void Synchronize ( )

Waits until all running subdivision kernels finish.

void unbind ( )
inlineprotected

Definition at line 155 of file tbbComputeController.h.

Friends And Related Function Documentation

friend class Far::KernelBatchDispatcher
friend

Definition at line 119 of file tbbComputeController.h.


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