Abstract interface for memory implementation used by Memory.
More...
#include <vart_memory_impl_base.hpp>
Abstract interface for memory implementation used by Memory.
- Note
- Applications should use vart::Memory rather than this type directly, unless extending or integrating a new backend.
◆ MemoryImplBase() [1/2]
| vart::MemoryImplBase::MemoryImplBase |
( |
| ) |
|
|
delete |
Default construction is disabled.
◆ MemoryImplBase() [2/2]
| vart::MemoryImplBase::MemoryImplBase |
( |
std::shared_ptr< Device > |
dev | ) |
|
|
inline |
MemoryImplBase() - Constructor that takes device instance as an input.
- Parameters
-
◆ ~MemoryImplBase()
| virtual vart::MemoryImplBase::~MemoryImplBase |
( |
| ) |
|
|
inlinevirtual |
Virtual destructor to ensure proper cleanup of derived implementations.
◆ export_buffer()
| virtual int vart::MemoryImplBase::export_buffer |
( |
| ) |
const |
|
pure virtual |
export_buffer() - Export the underlying buffer as a dma-buf file descriptor
- Returns
- File descriptor representing the exported buffer. Implementations may return -1 to indicate that exporting is not supported for this memory type.
◆ get_device_handle()
| virtual std::shared_ptr<Device> vart::MemoryImplBase::get_device_handle |
( |
| ) |
|
|
pure virtual |
◆ get_physical_addr()
| virtual uint64_t vart::MemoryImplBase::get_physical_addr |
( |
| ) |
|
|
pure virtual |
get_physical_addr() - Retrieves the physical address of the allocated memory if applicable.
- Returns
- Physical (device) address of the underlying buffer. Implementations may return 0 to indicate that a physical address is not available or applicable for this memory type.
◆ get_size()
| virtual size_t vart::MemoryImplBase::get_size |
( |
| ) |
|
|
pure virtual |
get_size() - Retrieves the size of the allocated memory
- Returns
- returns the memory size
◆ map()
| virtual const uint8_t* vart::MemoryImplBase::map |
( |
DataMapFlags |
map_flags | ) |
|
|
pure virtual |
map() - Maps allocated memory to user space
- Parameters
-
| [in] | map_flags | Flag used to indicate mode of memory mapping |
- Returns
- Virtual address of the mapped region. Implementations may return
nullptr to signal that no buffer is currently mapped or that the request was rejected without throwing.
◆ unmap()
| virtual void vart::MemoryImplBase::unmap |
( |
| ) |
|
|
pure virtual |
unmap() - Unmaps allocated memory from user space.
◆ device
| std::shared_ptr<Device> vart::MemoryImplBase::device |
|
protected |
Device handle for this implementation.
The documentation for this class was generated from the following file: