|
|
Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages |
#include <itkGPUDataManager.h>
GPU memory manager implemented using OpenCL. Required by GPUImage class.
This class serves as a base class for GPU data container for GPUImage class, which is similar to ImageBase class for Image class. However, all the image-related meta data will be already stored in image class (parent of GPUImage), therefore we did not name it GPUImageBase. Rather, this class is a GPU-specific data manager that provides functionalities for CPU-GPU data synchronization and grafting GPU data.
Definition at line 66 of file itkGPUDataManager.h.
Inheritance diagram for itk::GPUDataManager:Public Types | |
| typedef SmartPointer< const Self > | ConstPointer |
| typedef MutexLockHolder< SimpleFastMutexLock > | MutexHolderType |
| typedef SmartPointer< Self > | Pointer |
| typedef GPUDataManager | Self |
| typedef Object | Superclass |
Public Member Functions | |
| void | Allocate () |
| unsigned int | GetBufferSize () |
| virtual const char * | GetClassName () const |
| virtual const bool & | GetCPUBufferLock () |
| void * | GetCPUBufferPointer () |
| virtual const bool & | GetGPUBufferLock () |
| cl_mem * | GetGPUBufferPointer () |
| virtual void | Graft (const GPUDataManager *data) |
| virtual void | Initialize () |
| bool | IsCPUBufferDirty () |
| bool | IsGPUBufferDirty () |
| void | SetBufferFlag (cl_mem_flags flags) |
| void | SetBufferSize (unsigned int num) |
| void | SetCPUBufferDirty () |
| void | SetCPUBufferLock (const bool v) |
| void | SetCPUBufferPointer (void *ptr) |
| void | SetCPUDirtyFlag (bool isDirty) |
| void | SetGPUBufferDirty () |
| void | SetGPUBufferLock (const bool v) |
| void | SetGPUDirtyFlag (bool isDirty) |
| bool | Update () |
| virtual void | UpdateCPUBuffer () |
| virtual void | UpdateGPUBuffer () |
Static Public Member Functions | |
| static Pointer | New () |
Protected Member Functions | |
| GPUDataManager () | |
| virtual void | PrintSelf (std::ostream &os, Indent indent) const |
| virtual | ~GPUDataManager () |
Protected Attributes | |
| unsigned int | m_BufferSize |
| OpenCLContext * | m_Context |
| void * | m_CPUBuffer |
| bool | m_CPUBufferLock |
| cl_mem | m_GPUBuffer |
| bool | m_GPUBufferLock |
| bool | m_IsCPUBufferDirty |
| bool | m_IsGPUBufferDirty |
| cl_mem_flags | m_MemFlags |
| SimpleFastMutexLock | m_Mutex |
Private Member Functions | |
| GPUDataManager (const Self &) | |
| void | operator= (const Self &) |
Friends | |
| class | OpenCLKernelManager |
| typedef SmartPointer< const Self > itk::GPUDataManager::ConstPointer |
Definition at line 76 of file itkGPUDataManager.h.
| typedef MutexLockHolder< SimpleFastMutexLock > itk::GPUDataManager::MutexHolderType |
Definition at line 82 of file itkGPUDataManager.h.
| typedef SmartPointer< Self > itk::GPUDataManager::Pointer |
Definition at line 75 of file itkGPUDataManager.h.
Definition at line 73 of file itkGPUDataManager.h.
| typedef Object itk::GPUDataManager::Superclass |
Definition at line 74 of file itkGPUDataManager.h.
|
protected |
|
protectedvirtual |
|
private |
| void itk::GPUDataManager::Allocate | ( | ) |
|
inline |
Definition at line 89 of file itkGPUDataManager.h.
|
virtual |
Run-time type information (and related methods).
Reimplemented in itk::GPUImageDataManager< ImageType >, and itk::GPUImageDataManager< itk::GPUImage >.
|
virtual |
| void* itk::GPUDataManager::GetCPUBufferPointer | ( | ) |
Get GPU buffer pointer
|
virtual |
| cl_mem* itk::GPUDataManager::GetGPUBufferPointer | ( | ) |
Get GPU buffer pointer
|
virtual |
Method for grafting the content of one GPUDataManager into another one
|
virtual |
Initialize GPUDataManager
|
inline |
Definition at line 111 of file itkGPUDataManager.h.
|
inline |
Definition at line 117 of file itkGPUDataManager.h.
|
static |
Method for creation through the object factory.
|
private |
|
protectedvirtual |
| void itk::GPUDataManager::SetBufferFlag | ( | cl_mem_flags | flags | ) |
| void itk::GPUDataManager::SetBufferSize | ( | unsigned int | num | ) |
total buffer size in bytes
| void itk::GPUDataManager::SetCPUBufferDirty | ( | ) |
Make GPU up-to-date and mark CPU as dirty. Call this function when you want to modify CPU data
|
inline |
Make CPU buffer locked to avoid extra update from ITK pipeline.
Definition at line 147 of file itkGPUDataManager.h.
| void itk::GPUDataManager::SetCPUBufferPointer | ( | void * | ptr | ) |
| void itk::GPUDataManager::SetCPUDirtyFlag | ( | bool | isDirty | ) |
| void itk::GPUDataManager::SetGPUBufferDirty | ( | ) |
Make CPU up-to-date and mark GPU as dirty. Call this function when you want to modify GPU data
|
inline |
Make GPU buffer locked to avoid extra update from ITK pipeline.
Definition at line 151 of file itkGPUDataManager.h.
| void itk::GPUDataManager::SetGPUDirtyFlag | ( | bool | isDirty | ) |
| bool itk::GPUDataManager::Update | ( | ) |
Synchronize CPU and GPU buffers (using dirty flags)
|
virtual |
actual GPU->CPU memory copy takes place here
Reimplemented in itk::GPUImageDataManager< ImageType >, and itk::GPUImageDataManager< itk::GPUImage >.
|
virtual |
actual CPU->GPU memory copy takes place here
Reimplemented in itk::GPUImageDataManager< ImageType >, and itk::GPUImageDataManager< itk::GPUImage >.
|
friend |
allow GPUKernelManager to access GPU buffer pointer
Definition at line 69 of file itkGPUDataManager.h.
|
protected |
Definition at line 162 of file itkGPUDataManager.h.
|
protected |
Definition at line 164 of file itkGPUDataManager.h.
|
protected |
Definition at line 171 of file itkGPUDataManager.h.
|
protected |
extra safety flags
Definition at line 178 of file itkGPUDataManager.h.
|
protected |
buffer pointers
Definition at line 170 of file itkGPUDataManager.h.
|
protected |
Definition at line 179 of file itkGPUDataManager.h.
|
protected |
Definition at line 175 of file itkGPUDataManager.h.
|
protected |
checks if buffer needs to be updated
Definition at line 174 of file itkGPUDataManager.h.
|
protected |
buffer type
Definition at line 167 of file itkGPUDataManager.h.
|
protected |
Mutex lock to prevent r/w hazard for multithreaded code
Definition at line 182 of file itkGPUDataManager.h.
Generated on OURCE_DATE_EPOCH for elastix by 1.8.13 |