OpenFPM_pdata  1.1.0
Project that contain the implementation of distributed structures
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Friends Pages
memory Class Referenceabstract

Detailed Description

Definition at line 22 of file memory.hpp.

+ Inheritance diagram for memory:

Public Member Functions

virtual bool flush ()=0
 Flush the memory into the device. More...
 
virtual bool allocate (size_t sz)=0
 allocate on device a buffer of More...
 
virtual bool resize (size_t sz)=0
 resize on device a buffer More...
 
virtual void destroy ()=0
 Destroy the buffer on the device. More...
 
virtual bool copy (const memory &m)=0
 Copy the memory from one device to another device. More...
 
virtual size_t size () const =0
 get the size of the buffer More...
 
virtual void * getPointer ()=0
 return a data pointer More...
 
virtual const void * getPointer () const =0
 return a data pointer More...
 
virtual ~memory ()
 destructor More...
 
virtual void incRef ()=0
 Increment the internal reference counter. More...
 
virtual void decRef ()=0
 Decrement the internal reference counter. More...
 
virtual long int ref ()=0
 Return the actual reference counter. More...
 
virtual bool isInitialized ()=0
 Return if the actual memory that is going to be allocated is already initialized. More...
 
virtual void * getDevicePointer ()=0
 Return the device pointer of the memory. More...
 
virtual void deviceToHost ()=0
 Copy the memory from device to host. More...
 

Constructor & Destructor Documentation

virtual memory::~memory ( )
inlinevirtual

destructor

destructor

Definition at line 93 of file memory.hpp.

Member Function Documentation

virtual bool memory::allocate ( size_t  sz)
pure virtual

allocate on device a buffer of

Allocate on the device a buffer of memory

Parameters
szthe size of the buffer

Implemented in BHeapMemory, ExtPreAlloc< Mem >, HeapMemory, and PtrMemory.

virtual bool memory::copy ( const memory m)
pure virtual

Copy the memory from one device to another device.

Parameters
mfrom where to copy

Implemented in ExtPreAlloc< Mem >, HeapMemory, and PtrMemory.

virtual void memory::decRef ( )
pure virtual

Decrement the internal reference counter.

Implemented in HeapMemory, PtrMemory, and ExtPreAlloc< Mem >.

virtual void memory::destroy ( )
pure virtual

Destroy the buffer on the device.

destroy the buffer on the device

Implemented in ExtPreAlloc< Mem >, BHeapMemory, HeapMemory, and PtrMemory.

virtual void memory::deviceToHost ( )
pure virtual

Copy the memory from device to host.

Implemented in ExtPreAlloc< Mem >, HeapMemory, and PtrMemory.

virtual bool memory::flush ( )
pure virtual

Flush the memory into the device.

Implemented in ExtPreAlloc< Mem >, HeapMemory, and PtrMemory.

virtual void* memory::getDevicePointer ( )
pure virtual

Return the device pointer of the memory.

Returns
the device pointer

Implemented in ExtPreAlloc< Mem >, HeapMemory, and PtrMemory.

virtual void* memory::getPointer ( )
pure virtual

return a data pointer

return readable pointer with the data stored

Implemented in ExtPreAlloc< Mem >, HeapMemory, and PtrMemory.

virtual const void* memory::getPointer ( ) const
pure virtual

return a data pointer

return readable pointer with the data stored

Implemented in ExtPreAlloc< Mem >, HeapMemory, and PtrMemory.

virtual void memory::incRef ( )
pure virtual

Increment the internal reference counter.

Implemented in HeapMemory, PtrMemory, and ExtPreAlloc< Mem >.

virtual bool memory::isInitialized ( )
pure virtual

Return if the actual memory that is going to be allocated is already initialized.

Returns
true if already initialized

Implemented in ExtPreAlloc< Mem >, HeapMemory, and PtrMemory.

virtual long int memory::ref ( )
pure virtual

Return the actual reference counter.

Returns
the reference counter

Implemented in HeapMemory, PtrMemory, and ExtPreAlloc< Mem >.

virtual bool memory::resize ( size_t  sz)
pure virtual

resize on device a buffer

On the device resize

Parameters
szthe size the resized buffer

Implemented in ExtPreAlloc< Mem >, BHeapMemory, HeapMemory, and PtrMemory.

virtual size_t memory::size ( ) const
pure virtual

get the size of the buffer

Implemented in ExtPreAlloc< Mem >, BHeapMemory, HeapMemory, and PtrMemory.


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