Classes | Public Types | Public Member Functions | Private Attributes

cmtk::DeviceArrayCUDA Class Reference
[cmtkGPU library]

Resource managing class for raw memory allocated on a GPU device through CUDA. More...

#include <cmtkDeviceArrayCUDA.h>

Inheritance diagram for cmtk::DeviceArrayCUDA:
Inheritance graph
[legend]
Collaboration diagram for cmtk::DeviceArrayCUDA:
Collaboration graph
[legend]

List of all members.

Classes

class  bad_alloc
 Exception for failed allocation. More...

Public Types

typedef DeviceArrayCUDA Self
 This class.
typedef SmartConstPointer< SelfSmartConstPtr
 Smart pointer-to-const.
typedef SmartPointer< SelfSmartPtr
 Smart pointer.
typedef struct cudaArray * DeviceArrayPointer
 Device array pointer.

Public Member Functions

 DeviceArrayCUDA (const FixedVector< 3, int > &dims3)
 Constructor: allocate array through CUDA.
virtual ~DeviceArrayCUDA ()
 Destructor: free array through CUDA.
void CopyToDevice (const float *data)
 Copy host linear memory to device.
void CopyOnDeviceToArray (const float *data)
 Copy from linear device memory to device array.
void CopyOnDeviceToLinear (float *data)
 Copy from device array to linear device memory.
DeviceArrayPointer GetArrayOnDevice ()
 Get device array pointer.

Private Attributes

FixedVector< 3, int > m_Dims
 Array dimensions.
DeviceArrayPointer m_DeviceArrayPtr
 Opaque pointer to array on device.

Detailed Description

Resource managing class for raw memory allocated on a GPU device through CUDA.

Make sure this is never copied.

Definition at line 51 of file cmtkDeviceArrayCUDA.h.


Member Typedef Documentation

This class.

Definition at line 57 of file cmtkDeviceArrayCUDA.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines