hpx/runtime_local/get_locality_id.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_locality_id
(error_code &ec = throws)¶ Return the number of the locality this function is being called from.
This function returns the id of the current locality.
- Note
The returned value is zero based and its maximum value is smaller than the overall number of localities the current application is running on (as returned by get_num_localities()).
- 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.
- Note
This function needs to be executed on a HPX-thread. It will fail otherwise (it will return -1).
- 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