Main HPX library

This lists functionality in the main HPX library that has not been moved to modules yet.

template<typename Action>
struct async_result
#include <colocating_distribution_policy.hpp>

Note

This function is part of the invocation policy implemented by this class

Public Types

template<>
using type = hpx::future<typename traits::promise_local_result<typename hpx::traits::extract_action<Action>::remote_result_type>::type>
template<typename Action>
struct async_result
#include <default_distribution_policy.hpp>

Note

This function is part of the invocation policy implemented by this class

Public Types

template<>
using type = hpx::future<typename traits::promise_local_result<typename hpx::traits::extract_action<Action>::remote_result_type>::type>
struct binpacking_distribution_policy
#include <binpacking_distribution_policy.hpp>

This class specifies the parameters for a binpacking distribution policy to use for creating a given number of items on a given set of localities. The binpacking policy will distribute the new objects in a way such that each of the localities will equalize the number of overall objects of this type based on a given criteria (by default this criteria is the overall number of objects of this type).

Public Functions

binpacking_distribution_policy()

Default-construct a new instance of a binpacking_distribution_policy. This policy will represent one locality (the local locality).

binpacking_distribution_policy operator()(std::vector<id_type> const &locs, char const *perf_counter_name = default_binpacking_counter_name) const

Create a new default_distribution policy representing the given set of localities.

Parameters
  • locs: [in] The list of localities the new instance should represent

  • perf_counter_name: [in] The name of the performance counter which should be used as the distribution criteria (by default the overall number of existing instances of the given component type will be used).

binpacking_distribution_policy operator()(std::vector<id_type> &&locs, char const *perf_counter_name = default_binpacking_counter_name) const

Create a new default_distribution policy representing the given set of localities.

Parameters
  • locs: [in] The list of localities the new instance should represent

  • perf_counter_name: [in] The name of the performance counter which should be used as the distribution criteria (by default the overall number of existing instances of the given component type will be used).

binpacking_distribution_policy operator()(id_type const &loc, char const *perf_counter_name = default_binpacking_counter_name) const

Create a new default_distribution policy representing the given locality

Parameters
  • loc: [in] The locality the new instance should represent

  • perf_counter_name: [in] The name of the performance counter which should be used as the distribution criteria (by default the overall number of existing instances of the given component type will be used).

template<typename Component, typename ...Ts>
hpx::future<hpx::id_type> create(Ts&&... vs) const

Create one object on one of the localities associated by this policy instance

Return

A future holding the global address which represents the newly created object

Parameters
  • vs: [in] The arguments which will be forwarded to the constructor of the new object.

template<typename Component, typename ...Ts>
hpx::future<std::vector<bulk_locality_result>> bulk_create(std::size_t count, Ts&&... vs) const

Create multiple objects on the localities associated by this policy instance

Return

A future holding the list of global addresses which represent the newly created objects

Parameters
  • count: [in] The number of objects to create

  • vs: [in] The arguments which will be forwarded to the constructors of the new objects.

std::string const &get_counter_name() const

Returns the name of the performance counter associated with this policy instance.

std::size_t get_num_localities() const

Returns the number of associated localities for this distribution policy

Note

This function is part of the creation policy implemented by this class

struct colocating_distribution_policy
#include <colocating_distribution_policy.hpp>

This class specifies the parameters for a distribution policy to use for creating a given number of items on the locality where a given object is currently placed.

Public Functions

colocating_distribution_policy()

Default-construct a new instance of a colocating_distribution_policy. This policy will represent the local locality.

colocating_distribution_policy operator()(id_type const &id) const

Create a new colocating_distribution_policy representing the locality where the given object os current located

Parameters
  • id: [in] The global address of the object with which the new instances should be colocated on

template<typename Client, typename Stub>
colocating_distribution_policy operator()(client_base<Client, Stub> const &client) const

Create a new colocating_distribution_policy representing the locality where the given object os current located

Parameters
  • client: [in] The client side representation of the object with which the new instances should be colocated on

template<typename Component, typename ...Ts>
hpx::future<hpx::id_type> create(Ts&&... vs) const

Create one object on the locality of the object this distribution policy instance is associated with

Note

This function is part of the placement policy implemented by this class

Return

A future holding the global address which represents the newly created object

Parameters
  • vs: [in] The arguments which will be forwarded to the constructor of the new object.

template<typename Component, typename ...Ts>
hpx::future<std::vector<bulk_locality_result>> bulk_create(std::size_t count, Ts&&... vs) const

Create multiple objects colocated with the object represented by this policy instance

Note

This function is part of the placement policy implemented by this class

Return

A future holding the list of global addresses which represent the newly created objects

Parameters
  • count: [in] The number of objects to create

  • vs: [in] The arguments which will be forwarded to the constructors of the new objects.

template<typename Action, typename ...Ts>
async_result<Action>::type async(launch policy, Ts&&... vs) const
template<typename Action, typename Callback, typename ...Ts>
async_result<Action>::type async_cb(launch policy, Callback &&cb, Ts&&... vs) const

Note

This function is part of the invocation policy implemented by this class

template<typename Action, typename Continuation, typename ...Ts>
bool apply(Continuation &&c, threads::thread_priority priority, Ts&&... vs) const

Note

This function is part of the invocation policy implemented by this class

template<typename Action, typename ...Ts>
bool apply(threads::thread_priority priority, Ts&&... vs) const
template<typename Action, typename Continuation, typename Callback, typename ...Ts>
bool apply_cb(Continuation &&c, threads::thread_priority priority, Callback &&cb, Ts&&... vs) const

Note

This function is part of the invocation policy implemented by this class

template<typename Action, typename Callback, typename ...Ts>
bool apply_cb(threads::thread_priority priority, Callback &&cb, Ts&&... vs) const
std::size_t get_num_localities() const

Returns the number of associated localities for this distribution policy

Note

This function is part of the creation policy implemented by this class

hpx::id_type get_next_target() const

Returns the locality which is anticipated to be used for the next async operation

struct default_distribution_policy
#include <default_distribution_policy.hpp>

This class specifies the parameters for a simple distribution policy to use for creating (and evenly distributing) a given number of items on a given set of localities.

Public Functions

default_distribution_policy()

Default-construct a new instance of a default_distribution_policy. This policy will represent one locality (the local locality).

default_distribution_policy operator()(std::vector<id_type> const &locs) const

Create a new default_distribution policy representing the given set of localities.

Parameters
  • locs: [in] The list of localities the new instance should represent

default_distribution_policy operator()(std::vector<id_type> &&locs) const

Create a new default_distribution policy representing the given set of localities.

Parameters
  • locs: [in] The list of localities the new instance should represent

default_distribution_policy operator()(id_type const &loc) const

Create a new default_distribution policy representing the given locality

Parameters
  • loc: [in] The locality the new instance should represent

template<typename Component, typename ...Ts>
hpx::future<hpx::id_type> create(Ts&&... vs) const

Create one object on one of the localities associated by this policy instance

Note

This function is part of the placement policy implemented by this class

Return

A future holding the global address which represents the newly created object

Parameters
  • vs: [in] The arguments which will be forwarded to the constructor of the new object.

template<typename Component, typename ...Ts>
hpx::future<std::vector<bulk_locality_result>> bulk_create(std::size_t count, Ts&&... vs) const

Create multiple objects on the localities associated by this policy instance

Note

This function is part of the placement policy implemented by this class

Return

A future holding the list of global addresses which represent the newly created objects

Parameters
  • count: [in] The number of objects to create

  • vs: [in] The arguments which will be forwarded to the constructors of the new objects.

template<typename Action, typename ...Ts>
async_result<Action>::type async(launch policy, Ts&&... vs) const
template<typename Action, typename Callback, typename ...Ts>
async_result<Action>::type async_cb(launch policy, Callback &&cb, Ts&&... vs) const

