hpx::find_all_localities

hpx::find_all_localities#

Defined in header hpx/runtime.hpp.

See Public API for a list of names and headers that are part of the public HPX API.

See also:

std::vector<hpx::id_type> hpx::find_all_localities(error_code &ec = throws)#

Return the list of global ids representing all localities available to this application.

The function find_all_localities() can be used to retrieve the global ids of all localities currently available to this application.

See also

hpx::find_here(), hpx::find_locality()

Note

Generally, the id of a locality can be used for instance to create new instances of components and to invoke plain actions (global functions).

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 will return meaningful results only if called from an HPX-thread. It will return an empty vector otherwise.

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.

Returns:

The global ids representing the localities currently available to this application.

std::vector<hpx::id_type> hpx::find_all_localities(components::component_type type, error_code &ec = throws)#

Return the list of global ids representing all localities available to this application which support the given component type.

The function find_all_localities() can be used to retrieve the global ids of all localities currently available to this application which support the creation of instances of the given component type.

See also

hpx::find_here(), hpx::find_locality()

Note

Generally, the id of a locality can be used for instance to create new instances of components and to invoke plain actions (global functions).

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 will return meaningful results only if called from an HPX-thread. It will return an empty vector otherwise.

Parameters:
  • type – [in] The type of the components for which the function should return the available localities.

  • 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.

Returns:

The global ids representing the localities currently available to this application which support the creation of instances of the given component type. If no localities supporting the given component type are currently available, this function will return an empty vector.