hpx/naming_base/gid_type.hpp

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

Defines

HPX_GIDTYPE_VERSION
template<>
struct hash<hpx::naming::gid_type>

Public Functions

std::size_t operator()(::hpx::naming::gid_type const &gid) const
namespace hpx
namespace naming

Functions

gid_type operator+(gid_type const &lhs, gid_type const &rhs)
gid_type operator-(gid_type const &lhs, gid_type const &rhs)
void save(serialization::output_archive &ar, gid_type const&, unsigned int)
void load(serialization::input_archive &ar, gid_type&, unsigned int version)
gid_type get_gid_from_locality_id(std::uint32_t locality_id)
std::uint32_t get_locality_id_from_gid(std::uint64_t msb)
std::uint32_t get_locality_id_from_gid(gid_type const &id)
gid_type get_locality_from_gid(gid_type const &id)
bool is_locality(gid_type const &gid)
std::uint64_t replace_locality_id(std::uint64_t msb, std::uint32_t locality_id)
gid_type replace_locality_id(gid_type const &gid, std::uint32_t locality_id)
constexpr bool refers_to_virtual_memory(std::uint64_t msb)
constexpr bool refers_to_virtual_memory(gid_type const &gid)
constexpr bool refers_to_local_lva(gid_type const &gid)
gid_type replace_component_type(gid_type const &gid, std::uint32_t type)
std::ostream &operator<<(std::ostream &os, gid_type const &id)

Variables

constexpr const gid_type invalid_gid = {}
struct gid_type
#include <gid_type.hpp>

Global identifier for components across the HPX system.

Subclassed by hpx::naming::detail::id_type_impl

Public Types

using size_type = gid_type
using difference_type = gid_type
using mutex_type = gid_type

Public Functions

constexpr gid_type()
constexpr gid_type(std::uint64_t lsb_id)
gid_type(void *lsb_id)
constexpr gid_type(std::uint64_t msb_id, std::uint64_t lsb_id)
gid_type(std::uint64_t msb_id, void *lsb_id)
constexpr gid_type(gid_type const &rhs)
constexpr gid_type(gid_type &&rhs)
~gid_type()
gid_type &operator=(std::uint64_t lsb_id)
gid_type &operator=(gid_type const &rhs)
gid_type &operator=(gid_type &&rhs)
constexpr operator bool() const
gid_type &operator++()
gid_type operator++(int)
gid_type &operator--()
gid_type operator--(int)
gid_type operator+=(gid_type const &rhs)
gid_type operator+=(std::uint64_t rhs)
gid_type operator-=(gid_type const &rhs)
gid_type operator-=(std::uint64_t rhs)
constexpr std::uint64_t get_msb() const
constexpr void set_msb(std::uint64_t msb)
constexpr std::uint64_t get_lsb() const
constexpr void set_lsb(std::uint64_t lsb)
void set_lsb(void *lsb)
std::string to_string() const
void lock()
bool try_lock()
void unlock()
mutex_type &get_mutex() const

Public Static Attributes

constexpr std::uint64_t credit_base_mask = 0x1full
constexpr std::uint16_t credit_shift = 24
constexpr std::uint64_t credit_mask = credit_base_mask << credit_shift
constexpr std::uint64_t was_split_mask = 0x80000000ull
constexpr std::uint64_t has_credits_mask = 0x40000000ull
constexpr std::uint64_t is_locked_mask = 0x20000000ull
constexpr std::uint64_t locality_id_mask = 0xffffffff00000000ull
constexpr std::uint16_t locality_id_shift = 32
constexpr std::uint64_t virtual_memory_mask = 0x3fffffull
constexpr std::uint64_t dont_cache_mask = 0x800000ull
constexpr std::uint64_t is_migratable = 0x400000ull
constexpr std::uint64_t dynamically_assigned = 0x1ull
constexpr std::uint64_t component_type_base_mask = 0xfffffull
constexpr std::uint64_t component_type_shift = 1ull
constexpr std::uint64_t component_type_mask = component_type_base_mask << component_type_shift
constexpr std::uint64_t credit_bits_mask = credit_mask | was_split_mask | has_credits_mask
constexpr std::uint64_t internal_bits_mask = credit_bits_mask | is_locked_mask | dont_cache_mask | is_migratable
constexpr std::uint64_t special_bits_mask = locality_id_mask | internal_bits_mask | component_type_mask

Private Types

using spinlock_pool = util::spinlock_pool<gid_type>

Private Functions

bool acquire_lock()
void relinquish_lock()
constexpr bool is_locked() const

Private Members

std::uint64_t id_msb_ = 0
std::uint64_t id_lsb_ = 0

Friends

gid_type operator+(gid_type const &lhs, gid_type const &rhs)
gid_type operator+(gid_type const &lhs, std::uint64_t rhs)
gid_type operator-(gid_type const &lhs, gid_type const &rhs)
gid_type operator-(gid_type const &lhs, std::uint64_t rhs)
gid_type operator&(gid_type const &lhs, std::uint64_t rhs)
bool operator==(gid_type const &lhs, gid_type const &rhs)
bool operator!=(gid_type const &lhs, gid_type const &rhs)
bool operator<(gid_type const &lhs, gid_type const &rhs)
bool operator>=(gid_type const &lhs, gid_type const &rhs)
bool operator<=(gid_type const &lhs, gid_type const &rhs)
bool operator>(gid_type const &lhs, gid_type const &rhs)
std::ostream &operator<<(std::ostream &os, gid_type const &id)
void save(serialization::output_archive &ar, gid_type const&, unsigned int)
void load(serialization::input_archive &ar, gid_type&, unsigned int version)
namespace std
template<>
struct hash<hpx::naming::gid_type>

Public Functions

std::size_t operator()(::hpx::naming::gid_type const &gid) const