Note

This function is part of the invocation policy implemented by this class

template<typename Action, typename Continuation, typename ...Ts>
bool apply(Continuation &&c, threads::thread_priority priority, Ts&&... vs) const

Note

This function is part of the invocation policy implemented by this class

template<typename Action, typename ...Ts>
bool apply(threads::thread_priority priority, Ts&&... vs) const
template<typename Action, typename Continuation, typename Callback, typename ...Ts>
bool apply_cb(Continuation &&c, threads::thread_priority priority, Callback &&cb, Ts&&... vs) const

Note

This function is part of the invocation policy implemented by this class

template<typename Action, typename Callback, typename ...Ts>
bool apply_cb(threads::thread_priority priority, Callback &&cb, Ts&&... vs) const
std::size_t get_num_localities() const

Returns the number of associated localities for this distribution policy

Note

This function is part of the creation policy implemented by this class

hpx::id_type get_next_target() const

Returns the locality which is anticipated to be used for the next async operation

namespace hpx

Functions

std::vector<Client> find_all_from_basename(std::string base_name, std::size_t num_ids)

Return all registered ids from all localities from the given base name.

This function locates all ids which were registered with the given base name. It returns a list of futures representing those ids.

Return all registered clients from all localities from the given base name.

Return

A list of futures representing the ids which were registered using the given base name.

Note

The futures will become ready even if the event (for instance, binding the name to an id) has already happened in the past. This is important in order to reliably retrieve ids from a name, even if the name was already registered.

Parameters
  • base_name: [in] The base name for which to retrieve the registered ids.

  • num_ids: [in] The number of registered ids to expect.

This function locates all ids which were registered with the given base name. It returns a list of futures representing those ids.

Return

A list of futures representing the ids which were registered using the given base name.

Note

The futures embedded in the returned client objects will become ready even if the event (for instance, binding the name to an id) has already happened in the past. This is important in order to reliably retrieve ids from a name, even if the name was already registered.

Template Parameters
  • Client: The client type to return

Parameters
  • base_name: [in] The base name for which to retrieve the registered ids.

  • num_ids: [in] The number of registered ids to expect.

std::vector<Client> find_from_basename(std::string base_name, std::vector<std::size_t> const &ids)

Return registered ids from the given base name and sequence numbers.

This function locates the ids which were registered with the given base name and the given sequence numbers. It returns a list of futures representing those ids.

Return registered clients from the given base name and sequence numbers.

Return

A list of futures representing the ids which were registered using the given base name and sequence numbers.

Note

The futures will become ready even if the event (for instance, binding the name to an id) has already happened in the past. This is important in order to reliably retrieve ids from a name, even if the name was already registered.

Parameters
  • base_name: [in] The base name for which to retrieve the registered ids.

  • ids: [in] The sequence numbers of the registered ids.

This function locates the ids which were registered with the given base name and the given sequence numbers. It returns a list of futures representing those ids.

Return

A list of futures representing the ids which were registered using the given base name and sequence numbers.

Note

The futures embedded in the returned client objects will become ready even if the event (for instance, binding the name to an id) has already happened in the past. This is important in order to reliably retrieve ids from a name, even if the name was already registered.

Template Parameters
  • Client: The client type to return

Parameters
  • base_name: [in] The base name for which to retrieve the registered ids.

  • ids: [in] The sequence numbers of the registered ids.

Client find_from_basename(std::string base_name, std::size_t sequence_nr = ~static_cast<std::size_t>(0))

Return registered id from the given base name and sequence number.

This function locates the id which was registered with the given base name and the given sequence number. It returns a future representing those id.

This function locates the id which was registered with the given base name and the given sequence number. It returns a future representing those id.

Return

A representing the id which was registered using the given base name and sequence numbers.

Note

The future will become ready even if the event (for instance, binding the name to an id) has already happened in the past. This is important in order to reliably retrieve ids from a name, even if the name was already registered.

Parameters
  • base_name: [in] The base name for which to retrieve the registered ids.

  • sequence_nr: [in] The sequence number of the registered id.

Return

A representing the id which was registered using the given base name and sequence numbers.

Note

The future embedded in the returned client object will become ready even if the event (for instance, binding the name to an id) has already happened in the past. This is important in order to reliably retrieve ids from a name, even if the name was already registered.

Template Parameters
  • Client: The client type to return

Parameters
  • base_name: [in] The base name for which to retrieve the registered ids.

  • sequence_nr: [in] The sequence number of the registered id.

hpx::future<bool> register_with_basename(std::string base_name, hpx::id_type id, std::size_t sequence_nr = ~static_cast<std::size_t>(0))

Register the given id using the given base name.

The function registers the given ids using the provided base name.

Return

A future representing the result of the registration operation itself.

Note

The operation will fail if the given sequence number is not unique.

Parameters
  • base_name: [in] The base name for which to retrieve the registered ids.

  • id: [in] The id to register using the given base name.

  • sequence_nr: [in, optional] The sequential number to use for the registration of the id. This number has to be unique system wide for each registration using the same base name. The default is the current locality identifier. Also, the sequence numbers have to be consecutive starting from zero.

hpx::future<bool> register_with_basename(std::string base_name, hpx::future<hpx::id_type> f, std::size_t sequence_nr = ~static_cast<std::size_t>(0))

Register the id wrapped in the given future using the given base name.

The function registers the object the given future refers to using the provided base name.

Return

A future representing the result of the registration operation itself.

Note

The operation will fail if the given sequence number is not unique.

Parameters
  • base_name: [in] The base name for which to retrieve the registered ids.

  • f: [in] The future which should be registered using the given base name.

  • sequence_nr: [in, optional] The sequential number to use for the registration of the id. This number has to be unique system wide for each registration using the same base name. The default is the current locality identifier. Also, the sequence numbers have to be consecutive starting from zero.

template<typename Client, typename Stub>
hpx::future<bool> register_with_basename(std::string base_name, components::client_base<Client, Stub> &client, std::size_t sequence_nr = ~static_cast<std::size_t>(0))

Register the id wrapped in the given client using the given base name.

The function registers the object the given client refers to using the provided base name.

Return

A future representing the result of the registration operation itself.

Note

The operation will fail if the given sequence number is not unique.

Template Parameters
  • Client: The client type to register

Parameters
  • base_name: [in] The base name for which to retrieve the registered ids.

  • client: [in] The client which should be registered using the given base name.

  • sequence_nr: [in, optional] The sequential number to use for the registration of the id. This number has to be unique system wide for each registration using the same base name. The default is the current locality identifier. Also, the sequence numbers have to be consecutive starting from zero.

Client unregister_with_basename(std::string base_name, std::size_t sequence_nr = ~static_cast<std::size_t>(0))

Unregister the given id using the given base name.

The function unregisters the given ids using the provided base name.

Unregister the given base name.

Return

A future representing the result of the un-registration operation itself.

Parameters
  • base_name: [in] The base name for which to retrieve the registered ids.

  • sequence_nr: [in, optional] The sequential number to use for the un-registration. This number has to be the same as has been used with register_with_basename before.

The function unregisters the given ids using the provided base name.

Return

A future representing the result of the un-registration operation itself.

Template Parameters
  • Client: The client type to return

Parameters
  • base_name: [in] The base name for which to retrieve the registered ids.

  • sequence_nr: [in, optional] The sequential number to use for the un-registration. This number has to be the same as has been used with register_with_basename before.

naming::id_type find_here(error_code &ec = throws)

Return the global id representing this locality.

The function find_here() can be used to retrieve the global id usable to refer to the current 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).

Return

The global id representing the locality this function has been called on.

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 hpx::naming::invalid_id otherwise.

See

hpx::find_all_localities(), hpx::find_locality()

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.

