See Public API for a list of names and headers that are part of the public HPX API.

namespace hpx
namespace lcos


hpx::future<hpx::id_type> create_communication_set(char const *basename, std::size_t num_sites = std::size_t(-1), std::size_t this_site = std::size_t(-1), std::size_t arity = std::size_t(-1))

The function create_communication_set sets up a (distributed) tree-like communication structure that can be used with any of the collective APIs (such like all_to_all and similar).


This function returns a future holding an id_type of the communicator object to be used on the current locality.

  • basename: The base name identifying the all_to_all operation

  • num_sites: The number of participating sites (default: all localities).

  • this_site: The sequence number of this invocation (usually the locality id). This value is optional and defaults to whatever hpx::get_locality_id() returns.

  • arity: The number of children each of the communication nodes is connected to (default: picked based on num_sites)