Interface for standardising the API of Memory devices: XRTMemory.
More...
#include <memory.hpp>
|
virtual | ~IMemory ()=default |
| ~IMemory destructor method Destroy the IMemory object.
|
|
virtual Status | Sync (const SyncType type)=0 |
| Sync method Synchronizes the memory in terms of transactions. More...
|
|
virtual Status | Sync (std::shared_ptr< IExecutionGraph > graph, const SyncType type) |
| Sync method (Asynchronous) This function executes asynchronously through an execution graph. Please, see IMemory::Sync for more information. More...
|
|
virtual size_t | Size ()=0 |
| Size method Gives the value for the memory size in bytes. More...
|
|
template<typename T > |
std::shared_ptr< T > | HostAddress () |
| HostAddress method Getter for the address of the host. More...
|
|
template<typename T > |
std::shared_ptr< T > | DeviceAddress () |
| DeviceAddress method Getter for the address of the device. More...
|
|
|
static std::shared_ptr< IMemory > | Create (IMemory::Type impl, const std::size_t size, uint8_t *hostptr, uint8_t *devptr, void *moverptr) |
| Create method Factory method to create specific subclasses of IMemory. More...
|
|
|
virtual std::shared_ptr< uint8_t > | GetHostAddress ()=0 |
| GetHostAddress method Get the Address that belongs to the host. [Reference] shared memory pointer with reference counting. More...
|
|
virtual std::shared_ptr< uint8_t > | GetDeviceAddress ()=0 |
| GetDeviceAddress method Get the Address that belongs to the device. [Reference] shared memory pointer with reference counting. More...
|
|
Interface for standardising the API of Memory devices: XRTMemory.
◆ Type
Type Type of runtime supported by the IMemory.
Enumerator |
---|
None | No runtime
|
XRT | Xilinx runtime
|
◆ Create()
std::shared_ptr< IMemory > cynq::IMemory::Create |
( |
IMemory::Type |
impl, |
|
|
const std::size_t |
size, |
|
|
uint8_t * |
hostptr, |
|
|
uint8_t * |
devptr, |
|
|
void * |
moverptr |
|
) |
| |
|
static |
Create method Factory method to create specific subclasses of IMemory.
- Parameters
-
impl | Used for establishin if the object is dependent on a runtime, use None if this is not the case. |
size | Size in bytes of the memory, this defines the length of the address space of the transaction being mapped. |
hostptr | Pointer of the address that belongs to the host, used for memory mapping from the host to the device. |
devptr | Pointer of the address that belongs to the device, used for mapping memory to the device. |
moverptr | Pointer to platform specific properties |
- Returns
- std::shared_ptr<IMemory> This is a shared_ptr with reference counting, the type will depend on the value of impl, the options are the following: following: XRT -> XRTMemory None -> nullptr
◆ DeviceAddress()
template<typename T >
std::shared_ptr<T> cynq::IMemory::DeviceAddress |
( |
| ) |
|
|
inline |
DeviceAddress method Getter for the address of the device.
- Template Parameters
-
T | A type which is used for type casting within this method. |
- Returns
- std::shared_ptr<T>
◆ GetDeviceAddress()
virtual std::shared_ptr<uint8_t> cynq::IMemory::GetDeviceAddress |
( |
| ) |
|
|
protectedpure virtual |
GetDeviceAddress method Get the Address that belongs to the device. [Reference] shared memory pointer with reference counting.
- Returns
- std::shared_ptr<uint8_t>
Implemented in cynq::XRTMemory.
◆ GetHostAddress()
virtual std::shared_ptr<uint8_t> cynq::IMemory::GetHostAddress |
( |
| ) |
|
|
protectedpure virtual |
GetHostAddress method Get the Address that belongs to the host. [Reference] shared memory pointer with reference counting.
- Returns
- std::shared_ptr<uint8_t>
Implemented in cynq::XRTMemory.
◆ HostAddress()
template<typename T >
std::shared_ptr<T> cynq::IMemory::HostAddress |
( |
| ) |
|
|
inline |
HostAddress method Getter for the address of the host.
- Template Parameters
-
T | A type which is used for type casting within this method. |
- Returns
- std::shared_ptr<T>
◆ Size()
virtual size_t cynq::IMemory::Size |
( |
| ) |
|
|
pure virtual |
Size method Gives the value for the memory size in bytes.
- Returns
- size_t
Implemented in cynq::XRTMemory.
◆ Sync() [1/2]
virtual Status cynq::IMemory::Sync |
( |
const SyncType |
type | ) |
|
|
pure virtual |
Sync method Synchronizes the memory in terms of transactions.
- Parameters
-
type | The orientation of the Synchronizaton this can be host to host to device (HostToDevice) or device to host (DeviceToHost). |
- Returns
- Status
Implemented in cynq::XRTMemory.
◆ Sync() [2/2]
Sync method (Asynchronous) This function executes asynchronously through an execution graph. Please, see IMemory::Sync for more information.
- Parameters
-
graph | The execution graph to work on |
type | The orientation of the Synchronizaton this can be host to host to device (HostToDevice) or device to host (DeviceToHost). |
- Returns
- Status
The documentation for this class was generated from the following files:
- /mnt/usbkey/lleon/cynq/include/cynq/memory.hpp
- /mnt/usbkey/lleon/cynq/src/cynq/memory.cpp