HPX - High Performance ParalleX

PrevUpHomeNext

Function template copy

hpx::components::copy — Copy given component to the specified target locality.

Synopsis

// In header: <hpx/runtime/components/copy_component.hpp>


template<typename Component> 
  future< naming::id_type > 
  copy(naming::id_type const & to_copy, 
       naming::id_type const & target_locality = naming::invalid_id);

Description

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] 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:

target_locality

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

to_copy

[in] The global id of the component to copy

Returns:

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


PrevUpHomeNext