Definition at line 22 of file memory.hpp.
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... | |
virtual void | hostToDevice ()=0 |
Copy the memory from host to device. More... | |
virtual void | hostToDevice (size_t start, size_t top)=0 |
Copy the memory from host to device. More... | |
virtual void | deviceToHost (size_t start, size_t stop)=0 |
Copy the memory from device to host. More... | |
virtual void | fill (unsigned char c)=0 |
Fill the buffer with a particular byte. More... | |
|
inlinevirtual |
|
pure virtual |
allocate on device a buffer of
Allocate on the device a buffer of memory
sz | the size of the buffer |
Implemented in ExtPreAlloc< Mem >, ExtPreAlloc< HeapMemory >, ExtPreAlloc< CudaMemory >, CudaMemory, HeapMemory, and PtrMemory.
|
pure virtual |
Copy the memory from one device to another device.
m | from where to copy |
Implemented in ExtPreAlloc< Mem >, ExtPreAlloc< HeapMemory >, ExtPreAlloc< CudaMemory >, CudaMemory, HeapMemory, and PtrMemory.
|
pure virtual |
Decrement the internal reference counter.
Implemented in CudaMemory, HeapMemory, PtrMemory, ExtPreAlloc< Mem >, ExtPreAlloc< HeapMemory >, and ExtPreAlloc< CudaMemory >.
|
pure virtual |
Destroy the buffer on the device.
destroy the buffer on the device
Implemented in ExtPreAlloc< Mem >, ExtPreAlloc< HeapMemory >, ExtPreAlloc< CudaMemory >, CudaMemory, HeapMemory, and PtrMemory.
|
pure virtual |
Copy the memory from device to host.
Implemented in ExtPreAlloc< Mem >, ExtPreAlloc< HeapMemory >, ExtPreAlloc< CudaMemory >, CudaMemory, HeapMemory, and PtrMemory.
|
pure virtual |
Copy the memory from device to host.
start | from start |
stop | to stop |
Implemented in ExtPreAlloc< Mem >, ExtPreAlloc< HeapMemory >, ExtPreAlloc< CudaMemory >, CudaMemory, HeapMemory, and PtrMemory.
|
pure virtual |
Fill the buffer with a particular byte.
Implemented in CudaMemory, ExtPreAlloc< Mem >, ExtPreAlloc< HeapMemory >, ExtPreAlloc< CudaMemory >, PtrMemory, and HeapMemory.
|
pure virtual |
Flush the memory into the device.
Implemented in ExtPreAlloc< Mem >, ExtPreAlloc< HeapMemory >, ExtPreAlloc< CudaMemory >, CudaMemory, HeapMemory, and PtrMemory.
|
pure virtual |
Return the device pointer of the memory.
Implemented in ExtPreAlloc< Mem >, ExtPreAlloc< HeapMemory >, ExtPreAlloc< CudaMemory >, CudaMemory, HeapMemory, and PtrMemory.
|
pure virtual |
return a data pointer
return readable pointer with the data stored
Implemented in ExtPreAlloc< Mem >, ExtPreAlloc< HeapMemory >, ExtPreAlloc< CudaMemory >, CudaMemory, HeapMemory, and PtrMemory.
|
pure virtual |
return a data pointer
return readable pointer with the data stored
Implemented in ExtPreAlloc< Mem >, ExtPreAlloc< HeapMemory >, ExtPreAlloc< CudaMemory >, CudaMemory, HeapMemory, and PtrMemory.
|
pure virtual |
Copy the memory from host to device.
Implemented in ExtPreAlloc< Mem >, ExtPreAlloc< HeapMemory >, ExtPreAlloc< CudaMemory >, CudaMemory, HeapMemory, and PtrMemory.
|
pure virtual |
Copy the memory from host to device.
start | |
stop |
Implemented in ExtPreAlloc< Mem >, ExtPreAlloc< HeapMemory >, ExtPreAlloc< CudaMemory >, CudaMemory, HeapMemory, and PtrMemory.
|
pure virtual |
Increment the internal reference counter.
Implemented in CudaMemory, HeapMemory, PtrMemory, ExtPreAlloc< Mem >, ExtPreAlloc< HeapMemory >, and ExtPreAlloc< CudaMemory >.
|
pure virtual |
Return if the actual memory that is going to be allocated is already initialized.
Implemented in ExtPreAlloc< Mem >, ExtPreAlloc< HeapMemory >, ExtPreAlloc< CudaMemory >, CudaMemory, PtrMemory, and HeapMemory.
|
pure virtual |
Return the actual reference counter.
Implemented in CudaMemory, HeapMemory, PtrMemory, ExtPreAlloc< Mem >, ExtPreAlloc< HeapMemory >, and ExtPreAlloc< CudaMemory >.
|
pure virtual |
resize on device a buffer
On the device resize
sz | the size the resized buffer |
Implemented in ExtPreAlloc< Mem >, ExtPreAlloc< HeapMemory >, ExtPreAlloc< CudaMemory >, CudaMemory, HeapMemory, and PtrMemory.
|
pure virtual |
get the size of the buffer
Implemented in ExtPreAlloc< Mem >, ExtPreAlloc< HeapMemory >, ExtPreAlloc< CudaMemory >, CudaMemory, HeapMemory, and PtrMemory.