21.08
|
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 |
Default constructor.
[in] | size | Region size |
Definition at line 40 of file IMemoryRegion.h.
References IMemoryRegion::buffer(), IMemoryRegion::extract_subregion(), offset(), IMemoryRegion::size(), and IMemoryRegion::~IMemoryRegion().
|
virtualdefault |
Virtual Destructor.
Referenced by IMemoryRegion::IMemoryRegion().
|
pure virtual |
Returns the pointer to the allocated data.
Implemented in MemoryRegion, and ICLMemoryRegion.
Referenced by TensorAllocator::data(), IMemoryRegion::IMemoryRegion(), CLTensorAllocator::map(), TensorAllocator::set_associated_memory_group(), CLTensorAllocator::set_global_allocator(), and CLTensorAllocator::unmap().
|
pure virtual |
Returns the pointer to the allocated data.
Implemented in MemoryRegion, and ICLMemoryRegion.
|
pure virtual |
Extract a sub-region from the memory.
[in] | offset | Offset to the region |
[in] | size | Size of the region |
Implemented in MemoryRegion, and ICLMemoryRegion.
Referenced by IMemoryRegion::IMemoryRegion().
|
inline |
Sets size of region.
[in] | size | Size to set |
Definition at line 83 of file IMemoryRegion.h.
References IMemoryRegion::size().
|
inline |
Memory region size accessor.
Definition at line 73 of file IMemoryRegion.h.
Referenced by MemoryRegion::extract_subregion(), IMemoryRegion::IMemoryRegion(), IMemoryRegion::set_size(), and CLBufferMemoryRegion::unmap().