hpx/collectives/broadcast.hpp#

Defined in header hpx/collectives/broadcast.hpp.

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

namespace hpx

Top level HPX namespace.

namespace collectives

Top level HPX namespace.

Functions

template<typename T>
hpx::future<T> broadcast_to(char const *basename, T &&local_result, num_sites_arg num_sites = num_sites_arg(), this_site_arg this_site = this_site_arg(), generation_arg generation = generation_arg())#

Broadcast a value to different call sites

This function sends a set of values to all call sites operating on the given base name.

Parameters
  • basename – The base name identifying the broadcast operation

  • local_result – A value to transmit to all participating sites from this call site.

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

  • generation – The generational counter identifying the sequence number of the broadcast operation performed on the given base name. This is optional and needs to be supplied only if the broadcast operation on the given base name has to be performed more than once. The generation number (if given) must be a positive number greater than zero.

  • 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.

Returns

This function returns a future holding the value that was sent to all participating sites. It will become ready once the broadcast operation has been completed.

template<typename T>
hpx::future<T> broadcast_to(communicator comm, T &&local_result, this_site_arg this_site = this_site_arg(), generation_arg generation = generation_arg())#

Broadcast a value to different call sites

This function sends a set of values to all call sites operating on the given base name.

Note

The generation values from corresponding broadcast_to and broadcast_from have to match.

Parameters
  • comm – A communicator object returned from create_communicator

  • local_result – A value to transmit to all participating sites from this call site.

  • 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.

  • generation – The generational counter identifying the sequence number of the broadcast operation performed on the given base name. This is optional and needs to be supplied only if the broadcast operation on the given base name has to be performed more than once. The generation number (if given) must be a positive number greater than zero.

Returns

This function returns a future holding the value that was sent to all participating sites. It will become ready once the broadcast operation has been completed.

template<typename T>
hpx::future<T> broadcast_to(communicator comm, generation_arg generation, T &&local_result, this_site_arg this_site = this_site_arg())#

Broadcast a value to different call sites

This function sends a set of values to all call sites operating on the given base name.

Note

The generation values from corresponding broadcast_to and broadcast_from have to match.

Parameters
  • comm – A communicator object returned from create_communicator

  • local_result – A value to transmit to all participating sites from this call site.

  • generation – The generational counter identifying the sequence number of the broadcast operation performed on the given base name. This is optional and needs to be supplied only if the broadcast operation on the given base name has to be performed more than once. The generation number (if given) must be a positive number greater than zero.

  • 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.

Returns

This function returns a future holding the value that was sent to all participating sites. It will become ready once the broadcast operation has been completed.

template<typename T>
hpx::future<T> broadcast_from(char const *basename, this_site_arg this_site = this_site_arg(), generation_arg generation = generation_arg())#

Receive a value that was broadcast to different call sites

This function sends a set of values to all call sites operating on the given base name.

Parameters
  • basename – The base name identifying the broadcast operation

  • generation – The generational counter identifying the sequence number of the broadcast operation performed on the given base name. This is optional and needs to be supplied only if the broadcast operation on the given base name has to be performed more than once. The generation number (if given) must be a positive number greater than zero.

  • 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.

Returns

This function returns a future holding the value that was sent to all participating sites. It will become ready once the broadcast operation has been completed.

template<typename T>
hpx::future<T> broadcast_from(communicator comm, this_site_arg this_site = this_site_arg(), generation_arg generation = generation_arg())#

Receive a value that was broadcast to different call sites

This function sends a set of values to all call sites operating on the given base name.

Receive a value that was broadcast to different call sites

This function sends a set of values to all call sites operating on the given base name.

Note

The generation values from corresponding broadcast_to and broadcast_from have to match.

Note

The generation values from corresponding broadcast_to and broadcast_from have to match.

Parameters
  • comm – A communicator object returned from create_communicator

  • 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.

  • generation – The generational counter identifying the sequence number of the broadcast operation performed on the given base name. This is optional and needs to be supplied only if the broadcast operation on the given base name has to be performed more than once. The generation number (if given) must be a positive number greater than zero.

  • comm – A communicator object returned from create_communicator

  • generation – The generational counter identifying the sequence number of the broadcast operation performed on the given base name. This is optional and needs to be supplied only if the broadcast operation on the given base name has to be performed more than once. The generation number (if given) must be a positive number greater than zero.

  • 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.

Returns

This function returns a future holding the value that was sent to all participating sites. It will become ready once the broadcast operation has been completed.

Returns

This function returns a future holding the value that was sent to all participating sites. It will become ready once the broadcast operation has been completed.