|
CIRCT 23.0.0git
|
RAII memory region for host memory. More...
#include <Services.h>

Public Member Functions | |
| virtual | ~HostMemRegion ()=default |
| virtual void * | getPtr () const =0 |
| Get a pointer to the host memory. | |
| virtual void * | getDevicePtr () const |
| Sometimes the pointer the device sees is different from the pointer the host sees. | |
| operator void * () const | |
| virtual std::size_t | getSize () const =0 |
| virtual void | flush () |
| Flush the memory region to ensure that the device sees the latest contents. | |
RAII memory region for host memory.
Automatically frees the memory when deconstructed.
Definition at line 243 of file Services.h.
|
virtualdefault |
|
inlinevirtual |
Flush the memory region to ensure that the device sees the latest contents.
Because some platforms require it before DMA transactions, it is recommended to call this before any DMA on all platforms. On platforms which don't require it, it is a cheap no-op virtual method call.
Definition at line 257 of file Services.h.
Referenced by hostmemReadBandwidthTest(), hostmemReadTest(), hostmemWriteBandwidthTest(), and hostmemWriteTest().
|
inlinevirtual |
Sometimes the pointer the device sees is different from the pointer the host sees.
Call this functon to get the device pointer.
Definition at line 249 of file Services.h.
References getPtr().
Referenced by hostmemReadBandwidthTest(), hostmemReadTest(), hostmemWriteBandwidthTest(), and hostmemWriteTest().
|
pure virtual |
Get a pointer to the host memory.
Implemented in TraceHostMem::TraceHostMemRegion.
Referenced by getDevicePtr(), hostmemReadBandwidthTest(), hostmemReadTest(), hostmemWriteBandwidthTest(), hostmemWriteTest(), NB_MODULE(), and operator void *().
|
pure virtual |
Implemented in TraceHostMem::TraceHostMemRegion.
Referenced by hostmemReadBandwidthTest(), hostmemWriteBandwidthTest(), and NB_MODULE().
|
inline |
Definition at line 250 of file Services.h.
References getPtr().