ITK  4.2.0
Insight Segmentation and Registration Toolkit
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
itk::GPUKernelManager Class Reference

#include <itkGPUKernelManager.h>

+ Inheritance diagram for itk::GPUKernelManager:
+ Collaboration diagram for itk::GPUKernelManager:

List of all members.

Classes

struct  KernelArgumentList

Public Types

typedef SmartPointer< const SelfConstPointer
typedef SmartPointer< SelfPointer
typedef GPUKernelManager Self
typedef LightObject Superclass
- Public Types inherited from itk::LightObject

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother (void) const
int CreateKernel (const char *kernelName)
int GetCurrentCommandQueueID ()
cl_int GetKernelWorkGroupInfo (int kernelIdx, cl_kernel_work_group_info paramName, void *value)
virtual const char * GetNameOfClass () const
bool LaunchKernel (int kernelIdx, int dim, vcl_size_t *globalWorkSize, vcl_size_t *localWorkSize)
bool LaunchKernel1D (int kernelIdx, vcl_size_t globalWorkSize, vcl_size_t localWorkSize)
bool LaunchKernel2D (int kernelIdx, vcl_size_t globalWorkSizeX, vcl_size_t globalWorkSizeY, vcl_size_t localWorkSizeX, vcl_size_t localWorkSizeY)
bool LaunchKernel3D (int kernelIdx, vcl_size_t globalWorkSizeX, vcl_size_t globalWorkSizeY, vcl_size_t globalWorkSizeZ, vcl_size_t localWorkSizeX, vcl_size_t localWorkSizeY, vcl_size_t localWorkSizeZ)
bool LoadProgramFromFile (const char *filename, const char *cPreamble="")
bool LoadProgramFromString (const char *cSource, const char *cPreamble="")
void SetCurrentCommandQueue (int queueid)
bool SetKernelArg (int kernelIdx, cl_uint argIdx, vcl_size_t argSize, const void *argVal)
bool SetKernelArgWithImage (int kernelIdx, cl_uint argIdx, GPUDataManager::Pointer manager)
- Public Member Functions inherited from itk::LightObject
virtual void Delete ()
virtual int GetReferenceCount () const
 itkCloneMacro (Self)
void Print (std::ostream &os, Indent indent=0) const
virtual void Register () const
virtual void SetReferenceCount (int)
virtual void UnRegister () const

Static Public Member Functions

static Pointer New ()
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()

Protected Member Functions

bool CheckArgumentReady (int kernelIdx)
 GPUKernelManager ()
void ResetArguments (int kernelIdx)
virtual ~GPUKernelManager ()
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 LightObject ()
virtual void PrintHeader (std::ostream &os, Indent indent) const
virtual void PrintSelf (std::ostream &os, Indent indent) const
virtual void PrintTrailer (std::ostream &os, Indent indent) const
virtual ~LightObject ()

Private Member Functions

 GPUKernelManager (const Self &)
void operator= (const Self &)

Private Attributes

int m_CommandQueueId
std::vector< std::vector
< KernelArgumentList > > 
m_KernelArgumentReady
std::vector< cl_kernel > m_KernelContainer
GPUContextManagerm_Manager
cl_program m_Program

Additional Inherited Members

- Protected Types inherited from itk::LightObject
typedef int InternalReferenceCountType
- Protected Attributes inherited from itk::LightObject
InternalReferenceCountType m_ReferenceCount
SimpleFastMutexLock m_ReferenceCountLock

Detailed Description

GPU kernel manager implemented using OpenCL.

This class is responsible for managing the GPU kernel and command queue.

Definition at line 45 of file itkGPUKernelManager.h.


Member Typedef Documentation

Reimplemented from itk::LightObject.

Definition at line 58 of file itkGPUKernelManager.h.

Reimplemented from itk::LightObject.

Definition at line 57 of file itkGPUKernelManager.h.

Standard class typedefs.

Reimplemented from itk::LightObject.

Definition at line 55 of file itkGPUKernelManager.h.

Definition at line 56 of file itkGPUKernelManager.h.


Constructor & Destructor Documentation

