Class AddressVectorManager
Defined in File AddressVectorManager.hpp
Class Documentation
-
class AddressVectorManager
High-level manager for libfabric address vectors (AV)
The AddressVectorManager class provides a convenient, RAII-based interface for managing libfabric address vectors. It encapsulates the creation, destruction, and manipulation of address vectors, providing safe methods for adding and removing network addresses.
The address vector is used by libfabric to map network addresses to internal fabric addresses that can be used efficiently in data transfer operations.
Public Functions
-
explicit AddressVectorManager(fid_domain *domain, NetworkMode mode)
Constructs an AddressVectorManager with the given domain.
Creates a new libfabric address vector associated with the provided domain. The address vector is configured for optimal performance and compatibility.
- Parameters:
domain – Valid libfabric domain pointer - must not be null
mode – Network mode to use for the address vector
- Throws:
LibfabricAvError – if AV creation fails
-
~AddressVectorManager() = default
Destructor.
Automatically cleans up the address vector and releases all resources. The libfabric AV is closed automatically via RAII.
-
AddressVectorManager(const AddressVectorManager&) = delete
-
AddressVectorManager &operator=(const AddressVectorManager&) = delete
-
AddressVectorManager(AddressVectorManager&&) = default
-
AddressVectorManager &operator=(AddressVectorManager&&) = default
-
fi_addr_t add_address(const EndPointAddress &address)
Add a network address to the address vector.
Inserts the given endpoint address into the address vector, making it available for subsequent communication operations. The address is converted to the appropriate libfabric format and stored efficiently.
- Parameters:
address – The endpoint address to add (IP address and port)
- Throws:
LibfabricAvError – if address insertion fails
- Returns:
The fabric address (fi_addr_t) corresponding to the added endpoint
-
void remove_address(const EndPointAddress &address)
Remove a network address from the address vector.
- Parameters:
address – The endpoint address to remove
- Throws:
LibfabricAvError – if removal fails
-
inline const fid_av *get_av() const
Get the underlying libfabric address vector.
Provides access to the raw libfabric AV for advanced operations. Use with caution as direct manipulation bypasses the safety guarantees of this wrapper class.
- Returns:
Pointer to the libfabric address vector
-
inline fid_av *get_av()
-
explicit AddressVectorManager(fid_domain *domain, NetworkMode mode)