NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
Public Member Functions | Friends | List of all members
niftk::LightweightCUDAImage Class Reference

Public Member Functions

 LightweightCUDAImage ()
 
 ~LightweightCUDAImage ()
 
 LightweightCUDAImage (const LightweightCUDAImage &copyme)
 
LightweightCUDAImageoperator= (const LightweightCUDAImage &assignme)
 
unsigned int GetId () const
 
unsigned int GetWidth () const
 
unsigned int GetHeight () const
 
unsigned int GetBytePitch () const
 
cudaEvent_t GetReadyEvent () const
 

Friends

class CUDAManager
 

Detailed Description

Wraps a device memory pointer with a bit of meta data and reference count. Instances are created by CUDAManager.

Constructor & Destructor Documentation

niftk::LightweightCUDAImage::LightweightCUDAImage ( )

The default constructor creates an invalid object. Only CUDAManager can create a valid one.

niftk::LightweightCUDAImage::~LightweightCUDAImage ( )

Non-virtual destructor: do not derive from this class.

niftk::LightweightCUDAImage::LightweightCUDAImage ( const LightweightCUDAImage copyme)

Copy constructor to handle reference count correctly.

Member Function Documentation

unsigned int niftk::LightweightCUDAImage::GetBytePitch ( ) const
unsigned int niftk::LightweightCUDAImage::GetHeight ( ) const
unsigned int niftk::LightweightCUDAImage::GetId ( ) const

Returns the ID of this image. Note that zero is not a valid ID!

cudaEvent_t niftk::LightweightCUDAImage::GetReadyEvent ( ) const

Returns the CUDA event object that can be used to synchronise kernel calls with completion of previous steps. Use with cudaStreamWaitEvent().

unsigned int niftk::LightweightCUDAImage::GetWidth ( ) const
LightweightCUDAImage & niftk::LightweightCUDAImage::operator= ( const LightweightCUDAImage assignme)

Assignment operator to handle reference count correctly.

Friends And Related Function Documentation

friend class CUDAManager
friend

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