21.02
|
CPU implementation of memory object. More...
#include <Memory.h>
Public Member Functions | |
Memory () | |
Default Constructor. More... | |
Memory (const std::shared_ptr< IMemoryRegion > &memory) | |
Default Constructor. More... | |
Memory (IMemoryRegion *memory) | |
Default Constructor. More... | |
Memory (const Memory &)=default | |
Allow instances of this class to be copied. More... | |
Memory & | operator= (const Memory &)=default |
Allow instances of this class to be copy assigned. More... | |
Memory (Memory &&) noexcept=default | |
Allow instances of this class to be moved. More... | |
Memory & | operator= (Memory &&) noexcept=default |
Allow instances of this class to be move assigned. More... | |
IMemoryRegion * | region () final |
Region accessor. More... | |
IMemoryRegion * | region () const final |
Region accessor. More... | |
void | set_region (IMemoryRegion *region) final |
Sets a memory region. More... | |
void | set_owned_region (std::unique_ptr< IMemoryRegion > region) final |
Sets a memory region. More... | |
Public Member Functions inherited from IMemory | |
virtual | ~IMemory ()=default |
Virtual default destructor. More... | |
Memory | ( | ) |
Default Constructor.
Definition at line 30 of file Memory.cpp.
Memory | ( | const std::shared_ptr< IMemoryRegion > & | memory | ) |
Default Constructor.
[in] | memory | Memory to be imported |
Definition at line 35 of file Memory.cpp.
Memory | ( | IMemoryRegion * | memory | ) |
Default Constructor.
[in] | memory | Memory to be imported |
Definition at line 42 of file Memory.cpp.
|
finalvirtual |
Region accessor.
Implements IMemory.
Definition at line 48 of file Memory.cpp.
Referenced by TensorAllocator::data(), TensorAllocator::init(), TensorAllocator::set_associated_memory_group(), and Memory::set_region().
|
finalvirtual |
|
finalvirtual |
Sets a memory region.
region | Memory region |
Implements IMemory.
Definition at line 64 of file Memory.cpp.
Referenced by TensorAllocator::allocate(), and TensorAllocator::import_memory().
|
finalvirtual |
Sets a memory region.
region | Memory region |
Implements IMemory.
Definition at line 58 of file Memory.cpp.
References Memory::region().
Referenced by TensorAllocator::free().