CIRCT 21.0.0git
Loading...
Searching...
No Matches
Public Member Functions | List of all members
esi::services::HostMem::HostMemRegion Struct Referenceabstract

RAII memory region for host memory. More...

#include <Services.h>

Inheritance diagram for esi::services::HostMem::HostMemRegion:
Inheritance graph
[legend]

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.
 

Detailed Description

RAII memory region for host memory.

Automatically frees the memory when deconstructed.

Definition at line 208 of file Services.h.

Constructor & Destructor Documentation

◆ ~HostMemRegion()

virtual esi::services::HostMem::HostMemRegion::~HostMemRegion ( )
virtualdefault

Member Function Documentation

◆ flush()

virtual void esi::services::HostMem::HostMemRegion::flush ( )
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 222 of file Services.h.

Referenced by hostmemTest().

◆ getDevicePtr()

virtual void * esi::services::HostMem::HostMemRegion::getDevicePtr ( ) const
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 214 of file Services.h.

References getPtr().

◆ getPtr()

virtual void * esi::services::HostMem::HostMemRegion::getPtr ( ) const
pure virtual

Get a pointer to the host memory.

Implemented in TraceHostMem::TraceHostMemRegion.

Referenced by getDevicePtr(), hostmemTest(), operator void *(), and PYBIND11_MODULE().

◆ getSize()

virtual std::size_t esi::services::HostMem::HostMemRegion::getSize ( ) const
pure virtual

Implemented in TraceHostMem::TraceHostMemRegion.

Referenced by PYBIND11_MODULE().

◆ operator void *()

esi::services::HostMem::HostMemRegion::operator void * ( ) const
inline

Definition at line 215 of file Services.h.

References getPtr().


The documentation for this struct was generated from the following file: