hpx/agas_base/agas_fwd.hpp#

Defined in header hpx/agas_base/agas_fwd.hpp.

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

namespace hpx
namespace agas

Typedefs

using iterate_types_function_type = hpx::function<void(std::string const&, components::component_type), true>#

Functions

std::string service_name_prefix()#

Returns service_name with the id of the locality hosting the AGAS services substituted, i.e. “/0/agas/” unless this locality is connecting to a running application.

std::string service_instance_name(char const *servicename, char const *namespace_service_name)#

Returns the name one AGAS namespace service is registered under: the prefix returned by service_name_prefix followed by servicename and the service name of the namespace itself (one of agas::server::primary_namespace_service_name and friends).

hpx::chrono::steady_duration get_rpc_timeout() noexcept#

Get the currently configured timeout for AGAS RPC operations.

bool set_rpc_timeout(hpx::chrono::steady_duration const &timeout) noexcept#

Set the timeout for AGAS RPC operations.

Parameters:

timeout – The new duration for AGAS RPC timeouts.

Returns:

true if timeout is strictly positive and set successfully, false otherwise.

Variables

constexpr char const *const service_name = "/{}/agas/"#
constexpr std::uint64_t booststrap_prefix = 0ULL#
constexpr std::uint64_t primary_ns_msb = 0x100000001ULL#
constexpr std::uint64_t primary_ns_lsb = 0x000000001ULL#
constexpr std::uint64_t component_ns_msb = 0x100000001ULL#
constexpr std::uint64_t component_ns_lsb = 0x000000002ULL#
constexpr std::uint64_t symbol_ns_msb = 0x100000001ULL#
constexpr std::uint64_t symbol_ns_lsb = 0x000000003ULL#
constexpr std::uint64_t locality_ns_msb = 0x100000001ULL#
constexpr std::uint64_t locality_ns_lsb = 0x000000004ULL#
namespace server#

AGAS’s primary namespace maps 128-bit global identifiers (GIDs) to resolved addresses.

The following is the canonical description of the partitioning of AGAS’s primary namespace.

|-----MSB------||------LSB-----|
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
|prefix||RC||----identifier----|

MSB        - Most significant bits (bit 64 to bit 127)
LSB        - Least significant bits (bit 0 to bit 63)
prefix     - Highest 32 bits (bit 96 to bit 127) of the MSB. Each
             locality is assigned a prefix. This creates a 96-bit
             address space for each locality.
RC         - Bit 88 to bit 92 of the MSB. This is the log2 of the number
             of reference counting credits on the GID.
             Bit 93 is used by the locking scheme for gid_types.
             Bit 94 is a flag which is set if the credit value is valid.
             Bit 95 is a flag that is set if a GID's credit count is
             ever split (e.g. if the GID is ever passed to another
             locality).
           - Bit 87 marks the gid such that it will not be stored in
             any of the AGAS caches. This is used mainly for ids
             which represent 'one-shot' objects (like promises).
identifier - Bit 64 to bit 86 of the MSB, and the entire LSB. The
             content of these bits depends on the component type of
             the underlying object. For all user-defined components,
             these bits contain a unique 88-bit number which is
             assigned sequentially for each locality. For
             \a hpx#components#component_enum_type#runtime_support
             the high 24 bits are zeroed and the low 64 bits hold the
             LVA of the component.
The following address ranges are reserved. Some are either explicitly or implicitly protected by AGAS. The letter x represents a single-byte wild card.
00000000xxxxxxxxxxxxxxxxxxxxxxxx
    Historically unused address space reserved for future use.
xxxxxxxxxxxx0000xxxxxxxxxxxxxxxx
    Address space for LVA-encoded GIDs.
00000001xxxxxxxxxxxxxxxxxxxxxxxx
    Prefix of the bootstrap AGAS locality.
00000001000000010000000000000001
    Address of the primary_namespace component on the bootstrap AGAS
    locality.
00000001000000010000000000000002
    Address of the component_namespace component on the bootstrap AGAS
    locality.
00000001000000010000000000000003
    Address of the symbol_namespace component on the bootstrap AGAS
    locality.
00000001000000010000000000000004
    Address of the locality_namespace component on the bootstrap AGAS
    locality.

Note

The layout of the address space is implementation defined, and subject to change. Never write application code that relies on the internal layout of GIDs. AGAS only guarantees that all assigned GIDs will be unique.

namespace components

Typedefs

using component_type = std::int32_t#