11 #include "PtrMemory.hpp"
19 #include "Memleak_check.hpp"
33 std::cerr <<
"Error: " << __FILE__ <<
" " << __LINE__ <<
" allocation failed";
73 std::cerr <<
"Error " << __LINE__ <<
" " << __FILE__ <<
": source buffer is too big to copy";
141 std::cerr <<
"Error: " << __FILE__ <<
" " << __LINE__ <<
" allocation failed";
virtual void * getDevicePointer()
get a readable pointer with the data
virtual size_t size() const =0
get the size of the buffer
virtual bool resize(size_t sz)
resize the memory allocated
bool copyDeviceToDevice(const PtrMemory &m)
copy from same Heap to Heap
bool copyFromPointer(const void *ptr, size_t sz)
copy from Pointer to Heap
virtual void destroy()
destroy memory
virtual size_t size() const
the the size of the allocated memory
virtual void * getPointer()
get a readable pointer with the data
virtual bool allocate(size_t sz)
allocate memory
virtual void * getPointer()=0
return a data pointer
size_t spm
Size of the pointed memory.
virtual bool copy(const memory &m)
copy memory
This class give memory from a preallocated memory, memory destruction is not performed.