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

Growable array of struct fi_rma_iov entries that describe remote buffers for vectored RMA calls. More...

#include <Endpoint.hh>

Public Member Functions

 RemoteIOVec (size_t count=1)
 Construct an empty vector (count() is 0) with capacity for count entries.
 
 RemoteIOVec (RemoteAddress *remote_addrs, size_t count)
 Construct from an array of count RemoteAddress objects; if remote_addrs is NULL, count() is still count but the entries are not filled.
 
 RemoteIOVec (const std::vector< RemoteAddress * > &remote_addrs)
 Construct from a vector of RemoteAddress pointers.
 
 ~RemoteIOVec ()
 Free the fi_rma_iov array.
 
size_t count () const
 Return the number of entries in use.
 
const struct fi_rma_iov * iovecs () const
 Return the fi_rma_iov array.
 
bool add_iovec (RemoteAddress *remote_addr, size_t count=1)
 Append count entries from the RemoteAddress array remote_addr.
 
bool add_iovec (std::vector< RemoteAddress * > &remote_addr)
 Append one entry per RemoteAddress in the vector; always returns true.
 
bool add_iovec (unsigned index, uint64_t rkey, uint64_t addr, size_t extent)
 Append one entry built from rkey, addr and extent; always returns true.
 
bool set_iovec (unsigned index, RemoteAddress *remote_addr)
 Overwrite entry index from remote_addr; returns false if index is not less than count() or remote_addr is NULL.
 
bool set_iovec (unsigned index, uint64_t rkey, uint64_t addr, size_t extent)
 Overwrite entry index with rkey, addr and extent; returns false if index is not less than count().
 

Detailed Description

Growable array of struct fi_rma_iov entries that describe remote buffers for vectored RMA calls.

Constructor & Destructor Documentation

◆ RemoteIOVec() [1/3]

Pds::Fabrics::RemoteIOVec::RemoteIOVec ( size_t  count = 1)

Construct an empty vector (count() is 0) with capacity for count entries.

◆ RemoteIOVec() [2/3]

Pds::Fabrics::RemoteIOVec::RemoteIOVec ( RemoteAddress *  remote_addrs,
size_t  count 
)

Construct from an array of count RemoteAddress objects; if remote_addrs is NULL, count() is still count but the entries are not filled.

◆ RemoteIOVec() [3/3]

Pds::Fabrics::RemoteIOVec::RemoteIOVec ( const std::vector< RemoteAddress * > &  remote_addrs)

Construct from a vector of RemoteAddress pointers.

◆ ~RemoteIOVec()

Pds::Fabrics::RemoteIOVec::~RemoteIOVec ( )

Free the fi_rma_iov array.

Member Function Documentation

◆ add_iovec() [1/3]

bool Pds::Fabrics::RemoteIOVec::add_iovec ( RemoteAddress *  remote_addr,
size_t  count = 1 
)

Append count entries from the RemoteAddress array remote_addr.

Returns false if remote_addr is NULL (the capacity may still have grown), otherwise true.

◆ add_iovec() [2/3]

bool Pds::Fabrics::RemoteIOVec::add_iovec ( std::vector< RemoteAddress * > &  remote_addr)

Append one entry per RemoteAddress in the vector; always returns true.

◆ add_iovec() [3/3]

bool Pds::Fabrics::RemoteIOVec::add_iovec ( unsigned  index,
uint64_t  rkey,
uint64_t  addr,
size_t  extent 
)

Append one entry built from rkey, addr and extent; always returns true.

The index argument is not used.

◆ count()

size_t Pds::Fabrics::RemoteIOVec::count ( ) const

Return the number of entries in use.

◆ iovecs()

const struct fi_rma_iov * Pds::Fabrics::RemoteIOVec::iovecs ( ) const

Return the fi_rma_iov array.

◆ set_iovec() [1/2]

bool Pds::Fabrics::RemoteIOVec::set_iovec ( unsigned  index,
RemoteAddress *  remote_addr 
)

Overwrite entry index from remote_addr; returns false if index is not less than count() or remote_addr is NULL.

◆ set_iovec() [2/2]

bool Pds::Fabrics::RemoteIOVec::set_iovec ( unsigned  index,
uint64_t  rkey,
uint64_t  addr,
size_t  extent 
)

Overwrite entry index with rkey, addr and extent; returns false if index is not less than count().


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