hpx/collectives/broadcast_direct.hpp#

Defined in header hpx/collectives/broadcast_direct.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 lcos

Functions

template<typename Action, typename ArgN, ...> hpx::future< std::vector< decltype(Action(hpx::id_type, ArgN,...))> > broadcast (std::vector< hpx::id_type > const &ids, ArgN argN,...)

Perform a distributed broadcast operation.

The function hpx::lcos::broadcast performs a distributed broadcast operation resulting in action invocations on a given set of global identifiers. The action can be either a plain action (in which case the global identifiers have to refer to localities) or a component action (in which case the global identifiers have to refer to instances of a component type which exposes the action.

The given action is invoked asynchronously on all given identifiers, and the arguments ArgN are passed along to those invocations.

Note

If decltype(Action(…)) is void, then the result of this function is future<void>.

Parameters
  • ids – [in] A list of global identifiers identifying the target objects for which the given action will be invoked.

  • argN – [in] Any number of arbitrary arguments (passed by const reference) which will be forwarded to the action invocation.

Returns

This function returns a future representing the result of the overall reduction operation.

template<typename Action, typename ArgN, ...> void broadcast_post (std::vector< hpx::id_type > const &ids, ArgN argN,...)

Perform an asynchronous (fire&forget) distributed broadcast operation.

The function hpx::lcos::broadcast_post performs an asynchronous (fire&forget) distributed broadcast operation resulting in action invocations on a given set of global identifiers. The action can be either a plain action (in which case the global identifiers have to refer to localities) or a component action (in which case the global identifiers have to refer to instances of a component type which exposes the action.

The given action is invoked asynchronously on all given identifiers, and the arguments ArgN are passed along to those invocations.

Parameters
  • ids – [in] A list of global identifiers identifying the target objects for which the given action will be invoked.

  • argN – [in] Any number of arbitrary arguments (passed by const reference) which will be forwarded to the action invocation.

template<typename Action, typename ArgN, ...> hpx::future< std::vector< decltype(Action(hpx::id_type, ArgN,..., std::size_t))> > broadcast_with_index (std::vector< hpx::id_type > const &ids, ArgN argN,...)

Perform a distributed broadcast operation.

The function hpx::lcos::broadcast_with_index performs a distributed broadcast operation resulting in action invocations on a given set of global identifiers. The action can be either a plain action (in which case the global identifiers have to refer to localities) or a component action (in which case the global identifiers have to refer to instances of a component type which exposes the action.

The given action is invoked asynchronously on all given identifiers, and the arguments ArgN are passed along to those invocations.

The function passes the index of the global identifier in the given list of identifiers as the last argument to the action.

Note

If decltype(Action(…)) is void, then the result of this function is future<void>.

Parameters
  • ids – [in] A list of global identifiers identifying the target objects for which the given action will be invoked.

  • argN – [in] Any number of arbitrary arguments (passed by const reference) which will be forwarded to the action invocation.

Returns

This function returns a future representing the result of the overall reduction operation.

template<typename Action, typename ArgN, ...> void broadcast_post_with_index (std::vector< hpx::id_type > const &ids, ArgN argN,...)

Perform an asynchronous (fire&forget) distributed broadcast operation.

The function hpx::lcos::broadcast_post_with_index performs an asynchronous (fire&forget) distributed broadcast operation resulting in action invocations on a given set of global identifiers. The action can be either a plain action (in which case the global identifiers have to refer to localities) or a component action (in which case the global identifiers have to refer to instances of a component type which exposes the action.

The given action is invoked asynchronously on all given identifiers, and the arguments ArgN are passed along to those invocations.

The function passes the index of the global identifier in the given list of identifiers as the last argument to the action.

Parameters
  • ids – [in] A list of global identifiers identifying the target objects for which the given action will be invoked.

  • argN – [in] Any number of arbitrary arguments (passed by const reference) which will be forwarded to the action invocation.