hpx/collectives/channel_communicator.hpp¶
See Public API for a list of names and headers that are part of the public HPX API.
-
namespace
hpx
-
namespace
collectives
Functions
-
hpx::future<channel_communicator>
create_channel_communicator
(char const *basename, num_sites_arg num_sites = num_sites_arg(), this_site_arg this_site = this_site_arg())¶ Create a new communicator object usable with peer-to-peer channel-based operations
This functions creates a new communicator object that can be called in order to pre-allocate a communicator object usable with multiple invocations of channel-based peer-to-peer operations.
- Return
This function returns a future to a new communicator object usable with the collective operation.
- Parameters
basename
: The base name identifying the collective operationnum_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.
-
channel_communicator
create_channel_communicator
(hpx::launch::sync_policy, char const *basename, num_sites_arg num_sites = num_sites_arg(), this_site_arg this_site = this_site_arg())¶ Create a new communicator object usable with peer-to-peer channel-based operations
This functions creates a new communicator object that can be called in order to pre-allocate a communicator object usable with multiple invocations of channel-based peer-to-peer operations.
- Return
This function returns a new communicator object usable with the collective operation.
- Parameters
basename
: The base name identifying the collective operationnum_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.
-
template<typename
T
>
hpx::future<void>set
(channel_communicator comm, that_site_arg site, T &&value, tag_arg tag = 0)¶ Send a value to the given site
This function sends a value to the given site based on the given communicator.
- Return
This function returns a future<void> that becomes ready once the data transfer operation has finished.
- Parameters
comm
: The channel communicator object to use for the data transfersite
: The destination sitevalue
: The value to sendtag
: The (optional) tag identifying the concrete operation
-
template<typename
T
>
hpx::future<T>get
(channel_communicator comm, that_site_arg site, tag_arg tag = 0)¶ Send a value to the given site
This function receives a value from the given site based on the given communicator.
- Return
This function returns a future<T> that becomes ready once the data transfer operation has finished. The future will hold the received value.
- Parameters
comm
: The channel communicator object to use for the data transfersite
: The source site
-
hpx::future<channel_communicator>
-
namespace