naming::id_type find_root_locality(error_code &ec = throws)

Return the global id representing the root locality.

The function find_root_locality() can be used to retrieve the global id usable to refer to the root locality. The root locality is the locality where the main AGAS service is hosted.

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

Return

The global id representing the root locality for this application.

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 hpx::naming::invalid_id otherwise.

See

hpx::find_all_localities(), hpx::find_locality()

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::vector<naming::id_type> 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.

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

Return

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

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.

See

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

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::vector<naming::id_type> 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.

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

Return

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.

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.

See

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

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.

std::vector<naming::id_type> find_remote_localities(error_code &ec = throws)

Return the list of locality ids of remote localities supporting the given component type. By default this function will return the list of all remote localities (all but the current locality).

The function find_remote_localities() can be used to retrieve the global ids of all remote localities currently available to this application (i.e. all localities except the current one).

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

Return

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

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.

See

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

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::vector<naming::id_type> find_remote_localities(components::component_type type, error_code &ec = throws)

Return the list of locality ids of remote localities supporting the given component type. By default this function will return the list of all remote localities (all but the current locality).

The function find_remote_localities() can be used to retrieve the global ids of all remote localities currently available to this application (i.e. all localities except the current one) which support the creation of instances of the given component type.

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

Return

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

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.

See

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

Parameters
  • type: [in] The type of the components for which the function should return the available remote 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.

naming::id_type find_locality(components::component_type type, error_code &ec = throws)

Return the global id representing an arbitrary locality which supports the given component type.

The function find_locality() can be used to retrieve the global id of an arbitrary locality currently available to this application which supports the creation of instances of the given component type.

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

Return

The global id representing an arbitrary locality currently available to this application which supports the creation of instances of the given component type. If no locality supporting the given component type is currently available, this function will return hpx::naming::invalid_id.

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 hpx::naming::invalid_id otherwise.

See

hpx::find_here(), hpx::find_all_localities()

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

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

naming::id_type get_colocation_id(launch::sync_policy, naming::id_type const &id, error_code &ec = throws)

Return the id of the locality where the object referenced by the given id is currently located on.

The function hpx::get_colocation_id() returns the id of the locality where the given object is currently located.

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::get_colocation_id()

Parameters
  • id: [in] The id of the object to locate.

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

lcos::future<naming::id_type> get_colocation_id(naming::id_type const &id)

Asynchronously return the id of the locality where the object referenced by the given id is currently located on.

See

hpx::get_colocation_id(launch::sync_policy)

Parameters
  • id: [in] The id of the object to locate.

template<typename Component>
hpx::future<std::shared_ptr<Component>> get_ptr(naming::id_type const &id)

Returns a future referring to the pointer to the underlying memory of a component.

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

Return

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

Note

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

Note

The component instance the returned pointer refers to can not be migrated as long as there is at least one copy of the returned shared_ptr alive.

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

Template Parameters
  • The: only template parameter has to be the type of the server side component.

template<typename Derived, typename Stub>
hpx::future<std::shared_ptr<typename components::client_base<Derived, Stub>::server_component_type>> get_ptr(components::client_base<Derived, Stub> const &c)

Returns a future referring to the pointer to the underlying memory of a component.

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

Return

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

Note

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

Note

The component instance the returned pointer refers to can not be migrated as long as there is at least one copy of the returned shared_ptr alive.

Parameters
  • c: [in] A client side representation of the component for which the pointer to the underlying memory should be retrieved.

template<typename Component>
std::shared_ptr<Component> get_ptr(launch::sync_policy p, naming::id_type const &id, error_code &ec = throws)

Returns the pointer to the underlying memory of a component.

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

Return

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

Note

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

Note

The component instance the returned pointer refers to can not be migrated as long as there is at least one copy of the returned shared_ptr alive.

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.

Parameters
  • p: [in] The parameter p represents a placeholder type to turn make the call synchronous.

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

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

Template Parameters
  • The: only template parameter has to be the type of the server side component.

template<typename Derived, typename Stub>
std::shared_ptr<typename components::client_base<Derived, Stub>::server_component_type> get_ptr(launch::sync_policy p, components::client_base<Derived, Stub> const &c, error_code &ec = throws)

Returns the pointer to the underlying memory of a component.

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

Return

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

Note

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

Note

The component instance the returned pointer refers to can not be migrated as long as there is at least one copy of the returned shared_ptr alive.

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.

Parameters
  • p: [in] The parameter p represents a placeholder type to turn make the call synchronous.

  • c: [in] A client side representation of the component for which the pointer to the underlying memory should be retrieved.

  • 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::string get_locality_name()

Return the name of the locality this function is called on.

This function returns the name for the locality on which this function is called.

Return

This function returns the name for the locality on which the function is called. The name is retrieved from the underlying networking layer and may be different for different parcelports.

See

future<std::string> get_locality_name(naming::id_type const& id)

future<std::string> get_locality_name(naming::id_type const &id)

Return the name of the referenced locality.

This function returns a future referring to the name for the locality of the given id.

Return

This function returns the name for the locality of the given id. The name is retrieved from the underlying networking layer and may be different for different parcel ports.

See

std::string get_locality_name()

Parameters
  • id: [in] The global id of the locality for which the name should be retrieved

void trigger_lco_event(naming::id_type const &id, naming::address &&addr, bool move_credits = true)

Trigger the LCO referenced by the given id.

Parameters
  • id: [in] This represents the id of the LCO which should be triggered.

  • addr: [in] This represents the addr of the LCO which should be triggered.

  • move_credits: [in] If this is set to true then it is ok to send all credits in id along with the generated message. The default value is true.

void trigger_lco_event(naming::id_type const &id, bool move_credits = true)

Trigger the LCO referenced by the given id.

Parameters
  • id: [in] This represents the id of the LCO which should be triggered.

  • move_credits: [in] If this is set to true then it is ok to send all credits in id along with the generated message. The default value is true.

void trigger_lco_event(naming::id_type const &id, naming::address &&addr, naming::id_type const &cont, bool move_credits = true)

Trigger the LCO referenced by the given id.

Parameters
  • id: [in] This represents the id of the LCO which should be triggered.

  • addr: [in] This represents the addr of the LCO which should be triggered.

  • cont: [in] This represents the LCO to trigger after completion.

  • move_credits: [in] If this is set to true then it is ok to send all credits in id along with the generated message. The default value is true.

void trigger_lco_event(naming::id_type const &id, naming::id_type const &cont, bool move_credits = true)

Trigger the LCO referenced by the given id.

Parameters
  • id: [in] This represents the id of the LCO which should be triggered.

  • cont: [in] This represents the LCO to trigger after completion.

  • move_credits: [in] If this is set to true then it is ok to send all credits in id along with the generated message. The default value is true.

template<typename Result>
void set_lco_value(naming::id_type const &id, naming::address &&addr, Result &&t, bool move_credits = true)

Set the result value for the LCO referenced by the given id.

Parameters
  • id: [in] This represents the id of the LCO which should receive the given value.

  • addr: [in] This represents the addr of the LCO which should be triggered.

  • t: [in] This is the value which should be sent to the LCO.

  • move_credits: [in] If this is set to true then it is ok to send all credits in id along with the generated message. The default value is true.

template<typename Result>
std::enable_if<!std::is_same<typename util::decay<Result>::type, naming::address>::value>::type set_lco_value(naming::id_type const &id, Result &&t, bool move_credits = true)

Set the result value for the (managed) LCO referenced by the given id.

Parameters
  • id: [in] This represents the id of the LCO which should receive the given value.

  • t: [in] This is the value which should be sent to the LCO.

  • move_credits: [in] If this is set to true then it is ok to send all credits in id along with the generated message. The default value is true.

