HPX - High Performance ParalleX

PrevUpHomeNext

Function get_num_localities_sync

hpx::get_num_localities_sync — Return the number of localities which are currently registered for the running application.

Synopsis

// In header: <hpx/hpx_fwd.hpp>


boost::uint32_t 
get_num_localities_sync(components::component_type t, 
                        error_code & ec = throws);

Description

The function get_num_localities returns the number of localities currently connected to the console which support the creation of the given component type.

[Note] Note

This function will return meaningful results only if called from an HPX-thread. It will return 0 otherwise.

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.

See Also:

hpx::find_all_localities, hpx::get_num_localities

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.

t

The component type for which the number of connected localities should be retrieved.


PrevUpHomeNext