TbbEvaluator Class Reference

#include <tbbEvaluator.h>

Static Public Member Functions

template<typename SRC_BUFFER , typename DST_BUFFER , typename STENCIL_TABLE >
static bool EvalStencils (SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE const *stencilTable, TbbEvaluator const *instance=NULL, void *deviceContext=NULL)
 Generic static eval stencils function. This function has a same signature as other device kernels have so that it can be called in the same way from OsdMesh template interface. More...
 
static bool EvalStencils (const float *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, const int *sizes, const int *offsets, const int *indices, const float *weights, int start, int end)
 Static eval stencils function which takes raw CPU pointers for input and output. More...
 
template<typename SRC_BUFFER , typename DST_BUFFER , typename STENCIL_TABLE >
static bool EvalStencils (SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, STENCIL_TABLE const *stencilTable, const TbbEvaluator *instance=NULL, void *deviceContext=NULL)
 Generic static eval stencils function with derivatives. This function has a same signature as other device kernels have so that it can be called in the same way from OsdMesh template interface. More...
 
static bool EvalStencils (const float *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, float *du, BufferDescriptor const &duDesc, float *dv, BufferDescriptor const &dvDesc, const int *sizes, const int *offsets, const int *indices, const float *weights, const float *duWeights, const float *dvWeights, int start, int end)
 Static eval stencils function with derivatives, which takes raw CPU pointers for input and output. More...
 
template<typename SRC_BUFFER , typename DST_BUFFER , typename PATCHCOORD_BUFFER , typename PATCH_TABLE >
static bool EvalPatches (SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, TbbEvaluator const *instance=NULL, void *deviceContext=NULL)
 Generic limit eval function. This function has a same signature as other device kernels have so that it can be called in the same way. More...
 
template<typename SRC_BUFFER , typename DST_BUFFER , typename PATCHCOORD_BUFFER , typename PATCH_TABLE >
static bool EvalPatches (SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, TbbEvaluator const *instance=NULL, void *deviceContext=NULL)
 Generic limit eval function with derivatives. This function has a same signature as other device kernels have so that it can be called in the same way. More...
 
static bool EvalPatches (const float *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, int numPatchCoords, const PatchCoord *patchCoords, const PatchArray *patchArrays, const int *patchIndexBuffer, const PatchParam *patchParamBuffer)
 Static limit eval function. It takes an array of PatchCoord and evaluate limit values on given PatchTable. More...
 
static bool EvalPatches (const float *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, float *du, BufferDescriptor const &duDesc, float *dv, BufferDescriptor const &dvDesc, int numPatchCoords, const PatchCoord *patchCoords, const PatchArray *patchArrays, const int *patchIndexBuffer, const PatchParam *patchParamBuffer)
 Static limit eval function. It takes an array of PatchCoord and evaluate limit values on given PatchTable. More...
 
static void Synchronize (void *deviceContext=NULL)
 synchronize all asynchronous computation invoked on this device. More...
 
static void SetNumThreads (int numThreads)
 initialize tbb task schedular (optional: client may use tbb::task_scheduler_init) More...
 

Detailed Description

Definition at line 40 of file tbbEvaluator.h.

Member Function Documentation

static bool EvalPatches ( SRC_BUFFER *  srcBuffer,
BufferDescriptor const &  srcDesc,
DST_BUFFER *  dstBuffer,
BufferDescriptor const &  dstDesc,
int  numPatchCoords,
PATCHCOORD_BUFFER *  patchCoords,
PATCH_TABLE *  patchTable,
TbbEvaluator const *  instance = NULL,
void *  deviceContext = NULL 
)
inlinestatic

Generic limit eval function. This function has a same signature as other device kernels have so that it can be called in the same way.


Limit evaluations with PatchTable


Parameters
srcBufferInput primvar buffer. must have BindCpuBuffer() method returning a const float pointer for read
srcDescvertex buffer descriptor for the input buffer
dstBufferOutput primvar buffer must have BindCpuBuffer() method returning a float pointer for write
dstDescvertex buffer descriptor for the output buffer
numPatchCoordsnumber of patchCoords.
patchCoordsarray of locations to be evaluated.
patchTableFar::PatchTable
instancenot used in the cpu evaluator
deviceContextnot used in the cpu evaluator

Definition at line 281 of file tbbEvaluator.h.

