HPX - High Performance ParalleX

PrevUpHomeNext

Function template get_ptr_sync

hpx::get_ptr_sync — Returns the pointer to the underlying memory of a component.

Synopsis

// In header: <hpx/runtime/get_ptr.hpp>


template<typename Component> 
  boost::shared_ptr< Component > 
  get_ptr_sync(naming::id_type const & id, error_code & ec = throws);

Description

The function hpx::get_ptr_sync can be used to extract the pointer to the underlying memory of a given component.

[Note] Note

This function will successfully return the requested result only if the given component is currently located on the the requesting locality. Otherwise the function will raise and error.

As long as ec is not pre-initialized to hpx::throws this function doesn't throw but returns the result code using the parameter ec. Otherwise it throws an instance of hpx::exception.

Parameters:

ec

[in,out] this represents the error status on exit, if this is pre-initialized to hpx::throws the function will throw on error instead.

id

[in] The global id of the component for which the pointer to the underlying memory should be retrieved.

Returns:

This function returns the pointer to the underlying memory for the component instance with the given id.


PrevUpHomeNext