template<typename Result>
std::enable_if<!std::is_same<typename util::decay<Result>::type, naming::address>::value>::type set_lco_value_unmanaged(naming::id_type const &id, Result &&t, bool move_credits = true)

Set the result value for the (unmanaged) LCO referenced by the given id.

Parameters
  • id: [in] This represents the id of the LCO which should receive the given value.

  • t: [in] This is the value which should be sent to the LCO.

  • move_credits: [in] If this is set to true then it is ok to send all credits in id along with the generated message. The default value is true.

template<typename Result>
void set_lco_value(naming::id_type const &id, naming::address &&addr, Result &&t, naming::id_type const &cont, bool move_credits = true)

Set the result value for the LCO referenced by the given id.

Parameters
  • id: [in] This represents the id of the LCO which should receive the given value.

  • addr: [in] This represents the addr of the LCO which should be triggered.

  • t: [in] This is the value which should be sent to the LCO.

  • cont: [in] This represents the LCO to trigger after completion.

  • move_credits: [in] If this is set to true then it is ok to send all credits in id along with the generated message. The default value is true.

template<typename Result>
std::enable_if<!std::is_same<typename util::decay<Result>::type, naming::address>::value>::type set_lco_value(naming::id_type const &id, Result &&t, naming::id_type const &cont, bool move_credits = true)

Set the result value for the (managed) LCO referenced by the given id.

Parameters
  • id: [in] This represents the id of the LCO which should receive the given value.

  • t: [in] This is the value which should be sent to the LCO.

  • cont: [in] This represents the LCO to trigger after completion.

  • move_credits: [in] If this is set to true then it is ok to send all credits in id along with the generated message. The default value is true.

template<typename Result>
std::enable_if<!std::is_same<typename util::decay<Result>::type, naming::address>::value>::type set_lco_value_unmanaged(naming::id_type const &id, Result &&t, naming::id_type const &cont, bool move_credits = true)

Set the result value for the (unmanaged) LCO referenced by the given id.

Parameters
  • id: [in] This represents the id of the LCO which should receive the given value.

  • t: [in] This is the value which should be sent to the LCO.

  • cont: [in] This represents the LCO to trigger after completion.

  • move_credits: [in] If this is set to true then it is ok to send all credits in id along with the generated message. The default value is true.

void set_lco_error(naming::id_type const &id, naming::address &&addr, std::exception_ptr const &e, bool move_credits = true)

Set the error state for the LCO referenced by the given id.

Parameters
  • id: [in] This represents the id of the LCO which should receive the error value.

  • addr: [in] This represents the addr of the LCO which should be triggered.

  • e: [in] This is the error value which should be sent to the LCO.

  • move_credits: [in] If this is set to true then it is ok to send all credits in id along with the generated message. The default value is true.

void set_lco_error(naming::id_type const &id, naming::address &&addr, std::exception_ptr &&e, bool move_credits = true)

Set the error state for the LCO referenced by the given id.

Parameters
  • id: [in] This represents the id of the LCO which should receive the error value.

  • addr: [in] This represents the addr of the LCO which should be triggered.

  • e: [in] This is the error value which should be sent to the LCO.

  • move_credits: [in] If this is set to true then it is ok to send all credits in id along with the generated message. The default value is true.

void set_lco_error(naming::id_type const &id, std::exception_ptr const &e, bool move_credits = true)

Set the error state for the LCO referenced by the given id.

Parameters
  • id: [in] This represents the id of the LCO which should receive the error value.

  • e: [in] This is the error value which should be sent to the LCO.

  • move_credits: [in] If this is set to true then it is ok to send all credits in id along with the generated message. The default value is true.

void set_lco_error(naming::id_type const &id, std::exception_ptr &&e, bool move_credits = true)

Set the error state for the LCO referenced by the given id.

Parameters
  • id: [in] This represents the id of the LCO which should receive the error value.

  • e: [in] This is the error value which should be sent to the LCO.

  • move_credits: [in] If this is set to true then it is ok to send all credits in id along with the generated message. The default value is true.

void set_lco_error(naming::id_type const &id, naming::address &&addr, std::exception_ptr const &e, naming::id_type const &cont, bool move_credits = true)

Set the error state for the LCO referenced by the given id.

Parameters
  • id: [in] This represents the id of the LCO which should receive the error value.

  • addr: [in] This represents the addr of the LCO which should be triggered.

  • e: [in] This is the error value which should be sent to the LCO.

  • cont: [in] This represents the LCO to trigger after completion.

  • move_credits: [in] If this is set to true then it is ok to send all credits in id along with the generated message. The default value is true.

void set_lco_error(naming::id_type const &id, naming::address &&addr, std::exception_ptr &&e, naming::id_type const &cont, bool move_credits = true)

Set the error state for the LCO referenced by the given id.

Parameters
  • id: [in] This represents the id of the LCO which should receive the error value.

  • addr: [in] This represents the addr of the LCO which should be triggered.

  • e: [in] This is the error value which should be sent to the LCO.

  • cont: [in] This represents the LCO to trigger after completion.

  • move_credits: [in] If this is set to true then it is ok to send all credits in id along with the generated message. The default value is true.

void set_lco_error(naming::id_type const &id, std::exception_ptr const &e, naming::id_type const &cont, bool move_credits = true)

Set the error state for the LCO referenced by the given id.

Parameters
  • id: [in] This represents the id of the LCO which should receive the error value.

  • e: [in] This is the error value which should be sent to the LCO.

  • cont: [in] This represents the LCO to trigger after completion.

  • move_credits: [in] If this is set to true then it is ok to send all credits in id along with the generated message. The default value is true.

void set_lco_error(naming::id_type const &id, std::exception_ptr &&e, naming::id_type const &cont, bool move_credits = true)

Set the error state for the LCO referenced by the given id.

Parameters
  • id: [in] This represents the id of the LCO which should receive the error value.

  • e: [in] This is the error value which should be sent to the LCO.

  • cont: [in] This represents the LCO to trigger after completion.

  • move_credits: [in] If this is set to true then it is ok to send all credits in id along with the generated message. The default value is true.

template<typename Component, typename ... Ts><unspecified> hpx::new_(id_type const & locality, Ts &&... vs)

Create one or more new instances of the given Component type on the specified locality.

This function creates one or more new instances of the given Component type on the specified locality and returns a future object for the global address which can be used to reference the new component instance.

Note

This function requires to specify an explicit template argument which will define what type of component(s) to create, for instance:

hpx::future<hpx::id_type> f =
   hpx::new_<some_component>(hpx::find_here(), ...);
hpx::id_type id = f.get();

Return

The function returns different types depending on its use:

  • If the explicit template argument Component represents a component type (traits::is_component<Component>::value evaluates to true), the function will return an hpx::future object instance which can be used to retrieve the global address of the newly created component.

  • If the explicit template argument Component represents a client side object (traits::is_client<Component>::value evaluates to true), the function will return a new instance of that type which can be used to refer to the newly created component instance.

Parameters
  • locality: [in] The global address of the locality where the new instance should be created on.

  • vs: [in] Any number of arbitrary arguments (passed by value, by const reference or by rvalue reference) which will be forwarded to the constructor of the created component instance.

template<typename Component, typename ... Ts><unspecified> hpx::local_new(Ts &&... vs)

Create one new instance of the given Component type on the current locality.

This function creates one new instance of the given Component type on the current locality and returns a future object for the global address which can be used to reference the new component instance.

Note

This function requires to specify an explicit template argument which will define what type of component(s) to create, for instance:

hpx::future<hpx::id_type> f =
   hpx::local_new<some_component>(...);
hpx::id_type id = f.get();

Return

The function returns different types depending on its use:

  • If the explicit template argument Component represents a component type (traits::is_component<Component>::value evaluates to true), the function will return an hpx::future object instance which can be used to retrieve the global address of the newly created component. If the first argument is hpx::launch::sync the function will directly return an hpx::id_type.

  • If the explicit template argument Component represents a client side object (traits::is_client<Component>::value evaluates to true), the function will return a new instance of that type which can be used to refer to the newly created component instance.

