hpx/runtime_distributed/copy_component.hpp#

Defined in header hpx/runtime_distributed/copy_component.hpp.

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

namespace hpx
namespace components

Functions

template<typename Component>
future<hpx::id_type> copy(hpx::id_type const &to_copy)#

Copy given component to the specified target locality.

The function copy<Component> will create a copy of the component referenced by to_copy on the locality specified with target_locality. It returns a future referring to the newly created component instance.

Note

The new component instance is created on the locality of the component instance which is to be copied.

Parameters

to_copy – [in] The global id of the component to copy

Template Parameters

The – only template argument specifies the component type to create.

Returns

A future representing the global id of the newly (copied) component instance.

template<typename Component>
future<hpx::id_type> copy(hpx::id_type const &to_copy, hpx::id_type const &target_locality)#

Copy given component to the specified target locality.

The function copy<Component> will create a copy of the component referenced by to_copy on the locality specified with target_locality. It returns a future referring to the newly created component instance.

Parameters
  • to_copy – [in] The global id of the component to copy

  • target_locality – [in ] The locality where the copy should be created.

Template Parameters

The – only template argument specifies the component type to create.

Returns

A future representing the global id of the newly (copied) component instance.

template<typename Derived, typename Stub, typename Data>
Derived copy(client_base<Derived, Stub, Data> const &to_copy, hpx::id_type const &target_locality = hpx::invalid_id)#

Copy given component to the specified target locality.

The function copy will create a copy of the component referenced by the client side object to_copy on the locality specified with target_locality. It returns a new client side object future referring to the newly created component instance.

Note

If the second argument is omitted (or is invalid_id) the new component instance is created on the locality of the component instance which is to be copied.

Parameters
  • to_copy – [in] The client side object representing the component to copy

  • target_locality – [in, optional] The locality where the copy should be created (default is same locality as source).

Template Parameters

The – only template argument specifies the component type to create.

Returns

A future representing the global id of the newly (copied) component instance.