23.11
|
Memory region interface. More...
#include <IMemoryRegion.h>
Public Member Functions | |
IMemoryRegion (size_t size) | |
Default constructor. More... | |
virtual | ~IMemoryRegion ()=default |
Virtual Destructor. More... | |
virtual std::unique_ptr< IMemoryRegion > | extract_subregion (size_t offset, size_t size)=0 |
Extract a sub-region from the memory. More... | |
virtual void * | buffer ()=0 |
Returns the pointer to the allocated data. More... | |
virtual const void * | buffer () const =0 |
Returns the pointer to the allocated data. More... | |
size_t | size () const |
Memory region size accessor. More... | |
void | set_size (size_t size) |
Sets size of region. More... | |
Memory region interface.
Definition at line 33 of file IMemoryRegion.h.
|
inlineexplicit |
|
virtualdefault |
Virtual Destructor.
|
pure virtual |
Returns the pointer to the allocated data.
Implemented in ICLMemoryRegion, and MemoryRegion.
|
pure virtual |
Returns the pointer to the allocated data.
Implemented in ICLMemoryRegion, and MemoryRegion.
Referenced by TensorAllocator::data(), CLTensorAllocator::map(), TensorAllocator::set_associated_memory_group(), and CLTensorAllocator::unmap().
|
pure virtual |
Extract a sub-region from the memory.
[in] | offset | Offset to the region |
[in] | size | Size of the region |
Implemented in ICLMemoryRegion, and MemoryRegion.
|
inline |
Sets size of region.
[in] | size | Size to set |
Definition at line 82 of file IMemoryRegion.h.
References IMemoryRegion::size().
|
inline |
Memory region size accessor.
Definition at line 72 of file IMemoryRegion.h.
Referenced by ICLMemoryRegion::extract_subregion(), MemoryRegion::extract_subregion(), MemoryRegion::MemoryRegion(), and IMemoryRegion::set_size().