Note

The difference of this function to hpx::new_ is that it can be used in cases where the supplied arguments are non-copyable and non-movable. All operations are guaranteed to be local only.

Parameters
  • vs: [in] Any number of arbitrary arguments (passed by value, by const reference or by rvalue reference) which will be forwarded to the constructor of the created component instance.

template<typename Component, typename ... Ts><unspecified> hpx::new_(id_type const & locality, std::size_t count, Ts &&... vs)

Create multiple new instances of the given Component type on the specified locality.

This function creates multiple new instances of the given Component type on the specified locality and returns a future object for the global address which can be used to reference the new component instance.

Note

This function requires to specify an explicit template argument which will define what type of component(s) to create, for instance:

hpx::future<std::vector<hpx::id_type> > f =
   hpx::new_<some_component[]>(hpx::find_here(), 10, ...);
hpx::id_type id = f.get();

Return

The function returns different types depending on its use:

  • If the explicit template argument Component represents an array of a component type (i.e. Component[], where traits::is_component<Component>::value evaluates to true), the function will return an hpx::future object instance which holds a std::vector<hpx::id_type>, where each of the items in this vector is a global address of one of the newly created components.

  • If the explicit template argument Component represents an array of a client side object type (i.e. Component[], where traits::is_client<Component>::value evaluates to true), the function will return an hpx::future object instance which holds a std::vector<hpx::id_type>, where each of the items in this vector is a client side instance of the given type, each representing one of the newly created components.

Parameters
  • locality: [in] The global address of the locality where the new instance should be created on.

  • count: [in] The number of component instances to create

  • vs: [in] Any number of arbitrary arguments (passed by value, by const reference or by rvalue reference) which will be forwarded to the constructor of the created component instance.

template<typename Component, typename DistPolicy, typename ... Ts><unspecified> hpx::new_(DistPolicy const & policy, Ts &&... vs)

Create one or more new instances of the given Component type based on the given distribution policy.

This function creates one or more new instances of the given Component type on the localities defined by the given distribution policy and returns a future object for global address which can be used to reference the new component instance(s).

Note

This function requires to specify an explicit template argument which will define what type of component(s) to create, for instance:

hpx::future<hpx::id_type> f =
   hpx::new_<some_component>(hpx::default_layout, ...);
hpx::id_type id = f.get();

Return

The function returns different types depending on its use:

  • If the explicit template argument Component represents a component type (traits::is_component<Component>::value evaluates to true), the function will return an hpx::future object instance which can be used to retrieve the global address of the newly created component.

  • If the explicit template argument Component represents a client side object (traits::is_client<Component>::value evaluates to true), the function will return a new instance of that type which can be used to refer to the newly created component instance.

Parameters
  • policy: [in] The distribution policy used to decide where to place the newly created.

  • vs: [in] Any number of arbitrary arguments (passed by value, by const reference or by rvalue reference) which will be forwarded to the constructor of the created component instance.

template<typename Component, typename DistPolicy, typename ... Ts><unspecified> hpx::new_(DistPolicy const & policy, std::size_t count, Ts &&... vs)

Create multiple new instances of the given Component type on the localities as defined by the given distribution policy.

This function creates multiple new instances of the given Component type on the localities defined by the given distribution policy and returns a future object for the global address which can be used to reference the new component instance.

Note

This function requires to specify an explicit template argument which will define what type of component(s) to create, for instance:

hpx::future<std::vector<hpx::id_type> > f =
   hpx::new_<some_component[]>(hpx::default_layout, 10, ...);
hpx::id_type id = f.get();

Return

The function returns different types depending on its use:

  • If the explicit template argument Component represents an array of a component type (i.e. Component[], where traits::is_component<Component>::value evaluates to true), the function will return an hpx::future object instance which holds a std::vector<hpx::id_type>, where each of the items in this vector is a global address of one of the newly created components.

  • If the explicit template argument Component represents an array of a client side object type (i.e. Component[], where traits::is_client<Component>::value evaluates to true), the function will return an hpx::future object instance which holds a std::vector<hpx::id_type>, where each of the items in this vector is a client side instance of the given type, each representing one of the newly created components.

Parameters
  • policy: [in] The distribution policy used to decide where to place the newly created.

  • count: [in] The number of component instances to create

  • vs: [in] Any number of arbitrary arguments (passed by value, by const reference or by rvalue reference) which will be forwarded to the constructor of the created component instance.

namespace components

Functions

template<typename Component>
future<naming::id_type> migrate_from_storage(naming::id_type const &to_resurrect, naming::id_type const &target = naming::invalid_id)

Migrate the component with the given id from the specified target storage (resurrect the object)

The function migrate_from_storage<Component> will migrate the component referenced by to_resurrect from the storage facility specified where the object is currently stored on. It returns a future referring to the migrated component instance. The component instance is resurrected on the locality specified by target_locality.

Return

A future representing the global id of the migrated component instance. This should be the same as to_resurrect.

Parameters
  • to_resurrect: [in] The global id of the component to migrate.

  • target: [in] The optional locality to resurrect the object on. By default the object is resurrected on the locality it was located on last.

Template Parameters
  • The: only template argument specifies the component type of the component to migrate from the given storage facility.

template<typename Component>
future<naming::id_type> migrate_to_storage(naming::id_type const &to_migrate, naming::id_type const &target_storage)

Migrate the component with the given id to the specified target storage

The function migrate_to_storage<Component> will migrate the component referenced by to_migrate to the storage facility specified with target_storage. It returns a future referring to the migrated component instance.

Return

A future representing the global id of the migrated component instance. This should be the same as migrate_to.

Parameters
  • to_migrate: [in] The global id of the component to migrate.

  • target_storage: [in] The id of the storage facility to migrate this object to.

Template Parameters
  • The: only template argument specifies the component type of the component to migrate to the given storage facility.

template<typename Derived, typename Stub>
Derived migrate_to_storage(client_base<Derived, Stub> const &to_migrate, hpx::components::component_storage const &target_storage)

Migrate the given component to the specified target storage

The function migrate_to_storage will migrate the component referenced by to_migrate to the storage facility specified with target_storage. It returns a future referring to the migrated component instance.

Return

A client side representation of representing of the migrated component instance. This should be the same as migrate_to.

Parameters
  • to_migrate: [in] The client side representation of the component to migrate.

  • target_storage: [in] The id of the storage facility to migrate this object to.

template<typename Component>
future<naming::id_type> copy(naming::id_type const &to_copy)

Copy given component to the specified target locality.

The function copy<Component> will create a copy of the component referenced by to_copy on the locality specified with target_locality. It returns a future referring to the newly created component instance.

Return

A future representing the global id of the newly (copied) component instance.

Note

The new component instance is created on the locality of the component instance which is to be copied.

Parameters
  • to_copy: [in] The global id of the component to copy

Template Parameters
  • The: only template argument specifies the component type to create.

template<typename Component>
future<naming::id_type> copy(naming::id_type const &to_copy, naming::id_type const &target_locality)

Copy given component to the specified target locality.

The function copy<Component> will create a copy of the component referenced by to_copy on the locality specified with target_locality. It returns a future referring to the newly created component instance.

Return

A future representing the global id of the newly (copied) component instance.

Parameters
  • to_copy: [in] The global id of the component to copy

  • target_locality: [in ] The locality where the copy should be created.

Template Parameters
  • The: only template argument specifies the component type to create.

template<typename Derived, typename Stub>
Derived copy(client_base<Derived, Stub> const &to_copy, naming::id_type const &target_locality = naming::invalid_id)

Copy given component to the specified target locality.

