HPX - High Performance ParalleX

PrevUpHomeNext

Function template new_

hpx::components::new_ — Create a new instance of the given Component type on the specified locality.

Synopsis

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


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

Description

This function creates a new instance of the given Component type on the specified locality 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.

locality

[in] The global address of 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