lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
Loading...
Searching...
No Matches
Pds::Fabrics::MemoryRegion Class Reference

Owns a registered libfabric memory region (fid_mr) together with its start address and length. More...

#include <Endpoint.hh>

Public Member Functions

 MemoryRegion (struct fid_mr *mr, void *start, size_t len)
 Wrap an already registered fid_mr that covers len bytes from start; the destructor closes mr.
 
 ~MemoryRegion ()
 Close the fid_mr with fi_close() if it is non-null.
 
uint64_t rkey () const
 Return the remote key of the region, from fi_mr_key().
 
void * desc () const
 Return the local descriptor of the region, from fi_mr_desc().
 
void * start () const
 Return the start address given at construction.
 
size_t length () const
 Return the length given at construction.
 
struct fid_mr * fid () const
 Return the underlying fid_mr pointer.
 
bool contains (const void *start, size_t len) const
 Return true if the range [start, start + len) lies entirely inside this region.
 

Detailed Description

Owns a registered libfabric memory region (fid_mr) together with its start address and length.

Constructor & Destructor Documentation

◆ MemoryRegion()

Pds::Fabrics::MemoryRegion::MemoryRegion ( struct fid_mr *  mr,
void *  start,
size_t  len 
)

Wrap an already registered fid_mr that covers len bytes from start; the destructor closes mr.

◆ ~MemoryRegion()

Pds::Fabrics::MemoryRegion::~MemoryRegion ( )

Close the fid_mr with fi_close() if it is non-null.

Member Function Documentation

◆ contains()

bool Pds::Fabrics::MemoryRegion::contains ( const void *  start,
size_t  len 
) const

Return true if the range [start, start + len) lies entirely inside this region.

◆ desc()

void * Pds::Fabrics::MemoryRegion::desc ( ) const

Return the local descriptor of the region, from fi_mr_desc().

◆ fid()

struct fid_mr * Pds::Fabrics::MemoryRegion::fid ( ) const

Return the underlying fid_mr pointer.

◆ length()

size_t Pds::Fabrics::MemoryRegion::length ( ) const

Return the length given at construction.

◆ rkey()

uint64_t Pds::Fabrics::MemoryRegion::rkey ( ) const

Return the remote key of the region, from fi_mr_key().

◆ start()

void * Pds::Fabrics::MemoryRegion::start ( ) const

Return the start address given at construction.


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