The function copy will create a copy of the component referenced by the client side object to_copy on the locality specified with target_locality. It returns a new client side object future referring to the newly created component instance.

Return

A future representing the global id of the newly (copied) component instance.

Note

If the second argument is omitted (or is invalid_id) the new component instance is created on the locality of the component instance which is to be copied.

Parameters
  • to_copy: [in] The client side object representing the component to copy

  • target_locality: [in, optional] The locality where the copy should be created (default is same locality as source).

Template Parameters
  • The: only template argument specifies the component type to create.

template<typename Component, typename DistPolicy>
future<naming::id_type> migrate(naming::id_type const &to_migrate, DistPolicy const &policy)

Migrate the given component to the specified target locality

The function migrate<Component> will migrate the component referenced by to_migrate to the locality specified with target_locality. It returns a future referring to the migrated component instance.

Return

A future representing the global id of the migrated component instance. This should be the same as migrate_to.

Parameters
  • to_migrate: [in] The client side representation of the component to migrate.

  • policy: [in] A distribution policy which will be used to determine the locality to migrate this object to.

Template Parameters
  • Component: Specifies the component type of the component to migrate.

  • DistPolicy: Specifies the distribution policy to use to determine the destination locality.

template<typename Derived, typename Stub, typename DistPolicy>
Derived migrate(client_base<Derived, Stub> const &to_migrate, DistPolicy const &policy)

Migrate the given component to the specified target locality

The function migrate<Component> will migrate the component referenced by to_migrate to the locality specified with target_locality. It returns a future referring to the migrated component instance.

Return

A future representing the global id of the migrated component instance. This should be the same as migrate_to.

Parameters
  • to_migrate: [in] The client side representation of the component to migrate.

  • policy: [in] A distribution policy which will be used to determine the locality to migrate this object to.

Template Parameters
  • Derived: Specifies the component type of the component to migrate.

  • DistPolicy: Specifies the distribution policy to use to determine the destination locality.

template<typename Component>
future<naming::id_type> migrate(naming::id_type const &to_migrate, naming::id_type const &target_locality)

Migrate the component with the given id to the specified target locality

The function migrate<Component> will migrate the component referenced by to_migrate to the locality specified with target_locality. It returns a future referring to the migrated component instance.

Return

A future representing the global id of the migrated component instance. This should be the same as migrate_to.

Parameters
  • to_migrate: [in] The global id of the component to migrate.

  • target_locality: [in] The locality where the component should be migrated to.

Template Parameters
  • Component: Specifies the component type of the component to migrate.

template<typename Derived, typename Stub>
Derived migrate(client_base<Derived, Stub> const &to_migrate, naming::id_type const &target_locality)

Migrate the given component to the specified target locality

The function migrate<Component> will migrate the component referenced by to_migrate to the locality specified with target_locality. It returns a future referring to the migrated component instance.

Return

A client side representation of representing of the migrated component instance. This should be the same as migrate_to.

Parameters
  • to_migrate: [in] The client side representation of the component to migrate.

  • target_locality: [in] The id of the locality to migrate this object to.

Template Parameters
  • Derived: Specifies the component type of the component to migrate.

Variables

char const *const default_binpacking_counter_name = "/runtime{locality/total}/count/component@"
binpacking_distribution_policy const binpacked

A predefined instance of the binpacking distribution_policy. It will represent the local locality and will place all items to create here.

colocating_distribution_policy const colocated

A predefined instance of the co-locating distribution_policy. It will represent the local locality and will place all items to create here.

default_distribution_policy const default_layout = {}

A predefined instance of the default distribution_policy. It will represent the local locality and will place all items to create here.

namespace naming

Functions

id_type unmanaged(id_type const &id)

The helper function hpx::unmanaged can be used to generate a global identifier which does not participate in the automatic garbage collection.

Return

This function returns a new global id referencing the same object as the parameter id. The only difference is that the returned global identifier does not participate in the automatic garbage collection.

Note

This function allows to apply certain optimizations to the process of memory management in HPX. It however requires the user to take full responsibility for keeping the referenced objects alive long enough.

Parameters
  • id: [in] The id to generated the unmanaged global id from This parameter can be itself a managed or a unmanaged global id.

file migrate_from_storage.hpp
#include <hpx/config.hpp>#include <hpx/components_base/traits/is_component.hpp>#include <hpx/futures/future.hpp>#include <hpx/runtime/naming/id_type.hpp>#include <hpx/modules/memory.hpp>#include <hpx/runtime/naming_fwd.hpp>#include <hpx/modules/naming_base.hpp>#include <hpx/runtime/agas_fwd.hpp>#include <hpx/functional/function.hpp>#include <hpx/runtime_configuration/agas_service_mode.hpp>#include <cstdint>#include <string>#include <hpx/serialization/serialization_fwd.hpp>#include <iosfwd>#include <utility>#include <hpx/config/warnings_prefix.hpp>#include <hpx/config/warnings_suffix.hpp>#include <hpx/components/component_storage/server/migrate_from_storage.hpp>#include <type_traits>
file migrate_to_storage.hpp
#include <hpx/config.hpp>#include <hpx/components_base/traits/is_component.hpp>#include <hpx/futures/future.hpp>#include <hpx/runtime/components/client_base.hpp>#include <hpx/actions_base/traits/action_remote_result.hpp>#include <hpx/assert.hpp>#include <hpx/functional/bind_back.hpp>#include <hpx/futures/traits/acquire_future.hpp>#include <hpx/futures/traits/future_access.hpp>#include <hpx/futures/traits/future_traits.hpp>#include <hpx/futures/traits/is_future.hpp>#include <hpx/memory/intrusive_ptr.hpp>#include <hpx/modules/errors.hpp>#include <hpx/modules/memory.hpp>#include <hpx/runtime/agas/interface.hpp>#include <hpx/runtime/components/component_type.hpp>#include <hpx/functional/unique_function.hpp>#include <hpx/preprocessor/cat.hpp>#include <hpx/preprocessor/expand.hpp>#include <hpx/preprocessor/nargs.hpp>#include <hpx/preprocessor/stringize.hpp>#include <hpx/preprocessor/strip_parens.hpp>#include <hpx/runtime/naming_fwd.hpp>#include <hpx/thread_support/atomic_count.hpp>#include <hpx/traits/component_type_database.hpp>#include <cstdint>#include <hpx/type_support/decay.hpp>#include <string>#include <hpx/runtime/components_fwd.hpp>#include <hpx/traits/managed_component_policies.hpp>#include <hpx/type_support/always_void.hpp>#include <cstddef>#include <hpx/async_base/launch_policy.hpp>#include <hpx/runtime/naming/name.hpp>#include <hpx/allocator_support/internal_allocator.hpp>#include <hpx/execution_base/register_locks.hpp>#include <hpx/execution_base/this_thread.hpp>#include <hpx/concurrency/spinlock_pool.hpp>#include <hpx/futures/traits/get_remote_result.hpp>#include <hpx/futures/traits/promise_local_result.hpp>#include <hpx/modules/itt_notify.hpp>#include <hpx/runtime/naming/id_type.hpp>#include <hpx/serialization/serialization_fwd.hpp>#include <hpx/serialization/traits/is_bitwise_serializable.hpp>#include <functional>#include <iosfwd>#include <mutex>#include <vector>#include <hpx/config/warnings_prefix.hpp>#include <hpx/runtime/naming/id_type_impl.hpp>#include <hpx/config/warnings_suffix.hpp>#include <boost/dynamic_bitset.hpp>#include <map>#include <utility>#include <hpx/runtime/components/make_client.hpp>#include <hpx/traits/is_client.hpp>#include <type_traits>#include <hpx/runtime/components/stubs/stub_base.hpp>#include <hpx/async_distributed/detail/async_colocated_fwd.hpp>#include <hpx/async_distributed/detail/async_implementations_fwd.hpp>#include <hpx/async_local/async_fwd.hpp>#include <hpx/runtime/naming/unmanaged.hpp>#include <hpx/serialization/serialize.hpp>#include <exception>#include <hpx/components/component_storage/component_storage.hpp>#include <hpx/components/component_storage/server/migrate_to_storage.hpp>
file basename_registration_fwd.hpp
#include <hpx/config.hpp>#include <hpx/components_fwd.hpp>#include <hpx/futures/future_fwd.hpp>#include <hpx/runtime/components/make_client.hpp>#include <hpx/runtime/naming/id_type.hpp>#include <cstddef>#include <string>#include <utility>#include <vector>
file binpacking_distribution_policy.hpp
#include <hpx/config.hpp>#include <hpx/assert.hpp>#include <hpx/async_distributed/dataflow.hpp>#include <hpx/futures/future.hpp>#include <hpx/performance_counters/performance_counter.hpp>#include <hpx/runtime/components/component_type.hpp>#include <hpx/runtime/components/stubs/stub_base.hpp>#include <hpx/runtime/find_here.hpp>#include <hpx/modules/errors.hpp>#include <hpx/runtime/naming/id_type.hpp>#include <hpx/runtime/naming/name.hpp>#include <hpx/serialization/serialization_fwd.hpp>#include <hpx/serialization/string.hpp>#include <hpx/serialization/vector.hpp>#include <hpx/traits/is_distribution_policy.hpp>#include <cstddef>#include <type_traits>#include <hpx/functional/bind_back.hpp>#include <hpx/pack_traversal/unwrap.hpp>#include <algorithm>#include <cstdint>#include <iterator>#include <string>#include <utility>#include <vector>
file colocating_distribution_policy.hpp
#include <hpx/config.hpp>#include <hpx/actions_base/traits/extract_action.hpp>#include <hpx/async_base/launch_policy.hpp>#include <hpx/async_distributed/applier/detail/apply_colocated_callback_fwd.hpp>#include <hpx/async_distributed/applier/detail/apply_colocated_fwd.hpp>#include <hpx/async_distributed/applier/detail/apply_implementations.hpp>#include <hpx/async_distributed/detail/async_colocated.hpp>#include <hpx/async_distributed/detail/async_colocated_callback.hpp>#include <hpx/async_distributed/detail/async_implementations.hpp>#include <hpx/futures/future.hpp>#include <hpx/futures/traits/promise_local_result.hpp>#include <hpx/runtime/components/client_base.hpp>#include <hpx/runtime/components/stubs/stub_base.hpp>#include <hpx/runtime/find_here.hpp>#include <hpx/runtime/naming/id_type.hpp>#include <hpx/runtime/naming/name.hpp>#include <hpx/serialization/serialization_fwd.hpp>#include <hpx/traits/is_distribution_policy.hpp>#include <algorithm>#include <cstddef>#include <type_traits>#include <utility>#include <vector>
file component_factory.hpp

