GPUOcelot
Public Member Functions | Protected Attributes

executive::Device::MemoryAllocation Class Reference

An interface to a memory allocation. More...

#include <Device.h>

Inheritance diagram for executive::Device::MemoryAllocation:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 MemoryAllocation (bool global=false, bool host=false)
 Generic constructor.
virtual ~MemoryAllocation ()
 Virtual desructor.
virtual bool host () const
 Is this a mapped host pointer?
virtual bool global () const
 Is this a mapping for a global variable?
virtual unsigned int flags () const =0
 Get the flags if this is a host pointer.
virtual void * mappedPointer () const =0
 Get a host pointer if for a host allocation.
virtual void * pointer () const =0
 Get a device pointer to the base.
virtual size_t size () const =0
 The size of the allocation.
virtual void copy (size_t offset, const void *host, size_t size)=0
 Copy from an external host pointer.
virtual void copy (void *host, size_t offset, size_t size) const =0
 Copy to an external host pointer.
virtual void memset (size_t offset, int value, size_t size)=0
 Memset the allocation.
virtual void copy (MemoryAllocation *allocation, size_t toOffset, size_t fromOffset, size_t size) const =0
 Copy to another allocation.

Protected Attributes

bool _global
 Is this memory allocation a global variable?
bool _host
 Is this memory allocation a host allocation?

Detailed Description

An interface to a memory allocation.


Constructor & Destructor Documentation

executive::Device::MemoryAllocation::MemoryAllocation ( bool  global = false,
bool  host = false 
)

Generic constructor.

executive::Device::MemoryAllocation::~MemoryAllocation ( ) [virtual]

Member Function Documentation

virtual void executive::Device::MemoryAllocation::copy ( size_t  offset,
const void *  host,
size_t  size 
) [pure virtual]
virtual void executive::Device::MemoryAllocation::copy ( void *  host,
size_t  offset,
size_t  size 
) const [pure virtual]
virtual void executive::Device::MemoryAllocation::copy ( MemoryAllocation allocation,
size_t  toOffset,
size_t  fromOffset,
size_t  size 
) const [pure virtual]
virtual unsigned int executive::Device::MemoryAllocation::flags ( ) const [pure virtual]
bool executive::Device::MemoryAllocation::global ( ) const [virtual]

Is this a mapping for a global variable?

bool executive::Device::MemoryAllocation::host ( ) const [virtual]

Is this a mapped host pointer?

virtual void* executive::Device::MemoryAllocation::mappedPointer ( ) const [pure virtual]
virtual void executive::Device::MemoryAllocation::memset ( size_t  offset,
int  value,
size_t  size 
) [pure virtual]
virtual void* executive::Device::MemoryAllocation::pointer ( ) const [pure virtual]
virtual size_t executive::Device::MemoryAllocation::size ( ) const [pure virtual]

Member Data Documentation

Is this memory allocation a global variable?

Is this memory allocation a host allocation?


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