itk::GPUKernelManager::GPUKernelManager ( )
protected
virtual itk::GPUKernelManager::~GPUKernelManager ( )
inlineprotectedvirtual

Definition at line 94 of file itkGPUKernelManager.h.

itk::GPUKernelManager::GPUKernelManager ( const Self )
private

Member Function Documentation

bool itk::GPUKernelManager::CheckArgumentReady ( int  kernelIdx)
protected
virtual::itk::LightObject::Pointer itk::GPUKernelManager::CreateAnother ( void  ) const
virtual

Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.

Reimplemented from itk::LightObject.

int itk::GPUKernelManager::CreateKernel ( const char *  kernelName)
int itk::GPUKernelManager::GetCurrentCommandQueueID ( )
cl_int itk::GPUKernelManager::GetKernelWorkGroupInfo ( int  kernelIdx,
cl_kernel_work_group_info  paramName,
void *  value 
)
virtual const char* itk::GPUKernelManager::GetNameOfClass ( ) const
virtual

Return the name of this class as a string. Used by the object factory (implemented in New()) to instantiate objects of a named type. Also used for debugging and other output information.

Reimplemented from itk::LightObject.

bool itk::GPUKernelManager::LaunchKernel ( int  kernelIdx,
int  dim,
vcl_size_t *  globalWorkSize,
vcl_size_t *  localWorkSize 
)
bool itk::GPUKernelManager::LaunchKernel1D ( int  kernelIdx,
vcl_size_t  globalWorkSize,
vcl_size_t  localWorkSize 
)
bool itk::GPUKernelManager::LaunchKernel2D ( int  kernelIdx,
vcl_size_t  globalWorkSizeX,
vcl_size_t  globalWorkSizeY,
vcl_size_t  localWorkSizeX,
vcl_size_t  localWorkSizeY 
)
bool itk::GPUKernelManager::LaunchKernel3D ( int  kernelIdx,
vcl_size_t  globalWorkSizeX,
vcl_size_t  globalWorkSizeY,
vcl_size_t  globalWorkSizeZ,
vcl_size_t  localWorkSizeX,
vcl_size_t  localWorkSizeY,
vcl_size_t  localWorkSizeZ 
)
bool itk::GPUKernelManager::LoadProgramFromFile ( const char *  filename,
const char *  cPreamble = "" 
)
bool itk::GPUKernelManager::LoadProgramFromString ( const char *  cSource,
const char *  cPreamble = "" 
)
static Pointer itk::GPUKernelManager::New ( )
static

Method for creation through the object factory.

Reimplemented from itk::LightObject.

Referenced by itk::GPUFiniteDifferenceFunction< TDeformationField >::GPUFiniteDifferenceFunction().

void itk::GPUKernelManager::operator= ( const Self )
private

Mutex lock to protect modification to the reference count

Reimplemented from itk::LightObject.

void itk::GPUKernelManager::ResetArguments ( int  kernelIdx)
protected
void itk::GPUKernelManager::SetCurrentCommandQueue ( int  queueid)
bool itk::GPUKernelManager::SetKernelArg ( int  kernelIdx,
cl_uint  argIdx,
vcl_size_t  argSize,
const void *  argVal 
)
bool itk::GPUKernelManager::SetKernelArgWithImage ( int  kernelIdx,
cl_uint  argIdx,
GPUDataManager::Pointer  manager 
)

Member Data Documentation

int itk::GPUKernelManager::m_CommandQueueId
private

Definition at line 108 of file itkGPUKernelManager.h.

std::vector< std::vector< KernelArgumentList > > itk::GPUKernelManager::m_KernelArgumentReady
private

Definition at line 111 of file itkGPUKernelManager.h.

std::vector< cl_kernel > itk::GPUKernelManager::m_KernelContainer
private

Definition at line 110 of file itkGPUKernelManager.h.

GPUContextManager* itk::GPUKernelManager::m_Manager
private

Definition at line 107 of file itkGPUKernelManager.h.

cl_program itk::GPUKernelManager::m_Program
private

Definition at line 105 of file itkGPUKernelManager.h.


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