hpx/runtime_local/get_num_all_localities.hpp¶
See Public API for a list of names and headers that are part of the public HPX API.
-
namespace
hpx
Functions
-
std::uint32_t
get_initial_num_localities
()¶ Return the number of localities which were registered at startup for the running application.
The function get_initial_num_localities returns the number of localities which were connected to the console at application startup.
- Note
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
hpx::find_all_localities, hpx::get_num_localities
-
hpx::future<std::uint32_t>
get_num_localities
()¶ Asynchronously return the number of localities which are currently registered for the running application.
The function get_num_localities asynchronously returns the number of localities currently connected to the console. The returned future represents the actual result.
- Note
This function will return meaningful results only if called from an HPX-thread. It will return 0 otherwise.
- See
hpx::find_all_localities, hpx::get_num_localities
-
std::uint32_t
get_num_localities
(launch::sync_policy, error_code &ec = throws)¶ Return the number of localities which are currently registered for the running application.
The function get_num_localities returns the number of localities currently connected to the console.
- Note
This function will return meaningful results only if called from an HPX-thread. It will return 0 otherwise.
- Note
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
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.
-
std::uint32_t