Info objects#
Overview#
Info objects store key-value pairs of string type. The semantics of these key-value pairs is defined by the MPI standard and by the employed MPI implementation. See the MPI standard and the documentation of your MPI implementation for details. Info objects are used by some MPL to pass the key-value pairs to the underlying MPI implementation to improve performance or resource utilization.
Class documentation#
-
class info#
Stores key-value pairs to affect specific as well as implementation defined MPI functionalities.
Public Functions
-
info() = default#
Creates a new info object with no key-value pairs attached.
-
inline info(const info &other)#
Copy-constructs a new info object.
- Parameters:
other – the other info object to copy from
-
inline info(info &&other) noexcept#
Move-constructs a new info object.
- Parameters:
other – the other info object to move from
-
inline info &operator()(const info &other)#
Copies an info object.
- Parameters:
other – the other info object to copy from
-
inline info &operator()(info &&other) noexcept#
Moves an info object.
- Parameters:
other – the other info object to move from
-
inline ~info()#
Destructor.
-
inline void set(const std::string &key, const std::string &value)#
Stores a key-value pair.
- Parameters:
key – the key
value – the value
-
inline void remove(const std::string &key)#
Removes a key-value pair with the the given key.
- Parameters:
key – the key
-
inline std::optional<std::string> value(const std::string &key) const#
Retrieves the value for a given key.
- Parameters:
key – the key
- Returns:
the value if the info object contains a key-value pair with the given key.
-
inline int size() const#
Gets the number of key-value pairs.
- Returns:
number of key-value pairs in the info object
Friends
- friend class impl::base_communicator
- friend class communicator
- friend class file
-
info() = default#
-
class infos : private std::vector<info>#
See also
class
communicator::spawn_multiple
Public Functions
-
inline explicit infos()#
Constructs an empty list of info objects.
-
inline infos(std::initializer_list<info> init)#
Constructs list of info objects from a braces expression of info objects.
- Parameters:
init – list of initial values
-
inline explicit infos()#