17typedef long int mem_id;
70 virtual size_t size()
const = 0;
112 virtual long int ref() = 0;
161 virtual void fill(
unsigned char c) = 0;
virtual void hostToDevice(size_t start, size_t top)=0
Copy the memory from host to device.
virtual bool allocate(size_t sz)=0
allocate on device a buffer of
virtual long int ref()=0
Return the actual reference counter.
virtual bool resize(size_t sz)=0
resize on device a buffer
virtual void fill(unsigned char c)=0
Fill the buffer with a particular byte.
virtual void * getDevicePointer()=0
Return the device pointer of the memory.
virtual void destroy()=0
Destroy the buffer on the device.
virtual bool isInitialized()=0
Return if the actual memory that is going to be allocated is already initialized.
virtual bool copy(const memory &m)=0
Copy the memory from one device to another device.
virtual bool flush()=0
Flush the memory into the device.
virtual void incRef()=0
Increment the internal reference counter.
virtual const void * getPointer() const =0
return a data pointer
virtual ~memory()
destructor
virtual void deviceToHost(size_t start, size_t stop)=0
Copy the memory from device to host.
virtual void hostToDevice()=0
Copy the memory from host to device.
virtual void decRef()=0
Decrement the internal reference counter.
virtual void * getPointer()=0
return a data pointer
virtual void deviceToHost()=0
Copy the memory from device to host.
virtual size_t size() const =0
get the size of the buffer