HPX - High Performance ParalleX

PrevUpHomeNext

Function template new_colocated

hpx::components::new_colocated — Create a new instance of the given Component type on the co-located with the specified object.

Synopsis

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


template<typename Component, typename ArgN, ... > 
  hpx::future< hpx::id_type > 
  new_colocated(hpx::id_type const & id, Arg0 argN, ...);

Description

This function creates a new instance of the given Component type on the specified locality the given object is currently located on and returns a future object for the global address which can be used to reference the new component instance.

Parameters:

argN

[in] Any number of arbitrary arguments (passed by value, by const reference or by rvalue reference) which will be forwarded to the constructor of the created component instance.

id

[in] The global address of an object defining the locality where the new instance should be created on.

Returns:

The function returns an hpx::future object instance which can be used to retrieve the global address of the newly created component.


PrevUpHomeNext