hpx::collectives::reduce_there#

Defined in header hpx/collectives.hpp.

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

See also:

template<typename T, typename F>
hpx::future<void> hpx::collectives::reduce_there(char const *basename, T &&result, this_site_arg this_site = this_site_arg(), generation_arg generation = generation_arg(), root_site_arg root_site = root_site_arg())#

Reduce a given value at the given call site

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

Parameters
  • basename – The base name identifying the reduction operation

  • result – A future referring to the value to transmit to the central reduction point 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 reduce operation performed on the given base name. This is optional and needs to be supplied only if the reduce 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 reduction point (usually the locality id). This value is optional and defaults to 0.

Returns

This function returns a future<void>. It will become ready once the reduction operation has been completed.

template<typename T>
hpx::future<void> hpx::collectives::reduce_there(communicator comm, T &&result, this_site_arg this_site = this_site_arg(), generation_arg generation = generation_arg())#

Reduce a given value at the given call site

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

Reduce a given value at the given call site

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

Note

The generation values from corresponding reduce_here and reduce_there have to match.

Note

The generation values from corresponding reduce_here and reduce_there have to match.

Parameters
  • comm – A communicator object returned from create_communicator

  • result – A value to reduce on the central reduction point 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 reduce operation performed on the given base name. This is optional and needs to be supplied only if the reduce 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

  • result – A value to reduce on the central reduction point from this call site.

  • generation – The generational counter identifying the sequence number of the reduce operation performed on the given base name. This is optional and needs to be supplied only if the reduce 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 value calculated based on the values send by all participating sites. It will become ready once the reduce operation has been completed.

Returns

This function returns a future holding a value calculated based on the values send by all participating sites. It will become ready once the reduce operation has been completed.

template<typename T>
void hpx::collectives::reduce_there(hpx::launch::sync_policy, char const *basename, T &&result, this_site_arg this_site = this_site_arg(), generation_arg generation = generation_arg(), root_site_arg root_site = root_site_arg())#

Reduce a given value at the given call site

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

Parameters
  • basename – The base name identifying the reduction operation

  • result – A future referring to the value to transmit to the central reduction point 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 reduce operation performed on the given base name. This is optional and needs to be supplied only if the reduce 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 reduction point (usually the locality id). This value is optional and defaults to 0.

template<typename T>
void hpx::collectives::reduce_there(hpx::launch::sync_policy, communicator comm, T &&result, this_site_arg this_site = this_site_arg(), generation_arg generation = generation_arg())#

Reduce a given value at the given call site

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

Reduce a given value at the given call site

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

Note

The generation values from corresponding reduce_here and reduce_there have to match.

Note

The generation values from corresponding reduce_here and reduce_there have to match.

Parameters
  • comm – A communicator object returned from create_communicator

  • result – A value to reduce on the central reduction point 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 reduce operation performed on the given base name. This is optional and needs to be supplied only if the reduce 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

  • result – A value to reduce on the central reduction point from this call site.

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