static bool EvalPatches ( SRC_BUFFER *  srcBuffer,
BufferDescriptor const &  srcDesc,
DST_BUFFER *  dstBuffer,
BufferDescriptor const &  dstDesc,
DST_BUFFER *  duBuffer,
BufferDescriptor const &  duDesc,
DST_BUFFER *  dvBuffer,
BufferDescriptor const &  dvDesc,
int  numPatchCoords,
PATCHCOORD_BUFFER *  patchCoords,
PATCH_TABLE *  patchTable,
TbbEvaluator const *  instance = NULL,
void *  deviceContext = NULL 
)
inlinestatic

Generic limit eval function with derivatives. This function has a same signature as other device kernels have so that it can be called in the same way.

Parameters
srcBufferInput primvar buffer. must have BindCpuBuffer() method returning a const float pointer for read
srcDescvertex buffer descriptor for the input buffer
dstBufferOutput primvar buffer must have BindCpuBuffer() method returning a float pointer for write
dstDescvertex buffer descriptor for the output buffer
duBufferOutput s-derivatives buffer must have BindCpuBuffer() method returning a float pointer for write
duDescvertex buffer descriptor for the duBuffer
dvBufferOutput t-derivatives buffer must have BindCpuBuffer() method returning a float pointer for write
dvDescvertex buffer descriptor for the dvBuffer
numPatchCoordsnumber of patchCoords.
patchCoordsarray of locations to be evaluated.
patchTableFar::PatchTable
instancenot used in the cpu evaluator
deviceContextnot used in the cpu evaluator

Definition at line 344 of file tbbEvaluator.h.

static bool EvalPatches ( const float *  src,
BufferDescriptor const &  srcDesc,
float *  dst,
BufferDescriptor const &  dstDesc,
int  numPatchCoords,
const PatchCoord patchCoords,
const PatchArray patchArrays,
const int *  patchIndexBuffer,
const PatchParam patchParamBuffer 
)
static

Static limit eval function. It takes an array of PatchCoord and evaluate limit values on given PatchTable.

Parameters
srcInput primvar pointer. An offset of srcDesc will be applied internally (i.e. the pointer should not include the offset)
srcDescvertex buffer descriptor for the input buffer
dstOutput primvar pointer. An offset of dstDesc will be applied internally.
dstDescvertex buffer descriptor for the output buffer
numPatchCoordsnumber of patchCoords.
patchCoordsarray of locations to be evaluated.
patchArraysan array of Osd::PatchArray struct indexed by PatchCoord::arrayIndex
patchIndexBufferan array of patch indices indexed by PatchCoord::vertIndex
patchParamBufferan array of Osd::PatchParam struct indexed by PatchCoord::patchIndex
static bool EvalPatches ( const float *  src,
BufferDescriptor const &  srcDesc,
float *  dst,
BufferDescriptor const &  dstDesc,
float *  du,
BufferDescriptor const &  duDesc,
float *  dv,
BufferDescriptor const &  dvDesc,
int  numPatchCoords,
const PatchCoord patchCoords,
const PatchArray patchArrays,
const int *  patchIndexBuffer,
const PatchParam patchParamBuffer 
)
static

Static limit eval function. It takes an array of PatchCoord and evaluate limit values on given PatchTable.

Parameters
srcInput primvar pointer. An offset of srcDesc will be applied internally (i.e. the pointer should not include the offset)
srcDescvertex buffer descriptor for the input buffer
dstOutput primvar pointer. An offset of dstDesc will be applied internally.
dstDescvertex buffer descriptor for the output buffer
duOutput s-derivatives pointer. An offset of duDesc will be applied internally.
duDescvertex buffer descriptor for the du buffer
dvOutput t-derivatives pointer. An offset of dvDesc will be applied internally.
dvDescvertex buffer descriptor for the dv buffer
numPatchCoordsnumber of patchCoords.
patchCoordsarray of locations to be evaluated.
patchArraysan array of Osd::PatchArray struct indexed by PatchCoord::arrayIndex
patchIndexBufferan array of patch indices indexed by PatchCoord::vertIndex
patchParamBufferan array of Osd::PatchParam struct indexed by PatchCoord::patchIndex
static bool EvalStencils ( SRC_BUFFER *  srcBuffer,
BufferDescriptor const &  srcDesc,
DST_BUFFER *  dstBuffer,
BufferDescriptor const &  dstDesc,
STENCIL_TABLE const *  stencilTable,
TbbEvaluator const *  instance = NULL,
void *  deviceContext = NULL 
)
inlinestatic

Generic static eval stencils function. This function has a same signature as other device kernels have so that it can be called in the same way from OsdMesh template interface.


Stencil evaluations with StencilTable