Defines

HPX_REGISTER_COMPONENT(type, name, mode)

Define a component factory for a component type.

This macro is used create and to register a minimal component factory for a component type which allows it to be remotely created using the hpx::new_<> function.

This macro can be invoked with one, two or three arguments

Parameters
  • type: The type parameter is a (fully decorated) type of the component type for which a factory should be defined.

  • name: The name parameter specifies the name to use to register the factory. This should uniquely (system-wide) identify the component type. The name parameter must conform to the C++ identifier rules (without any namespace). If this parameter is not given, the first parameter is used.

  • mode: The mode parameter has to be one of the defined enumeration values of the enumeration hpx::components::factory_state_enum. The default for this parameter is hpx::components::factory_enabled.

file copy_component.hpp
#include <hpx/config.hpp>#include <hpx/actions_base/plain_action.hpp>#include <hpx/async_distributed/async.hpp>#include <hpx/async_distributed/detail/async_colocated.hpp>#include <hpx/components_base/traits/is_component.hpp>#include <hpx/futures/future.hpp>#include <hpx/runtime/components/server/copy_component.hpp>#include <hpx/runtime/components/stubs/runtime_support.hpp>#include <hpx/modules/errors.hpp>#include <hpx/async_distributed/detail/async_colocated_fwd.hpp>#include <hpx/runtime/components/component_type.hpp>#include <hpx/runtime/components/server/runtime_support.hpp>#include <hpx/actions/base_action.hpp>#include <hpx/actions/transfer_action.hpp>#include <hpx/actions/transfer_continuation_action.hpp>#include <hpx/actions_base/component_action.hpp>#include <hpx/assert.hpp>#include <hpx/modules/plugin.hpp>#include <hpx/modules/program_options.hpp>#include <hpx/performance_counters/counters.hpp>#include <hpx/plugins/plugin_factory_base.hpp>#include <hpx/runtime_configuration/plugin_registry_base.hpp>#include <hpx/runtime_configuration/ini.hpp>#include <hpx/type_support/pack.hpp>#include <hpx/runtime/components/server/create_component.hpp>#include <hpx/runtime/components/server/create_component_fwd.hpp>#include <hpx/runtime/naming/address.hpp>#include <cstddef>#include <cstdint>#include <utility>#include <vector>#include <hpx/runtime/components/server/component_heap.hpp>#include <hpx/static_reinit/reinitializable_static.hpp>#include <sstream>#include <hpx/runtime/find_here.hpp>#include <hpx/runtime/parcelset/locality.hpp>#include <hpx/runtime/parcelset_fwd.hpp>#include <hpx/serialization/map.hpp>#include <hpx/serialization/serialization_fwd.hpp>#include <hpx/iterator_support/traits/is_iterator.hpp>#include <map>#include <memory>#include <string>#include <type_traits>#include <hpx/config/warnings_prefix.hpp>#include <hpx/config/warnings_suffix.hpp>#include <hpx/runtime_configuration/static_factory_data.hpp>#include <hpx/synchronization/condition_variable.hpp>#include <hpx/synchronization/mutex.hpp>#include <hpx/synchronization/spinlock.hpp>#include <hpx/traits/action_does_termination_detection.hpp>#include <atomic>#include <condition_variable>#include <list>#include <mutex>#include <set>#include <thread>#include <hpx/runtime/naming/name.hpp>#include <hpx/serialization/vector.hpp>#include <hpx/type_support/decay.hpp>#include <hpx/runtime/get_ptr.hpp>#include <hpx/async_base/launch_policy.hpp>#include <hpx/components_base/get_lva.hpp>#include <hpx/components_base/traits/component_pin_support.hpp>#include <hpx/functional/bind_back.hpp>#include <hpx/runtime/agas/gva.hpp>#include <hpx/runtime/components/client_base.hpp>#include <hpx/runtime_fwd.hpp>#include <hpx/traits/component_type_is_compatible.hpp>#include <hpx/futures/traits/get_remote_result.hpp>
file default_distribution_policy.hpp
#include <hpx/config.hpp>#include <hpx/actions_base/actions_base_support.hpp>#include <hpx/actions_base/traits/extract_action.hpp>#include <hpx/assert.hpp>#include <hpx/async_base/launch_policy.hpp>#include <hpx/async_distributed/applier/apply.hpp>#include <hpx/async_distributed/dataflow.hpp>#include <hpx/futures/future.hpp>#include <hpx/futures/traits/promise_local_result.hpp>#include <hpx/lcos/packaged_action.hpp>#include <hpx/actions_base/traits/action_priority.hpp>#include <hpx/allocator_support/internal_allocator.hpp>#include <hpx/async_distributed/applier/apply_callback.hpp>#include <hpx/lcos/promise.hpp>#include <hpx/memory/intrusive_ptr.hpp>#include <hpx/modules/errors.hpp>#include <hpx/modules/memory.hpp>#include <hpx/runtime/components/component_type.hpp>#include <hpx/traits/action_was_object_migrated.hpp>#include <hpx/components_base/pinned_ptr.hpp>#include <hpx/runtime/naming/id_type.hpp>#include <hpx/type_support/detail/wrap_int.hpp>#include <type_traits>#include <utility>#include <hpx/traits/component_supports_migration.hpp>#include <hpx/traits/component_type_is_compatible.hpp>#include <boost/asio/error.hpp>#include <exception>#include <memory>#include <hpx/modules/execution.hpp>#include <hpx/runtime/components/stubs/stub_base.hpp>#include <hpx/runtime/find_here.hpp>#include <hpx/runtime/naming/name.hpp>#include <hpx/serialization/serialization_fwd.hpp>#include <hpx/serialization/shared_ptr.hpp>#include <hpx/serialization/vector.hpp>#include <hpx/traits/is_distribution_policy.hpp>#include <algorithm>#include <cstddef>#include <vector>
file migrate_component.hpp
#include <hpx/config.hpp>#include <hpx/actions_base/plain_action.hpp>#include <hpx/async_distributed/async.hpp>#include <hpx/async_distributed/detail/async_colocated.hpp>#include <hpx/components_base/traits/is_component.hpp>#include <hpx/futures/future.hpp>#include <hpx/runtime/components/client_base.hpp>#include <hpx/runtime/components/server/migrate_component.hpp>#include <hpx/runtime/agas/interface.hpp>#include <hpx/runtime/components/stubs/runtime_support.hpp>#include <hpx/runtime/get_ptr.hpp>#include <hpx/runtime/naming/name.hpp>#include <hpx/traits/component_supports_migration.hpp>#include <cstdint>#include <memory>#include <utility>#include <hpx/runtime/components/target_distribution_policy.hpp>#include <hpx/actions_base/actions_base_support.hpp>#include <hpx/actions_base/traits/extract_action.hpp>#include <hpx/async_base/launch_policy.hpp>#include <hpx/async_distributed/applier/detail/apply_implementations_fwd.hpp>#include <hpx/async_distributed/dataflow.hpp>#include <hpx/async_distributed/detail/async_implementations_fwd.hpp>#include <hpx/futures/traits/promise_local_result.hpp>#include <hpx/lcos/packaged_action.hpp>#include <hpx/runtime/components/stubs/stub_base.hpp>#include <hpx/runtime/find_here.hpp>#include <hpx/runtime/naming/id_type.hpp>#include <hpx/serialization/serialization_fwd.hpp>#include <hpx/traits/is_distribution_policy.hpp>#include <algorithm>#include <cstddef>#include <type_traits>#include <vector>
file new.hpp
#include <hpx/config.hpp>#include <hpx/async_base/launch_policy.hpp>#include <hpx/components_base/traits/is_component.hpp>#include <hpx/futures/future.hpp>#include <hpx/runtime/components/client_base.hpp>#include <hpx/runtime/components/default_distribution_policy.hpp>#include <hpx/actions_base/actions_base_support.hpp>#include <hpx/actions_base/traits/extract_action.hpp>#include <hpx/assert.hpp>#include <hpx/async_distributed/applier/apply.hpp>#include <hpx/async_distributed/dataflow.hpp>#include <hpx/futures/traits/promise_local_result.hpp>#include <hpx/lcos/packaged_action.hpp>#include <hpx/modules/execution.hpp>#include <hpx/runtime/components/stubs/stub_base.hpp>#include <hpx/runtime/find_here.hpp>#include <hpx/runtime/naming/id_type.hpp>#include <hpx/runtime/naming/name.hpp>#include <hpx/serialization/serialization_fwd.hpp>#include <hpx/serialization/shared_ptr.hpp>#include <hpx/serialization/vector.hpp>#include <hpx/traits/is_distribution_policy.hpp>#include <algorithm>#include <cstddef>#include <memory>#include <type_traits>#include <utility>#include <vector>#include <hpx/runtime/components/server/create_component.hpp>#include <hpx/traits/is_client.hpp>#include <hpx/type_support/lazy_enable_if.hpp>
file find_here.hpp
#include <hpx/config.hpp>#include <hpx/modules/errors.hpp>#include <hpx/runtime/naming/id_type.hpp>
file find_localities.hpp
#include <hpx/config.hpp>#include <hpx/modules/errors.hpp>#include <hpx/runtime/components/component_type.hpp>#include <hpx/runtime/naming/id_type.hpp>#include <vector>
file get_colocation_id.hpp
#include <hpx/async_base/launch_policy.hpp>#include <hpx/futures/future_fwd.hpp>#include <hpx/modules/errors.hpp>#include <hpx/runtime/naming/id_type.hpp>
file get_locality_name.hpp
#include <hpx/config.hpp>#include <hpx/modules/futures.hpp>#include <hpx/runtime/naming/id_type.hpp>#include <string>
file get_ptr.hpp
#include <hpx/config.hpp>#include <hpx/assert.hpp>#include <hpx/async_base/launch_policy.hpp>#include <hpx/components_base/get_lva.hpp>#include <hpx/components_base/traits/component_pin_support.hpp>#include <hpx/functional/bind_back.hpp>#include <hpx/modules/errors.hpp>#include <hpx/runtime/agas/gva.hpp>#include <hpx/runtime/components/component_type.hpp>#include <hpx/runtime/naming/name.hpp>#include <hpx/util/ios_flags_saver.hpp>#include <cstdint>#include <hpx/runtime/components/client_base.hpp>#include <hpx/runtime/naming/address.hpp>#include <hpx/runtime/naming_fwd.hpp>#include <hpx/serialization/serialization_fwd.hpp>#include <hpx/serialization/traits/is_bitwise_serializable.hpp>#include <iosfwd>#include <hpx/config/warnings_prefix.hpp>#include <hpx/config/warnings_suffix.hpp>#include <hpx/runtime_fwd.hpp>#include <hpx/runtime_local/runtime_local_fwd.hpp>#include <hpx/traits/component_type_is_compatible.hpp>#include <memory>
file unmanaged.hpp
#include <hpx/config.hpp>#include <hpx/runtime/naming/name.hpp>
file set_parcel_write_handler.hpp
#include <hpx/config.hpp>
file trigger_lco.hpp
#include <hpx/config.hpp>#include <hpx/actions/actions_fwd.hpp>#include <hpx/actions_base/action_priority.hpp>#include <hpx/actions_base/continuation_fwd.hpp>#include <hpx/assert.hpp>#include <hpx/async_distributed/applier/detail/apply_implementations_fwd.hpp>#include <hpx/lcos_fwd.hpp>#include <hpx/components_base/traits/is_component.hpp>#include <hpx/futures/future_fwd.hpp>#include <hpx/futures/traits/promise_local_result.hpp>#include <hpx/futures/traits/promise_remote_result.hpp>#include <vector>#include <hpx/runtime/naming/address.hpp>#include <hpx/runtime/naming/id_type.hpp>#include <hpx/runtime/naming/name.hpp>#include <hpx/type_support/decay.hpp>#include <exception>#include <type_traits>#include <utility>
file runtime_fwd.hpp
#include <hpx/config.hpp>#include <hpx/runtime_local/runtime_local_fwd.hpp>
dir /hpx/source/components/component_storage
dir /hpx/source/components/component_storage/include/hpx/components/component_storage
dir /hpx/source/hpx/runtime/components
dir /hpx/source/components/component_storage/include/hpx/components
dir /hpx/source/components
dir /hpx/source/hpx
dir /hpx/source/components/component_storage/include/hpx
dir /hpx/source/components/component_storage/include
dir /hpx/source/hpx/runtime/naming
dir /hpx/source/hpx/runtime
dir /hpx/source