![]() |
hpx::components::copy — Copy given component to the specified target locality.
// 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);
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 |
---|---|
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: |
|
||||
Returns: |
A future representing the global id of the newly (copied) component instance. |