hpx/collectives/scatter.hpp#

Defined in header hpx/collectives/scatter.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> scatter_from(char const *basename, this_site_arg this_site = this_site_arg(), generation_arg generation = generation_arg(), root_site_arg root_site = root_site_arg())#

Scatter (receive) a set of values to different call sites

This function receives an element of a set of values operating on the given base name.

Parameters
  • basename – The base name identifying the scatter operation

  • 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 all_gather operation performed on the given base name. This is optional and needs to be supplied only if the all_gather 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.

  • root_site – The sequence number of the central scatter point (usually the locality id). This value is optional and defaults to 0.

Returns

This function returns a future holding a the scattered value. It will become ready once the scatter operation has been completed.

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

Scatter (receive) a set of values to different call sites

This function receives an element of a set of values operating on the given base name.

Scatter (receive) a set of values to different call sites

This function receives an element of a set of values operating on the given base name.

Note

The generation values from corresponding scatter_to and scatter_from have to match.

Note

The generation values from corresponding scatter_to and scatter_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 all_gather operation performed on the given base name. This is optional and needs to be supplied only if the all_gather 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 all_gather operation performed on the given base name. This is optional and needs to be supplied only if the all_gather 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 a the scattered value. It will become ready once the scatter operation has been completed.

Returns

This function returns a future holding a the scattered value. It will become ready once the scatter operation has been completed.

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

Scatter (send) a part of the value set at the given call site

This function transmits the value given by result to a central scatter site (where the corresponding scatter_from is executed)

Parameters
  • basename – The base name identifying the scatter operation

  • result – The value to transmit to the central scatter point from this call site.

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

  • generation – The generational counter identifying the sequence number of the all_gather operation performed on the given base name. This is optional and needs to be supplied only if the all_gather 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 a the scattered value. It will become ready once the scatter operation has been completed.

template<typename T>
hpx::future<T> scatter_to(communicator comm, std::vector<T> &&result, this_site_arg this_site = this_site_arg(), generation_arg generation = generation_arg())#

Scatter (send) a part of the value set at the given call site

This function transmits the value given by result to a central scatter site (where the corresponding scatter_from is executed)

Scatter (send) a part of the value set at the given call site

This function transmits the value given by result to a central scatter site (where the corresponding scatter_from is executed)

Note

The generation values from corresponding scatter_to and scatter_from have to match.

Note

The generation values from corresponding scatter_to and scatter_from have to match.

Parameters
  • comm – A communicator object returned from create_communicator

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

  • generation – The generational counter identifying the sequence number of the all_gather operation performed on the given base name. This is optional and needs to be supplied only if the all_gather 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

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

  • generation – The generational counter identifying the sequence number of the all_gather operation performed on the given base name. This is optional and needs to be supplied only if the all_gather 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 a the scattered value. It will become ready once the scatter operation has been completed.

Returns

This function returns a future holding a the scattered value. It will become ready once the scatter operation has been completed.