CIRCT 20.0.0git
Loading...
Searching...
No Matches
Classes | Public Member Functions | Private Attributes | List of all members
TraceHostMem Class Reference
Inheritance diagram for TraceHostMem:
Inheritance graph
[legend]
Collaboration diagram for TraceHostMem:
Collaboration graph
[legend]

Classes

struct  TraceHostMemRegion
 

Public Member Functions

 TraceHostMem (TraceAccelerator &conn)
 
virtual std::unique_ptr< HostMemRegionallocate (std::size_t size, HostMem::Options opts) const override
 Allocate a region of host memory in accelerator accessible address space.
 
virtual bool mapMemory (void *ptr, std::size_t size, HostMem::Options opts) const override
 Try to make a region of host memory accessible to the accelerator.
 
virtual void unmapMemory (void *ptr) const override
 Unmap memory which was previously mapped with 'mapMemory'.
 
- Public Member Functions inherited from esi::services::HostMem
virtual ~HostMem ()=default
 
virtual std::string getServiceSymbol () const override
 
virtual void start ()
 In cases where necessary, enable host memory services.
 
 Service (AcceleratorConnection &conn)
 
- Public Member Functions inherited from esi::services::Service
 Service (AcceleratorConnection &conn)
 
virtual ~Service ()=default
 
virtual ServicegetChildService (Service::Type service, AppIDPath id={}, std::string implName={}, ServiceImplDetails details={}, HWClientDetails clients={})
 Create a "child" service of this service.
 
virtual BundlePortgetPort (AppIDPath id, const BundleType *type) const
 Get specialized port for this service to attach to the given appid path.
 
AcceleratorConnectiongetConnection () const
 

Private Attributes

TraceAccelerator::Implimpl
 

Additional Inherited Members

- Public Types inherited from esi::services::Service
using Type = const std::type_info &
 
- Static Public Attributes inherited from esi::services::HostMem
static constexpr std::string_view StdName = "esi.service.std.hostmem"
 
- Protected Attributes inherited from esi::services::Service
AcceleratorConnectionconn
 

Detailed Description

Definition at line 281 of file Trace.cpp.

Constructor & Destructor Documentation

◆ TraceHostMem()

TraceHostMem::TraceHostMem ( TraceAccelerator conn)
inline

Definition at line 283 of file Trace.cpp.

Member Function Documentation

◆ allocate()

virtual std::unique_ptr< HostMemRegion > TraceHostMem::allocate ( std::size_t  size,
HostMem::Options  opts 
) const
inlineoverridevirtual

Allocate a region of host memory in accelerator accessible address space.

Implements esi::services::HostMem.

Definition at line 306 of file Trace.cpp.

References esi::services::HostMem::Options::useLargePages, and esi::services::HostMem::Options::writeable.

◆ mapMemory()

virtual bool TraceHostMem::mapMemory ( void *  ptr,
std::size_t  size,
HostMem::Options  opts 
) const
inlineoverridevirtual

Try to make a region of host memory accessible to the accelerator.

Returns 'false' on failure. It is optional for an accelerator backend to implement this, so client code needs to have a fallback for when this returns 'false'. On success, it is the client's responsibility to ensure that the memory eventually gets unmapped.

Reimplemented from esi::services::HostMem.

Definition at line 316 of file Trace.cpp.

References esi::services::HostMem::Options::useLargePages, and esi::services::HostMem::Options::writeable.

◆ unmapMemory()

virtual void TraceHostMem::unmapMemory ( void *  ptr) const
inlineoverridevirtual

Unmap memory which was previously mapped with 'mapMemory'.

Undefined behavior when called with a pointer which was not previously mapped.

Reimplemented from esi::services::HostMem.

Definition at line 326 of file Trace.cpp.

Member Data Documentation

◆ impl

TraceAccelerator::Impl& TraceHostMem::impl
private

Definition at line 332 of file Trace.cpp.


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