Parameters
srcBufferInput primvar buffer. must have BindCpuBuffer() method returning a const float pointer for read
srcDescvertex buffer descriptor for the input buffer
dstBufferOutput primvar buffer must have BindCpuBuffer() method returning a float pointer for write
dstDescvertex buffer descriptor for the output buffer
stencilTablestencil table to be applied.
instancenot used in the tbb kernel (declared as a typed pointer to prevent undesirable template resolution)
deviceContextnot used in the tbb kernel

Definition at line 73 of file tbbEvaluator.h.

static bool EvalStencils ( const float *  src,
BufferDescriptor const &  srcDesc,
float *  dst,
BufferDescriptor const &  dstDesc,
const int *  sizes,
const int *  offsets,
const int *  indices,
const float *  weights,
int  start,
int  end 
)
static

Static eval stencils function which takes raw CPU pointers for input and output.

Parameters
srcInput primvar pointer. An offset of srcDesc will be applied internally (i.e. the pointer should not include the offset)
srcDescvertex buffer descriptor for the input buffer
dstOutput primvar pointer. An offset of dstDesc will be applied internally.
dstDescvertex buffer descriptor for the output buffer
sizespointer to the sizes buffer of the stencil table to apply for the range [start, end)
offsetspointer to the offsets buffer of the stencil table
indicespointer to the indices buffer of the stencil table
weightspointer to the weights buffer of the stencil table
startstart index of stencil table
endend index of stencil table
static bool EvalStencils ( SRC_BUFFER *  srcBuffer,
BufferDescriptor const &  srcDesc,
DST_BUFFER *  dstBuffer,
BufferDescriptor const &  dstDesc,
DST_BUFFER *  duBuffer,
BufferDescriptor const &  duDesc,
DST_BUFFER *  dvBuffer,
BufferDescriptor const &  dvDesc,
STENCIL_TABLE const *  stencilTable,
const TbbEvaluator instance = NULL,
void *  deviceContext = NULL 
)
inlinestatic

Generic static eval stencils function with derivatives. This function has a same signature as other device kernels have so that it can be called in the same way from OsdMesh template interface.

Parameters
srcBufferInput primvar buffer. must have BindCpuBuffer() method returning a const float pointer for read
srcDescvertex buffer descriptor for the input buffer
dstBufferOutput primvar buffer must have BindCpuBuffer() method returning a float pointer for write
dstDescvertex buffer descriptor for the output buffer
duBufferOutput U-derivative buffer must have BindCpuBuffer() method returning a float pointer for write
duDescvertex buffer descriptor for the output buffer
dvBufferOutput V-derivative buffer must have BindCpuBuffer() method returning a float pointer for write
dvDescvertex buffer descriptor for the output buffer
stencilTablestencil table to be applied.
instancenot used in the tbb kernel (declared as a typed pointer to prevent undesirable template resolution)
deviceContextnot used in the tbb kernel

Definition at line 167 of file tbbEvaluator.h.

static bool EvalStencils ( const float *  src,
BufferDescriptor const &  srcDesc,
float *  dst,
BufferDescriptor const &  dstDesc,
float *  du,
BufferDescriptor const &  duDesc,
float *  dv,
BufferDescriptor const &  dvDesc,
const int *  sizes,
const int *  offsets,
const int *  indices,
const float *  weights,
const float *  duWeights,
const float *  dvWeights,
int  start,
int  end 
)
static

Static eval stencils function with derivatives, which takes raw CPU pointers for input and output.

Parameters
srcInput primvar pointer. An offset of srcDesc will be applied internally (i.e. the pointer should not include the offset)
srcDescvertex buffer descriptor for the input buffer
dstOutput primvar pointer. An offset of dstDesc will be applied internally.
dstDescvertex buffer descriptor for the output buffer
duOutput s-derivatives pointer. An offset of duDesc will be applied internally.
duDescvertex buffer descriptor for the output buffer
dvOutput t-derivatives pointer. An offset of dvDesc will be applied internally.
dvDescvertex buffer descriptor for the output buffer
sizespointer to the sizes buffer of the stencil table to apply for the range [start, end)
offsetspointer to the offsets buffer of the stencil table
indicespointer to the indices buffer of the stencil table
weightspointer to the weights buffer of the stencil table
duWeightspointer to the u-weights buffer of the stencil table
dvWeightspointer to the v-weights buffer of the stencil table
startstart index of stencil table
endend index of stencil table
static void SetNumThreads ( int  numThreads)
static

initialize tbb task schedular (optional: client may use tbb::task_scheduler_init)

Parameters
numThreadshow many threads
static void Synchronize ( void *  deviceContext = NULL)
static

synchronize all asynchronous computation invoked on this device.


Other methods



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