GPUOcelot
Public Member Functions

executive::NVIDIAGPUDevice::MemoryAllocation Class Reference

An interface to a memory allocation on the cuda driver. More...

#include <NVIDIAGPUDevice.h>

Inheritance diagram for executive::NVIDIAGPUDevice::MemoryAllocation:
Inheritance graph
[legend]
Collaboration diagram for executive::NVIDIAGPUDevice::MemoryAllocation:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 MemoryAllocation ()
 Generic Construct.
 MemoryAllocation (size_t size)
 Construct a device allocation.
 MemoryAllocation (size_t size, unsigned int flags)
 Construct a host allocation.
 MemoryAllocation (CUmodule module, const ir::Global &global)
 Construct a global allocation.
 MemoryAllocation (void *pointer, size_t size)
 Construct an external allocaton.
 MemoryAllocation (void *pointer, size_t size, unsigned int flags)
 Construct an external host allocaton.
 ~MemoryAllocation ()
 Desructor.
 MemoryAllocation (const MemoryAllocation &a)
 Copy constructor.
 MemoryAllocation (MemoryAllocation &&a)
 Move constructor.
MemoryAllocationoperator= (const MemoryAllocation &a)
 Assignment operator.
MemoryAllocationoperator= (MemoryAllocation &&a)
 Move operator.
unsigned int flags () const
 Get the flags if this is a host pointer.
void * mappedPointer () const
 Get a host pointer if for a host allocation.
void * pointer () const
 Get a device pointer to the base.
size_t size () const
 The size of the allocation.
void copy (size_t offset, const void *host, size_t size)
 Copy from an external host pointer.
void copy (void *host, size_t offset, size_t size) const
 Copy to an external host pointer.
void memset (size_t offset, int value, size_t size)
 Memset the allocation.
void copy (Device::MemoryAllocation *allocation, size_t toOffset, size_t fromOffset, size_t size) const
 Copy to another allocation.

Detailed Description

An interface to a memory allocation on the cuda driver.


Constructor & Destructor Documentation

executive::NVIDIAGPUDevice::MemoryAllocation::MemoryAllocation ( )

Generic Construct.

executive::NVIDIAGPUDevice::MemoryAllocation::MemoryAllocation ( size_t  size)

Construct a device allocation.

executive::NVIDIAGPUDevice::MemoryAllocation::MemoryAllocation ( size_t  size,
unsigned int  flags 
)

Construct a host allocation.

executive::NVIDIAGPUDevice::MemoryAllocation::MemoryAllocation ( CUmodule  module,
const ir::Global global 
)

Construct a global allocation.

executive::NVIDIAGPUDevice::MemoryAllocation::MemoryAllocation ( void *  pointer,
size_t  size 
)

Construct an external allocaton.

executive::NVIDIAGPUDevice::MemoryAllocation::MemoryAllocation ( void *  pointer,
size_t  size,
unsigned int  flags 
)

Construct an external host allocaton.

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

Desructor.

Reimplemented from executive::Device::MemoryAllocation.

executive::NVIDIAGPUDevice::MemoryAllocation::MemoryAllocation ( const MemoryAllocation a)

Copy constructor.

executive::NVIDIAGPUDevice::MemoryAllocation::MemoryAllocation ( MemoryAllocation &&  a)

Move constructor.


Member Function Documentation

void executive::NVIDIAGPUDevice::MemoryAllocation::copy ( size_t  offset,
const void *  host,
size_t  size 
) [virtual]

Copy from an external host pointer.

Implements executive::Device::MemoryAllocation.

void executive::NVIDIAGPUDevice::MemoryAllocation::copy ( void *  host,
size_t  offset,
size_t  size 
) const [virtual]

Copy to an external host pointer.

Implements executive::Device::MemoryAllocation.

void executive::NVIDIAGPUDevice::MemoryAllocation::copy ( Device::MemoryAllocation allocation,
size_t  toOffset,
size_t  fromOffset,
size_t  size 
) const [virtual]

Copy to another allocation.

Implements executive::Device::MemoryAllocation.

unsigned int executive::NVIDIAGPUDevice::MemoryAllocation::flags ( ) const [virtual]

Get the flags if this is a host pointer.

Implements executive::Device::MemoryAllocation.

void * executive::NVIDIAGPUDevice::MemoryAllocation::mappedPointer ( ) const [virtual]

Get a host pointer if for a host allocation.

Implements executive::Device::MemoryAllocation.

void executive::NVIDIAGPUDevice::MemoryAllocation::memset ( size_t  offset,
int  value,
size_t  size 
) [virtual]

Memset the allocation.

Implements executive::Device::MemoryAllocation.

NVIDIAGPUDevice::MemoryAllocation & executive::NVIDIAGPUDevice::MemoryAllocation::operator= ( const MemoryAllocation a)

Assignment operator.

NVIDIAGPUDevice::MemoryAllocation & executive::NVIDIAGPUDevice::MemoryAllocation::operator= ( MemoryAllocation &&  a)

Move operator.

void * executive::NVIDIAGPUDevice::MemoryAllocation::pointer ( ) const [virtual]

Get a device pointer to the base.

Implements executive::Device::MemoryAllocation.

size_t executive::NVIDIAGPUDevice::MemoryAllocation::size ( ) const [virtual]

The size of the allocation.

Implements executive::Device::MemoryAllocation.


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