Cudapp::Memory Class Reference

#include <CudappMemory.h>

Inheritance diagram for Cudapp::Memory:
Cudapp::MemoryBase Cudapp::DeviceMemory Cudapp::LocalMemory Cudapp::HostMemory

List of all members.

Public Member Functions

template<typename T >
T * Allocate (size_t count)
virtual void * AllocateBytes (size_t byte_count)=0
virtual bool CopyFrom (const void *src, size_t byte_count, size_t offset=0, MemoryLocation src_loc=MemoryOnHost)=0
virtual bool CopyTo (MemoryBase *dst) const
virtual bool CopyTo (void *dst, size_t byte_count, size_t offset=0, MemoryLocation dst_loc=MemoryOnHost) const =0
const void * GetMemPointer () const
void * GetMemPointer ()
template<typename T >
const T * GetMemPointerAs () const
template<typename T >
T * GetMemPointerAs ()
virtual Memoryoperator= (const Memory &)
virtual void PrintSelf (std::ostream &os) const
virtual ~Memory ()

Protected Member Functions

virtual bool CopyFromInternal (const Memory *src)
 Not Implemented (do this in the subclasses).
 Memory (const Memory &)
 Memory ()

Protected Attributes

void * MemPointer

Constructor & Destructor Documentation

Cudapp::Memory::~Memory (  )  [virtual]
Cudapp::Memory::Memory (  )  [protected]
Cudapp::Memory::Memory ( const Memory  )  [protected]

Member Function Documentation

template<typename T >
T* Cudapp::Memory::Allocate ( size_t  count  )  [inline]
virtual void* Cudapp::Memory::AllocateBytes ( size_t  byte_count  )  [pure virtual]
virtual bool Cudapp::Memory::CopyFrom ( const void *  src,
size_t  byte_count,
size_t  offset = 0,
MemoryLocation  src_loc = MemoryOnHost 
) [pure virtual]

Implements Cudapp::MemoryBase.

Implemented in Cudapp::DeviceMemory, and Cudapp::LocalMemory.

Referenced by CopyFromInternal().

bool Cudapp::Memory::CopyFromInternal ( const Memory src  )  [protected, virtual]
virtual bool Cudapp::Memory::CopyTo ( MemoryBase dst  )  const [inline, virtual]
virtual bool Cudapp::Memory::CopyTo ( void *  dst,
size_t  byte_count,
size_t  offset = 0,
MemoryLocation  dst_loc = MemoryOnHost 
) const [pure virtual]
const void* Cudapp::Memory::GetMemPointer (  )  const [inline]
void* Cudapp::Memory::GetMemPointer (  )  [inline]
template<typename T >
const T* Cudapp::Memory::GetMemPointerAs (  )  const [inline]
template<typename T >
T* Cudapp::Memory::GetMemPointerAs (  )  [inline]
Memory & Cudapp::Memory::operator= ( const Memory other  )  [virtual]

Reimplemented from Cudapp::MemoryBase.

Reimplemented in Cudapp::HostMemory, and Cudapp::LocalMemory.

References CopyTo().

void Cudapp::Memory::PrintSelf ( std::ostream &  os  )  const [virtual]

Reimplemented from Cudapp::MemoryBase.

Reimplemented in Cudapp::DeviceMemory, Cudapp::HostMemory, and Cudapp::LocalMemory.

References GetMemPointer().


Member Data Documentation

void* Cudapp::Memory::MemPointer [protected]

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

Generated on 6 Apr 2011 for Slicer3 by  doxygen 1.6.1