This class is a container for the memory interface like HeapMemory CudaMemory. More...
This class is a container for the memory interface like HeapMemory CudaMemory.
It store the object used to allocate memory and a representation of this memory as an array of objects T
It is mainly used by memory_conf to create the correct memory layout
Definition at line 31 of file memory_c.hpp.
#include <memory_c.hpp>
Public Types | |
| typedef memory_c< T > | type |
| define T | |
| typedef T & | reference |
| define a reference to T | |
| typedef T | vtype |
| define T | |
Public Member Functions | |
| void | setMemory (memory &mem) |
| This function set the object that allocate memory. More... | |
| memory & | getMemory () |
| This function get the object that allocate memory. More... | |
| const memory & | getMemory () const |
| This function get the object that allocate memory. More... | |
| bool | allocate (const size_t sz, bool skip_initialization=false) |
| This function allocate memory. More... | |
| void | move_copy (memory_c &mem_c) |
| It absorb the allocated object from another memory_c. More... | |
| memory_c () | |
| constructor | |
| ~memory_c () | |
| destructor | |
| void | swap (memory_c &mem_obj) |
| swap the memory More... | |
Data Fields | |
| D * | mem |
| object that allocate memory like HeapMemory or CudaMemory | |
| memory_array< T > * | mem_r |
| object that represent the memory as an array of objects T | |
|
inline |
This function allocate memory.
We create a chunk of memory
we create the representation for this buffer
Definition at line 94 of file memory_c.hpp.
This function get the object that allocate memory.
Definition at line 75 of file memory_c.hpp.
|
inline |
This function get the object that allocate memory.
Definition at line 86 of file memory_c.hpp.
|
inline |
It absorb the allocated object from another memory_c.
| mem_c | Memory object |
Definition at line 112 of file memory_c.hpp.
This function set the object that allocate memory.
| mem | the memory object |
Definition at line 55 of file memory_c.hpp.