lcos_distributed

The contents of this module can be included with the header hpx/modules/lcos_distributed.hpp. These headers may be used by user-code but are not guaranteed stable (neither header location nor contents). You are using these at your own risk. If you wish to use non-public functionality from a module we strongly suggest only including the module header hpx/modules/lcos_distributed.hpp, not the particular header in which the functionality you would like to use is defined. See Public API for a list of names that are part of the public HPX API.

namespace hpx
namespace lcos
template<typename T>
class channel

Public Types

template<>
using value_type = T

Public Functions

channel()
channel(naming::id_type const &loc)
channel(hpx::future<naming::id_type> &&id)
channel(hpx::shared_future<naming::id_type> &&id)
channel(hpx::shared_future<naming::id_type> const &id)
hpx::future<T> get(launch::async_policy, std::size_t generation = default_generation) const
hpx::future<T> get(std::size_t generation = default_generation) const
T get(launch::sync_policy, std::size_t generation = default_generation, hpx::error_code &ec = hpx::throws) const
T get(launch::sync_policy, hpx::error_code &ec, std::size_t generation = default_generation) const
template<typename U, typename U2 = T>
std::enable_if_t<!std::is_void<U2>::value, bool> set(launch::apply_policy, U val, std::size_t generation = default_generation)
template<typename U, typename U2 = T>
std::enable_if_t<!std::is_void<U2>::value, hpx::future<void>> set(launch::async_policy, U val, std::size_t generation = default_generation)
template<typename U, typename U2 = T>
std::enable_if_t<!std::is_void<U2>::value> set(launch::sync_policy, U val, std::size_t generation = default_generation)
template<typename U, typename U2 = T>
std::enable_if_t<!std::is_void<U2>::value && !traits::is_launch_policy<U>::value> set(U val, std::size_t generation = default_generation)
template<typename U = T>
std::enable_if_t<std::is_void<U>::value, bool> set(launch::apply_policy, std::size_t generation = default_generation)
template<typename U = T>
std::enable_if_t<std::is_void<U>::value, hpx::future<void>> set(launch::async_policy, std::size_t generation = default_generation)
template<typename U = T>
std::enable_if_t<std::is_void<U>::value> set(launch::sync_policy, std::size_t generation = default_generation)
template<typename U = T>
std::enable_if_t<std::is_void<U>::value> set(std::size_t generation = default_generation)
void close(launch::apply_policy, bool force_delete_entries = false)
hpx::future<std::size_t> close(launch::async_policy, bool force_delete_entries = false)
std::size_t close(launch::sync_policy, bool force_delete_entries = false)
std::size_t close(bool force_delete_entries = false)
channel_iterator<T, channel<T>> begin() const
channel_iterator<T, channel<T>> end() const
channel_iterator<T, channel<T>> rbegin() const
channel_iterator<T, channel<T>> rend() const

Private Types

template<>
using base_type = components::client_base<channel<T>, lcos::server::channel<T>>

Private Static Attributes

constexpr std::size_t default_generation = std::size_t(-1)
template<typename T, typename Channel>
class channel_iterator : public hpx::util::iterator_facade<channel_iterator<T, Channel>, T const, std::input_iterator_tag>

Public Functions

channel_iterator()
channel_iterator(Channel const &c)

Private Types

template<>
using base_type = hpx::util::iterator_facade<channel_iterator<T, Channel>, T const, std::input_iterator_tag>

Private Functions

std::pair<T, bool> get_checked() const
bool equal(channel_iterator const &rhs) const
void increment()
base_type::reference dereference() const

Private Members

Channel const *channel_
std::pair<T, bool> data_

Friends

friend hpx::lcos::hpx::util::iterator_core_access
template<typename Channel>
class channel_iterator<void, Channel> : public hpx::util::iterator_facade<channel_iterator<void, Channel>, util::unused_type const, std::input_iterator_tag>

Public Functions

channel_iterator()
channel_iterator(Channel const &c)

Private Types

template<>
using base_type = hpx::util::iterator_facade<channel_iterator<void, Channel>, util::unused_type const, std::input_iterator_tag>

Private Functions

bool get_checked()
bool equal(channel_iterator const &rhs) const
void increment()
base_type::reference dereference() const

Private Members

Channel const *channel_
bool data_

Friends

friend hpx::lcos::hpx::util::iterator_core_access
template<typename T>
class receive_channel

Public Types

template<>
using value_type = T

Public Functions

receive_channel()
receive_channel(channel<T> const &c)
receive_channel(hpx::future<naming::id_type> &&id)
receive_channel(hpx::shared_future<naming::id_type> &&id)
receive_channel(hpx::shared_future<naming::id_type> const &id)
hpx::future<T> get(launch::async_policy, std::size_t generation = default_generation) const
hpx::future<T> get(std::size_t generation = default_generation) const
T get(launch::sync_policy, std::size_t generation = default_generation, hpx::error_code &ec = hpx::throws) const
T get(launch::sync_policy, hpx::error_code &ec, std::size_t generation = default_generation) const
channel_iterator<T, channel<T>> begin() const
channel_iterator<T, channel<T>> end() const
channel_iterator<T, channel<T>> rbegin() const
channel_iterator<T, channel<T>> rend() const

Private Types

template<>
using base_type = components::client_base<receive_channel<T>, lcos::server::channel<T>>

Private Static Attributes

constexpr std::size_t default_generation = std::size_t(-1)
template<typename T>
class send_channel

Public Types

template<>
using value_type = T

Public Functions

send_channel()
send_channel(channel<T> const &c)
send_channel(hpx::future<naming::id_type> &&id)
send_channel(hpx::shared_future<naming::id_type> &&id)
send_channel(hpx::shared_future<naming::id_type> const &id)
template<typename U, typename U2 = T>
std::enable_if_t<!std::is_void<U2>::value, bool> set(launch::apply_policy, U val, std::size_t generation = default_generation)
template<typename U, typename U2 = T>
std::enable_if_t<!std::is_void<U2>::value, hpx::future<void>> set(launch::async_policy, U val, std::size_t generation = default_generation)
template<typename U, typename U2 = T>
std::enable_if_t<!std::is_void<U2>::value> set(launch::sync_policy, U val, std::size_t generation = default_generation)
template<typename U, typename U2 = T>
std::enable_if_t<!std::is_void<U2>::value && !traits::is_launch_policy<U>::value> set(U val, std::size_t generation = default_generation)
template<typename U = T>
std::enable_if_t<std::is_void<U>::value, bool> set(launch::apply_policy, std::size_t generation = default_generation)
template<typename U = T>
std::enable_if_t<std::is_void<U>::value, hpx::future<void>> set(launch::async_policy, std::size_t generation = default_generation)
template<typename U = T>
std::enable_if_t<std::is_void<U>::value> set(launch::sync_policy, std::size_t generation = default_generation)
template<typename U = T>
std::enable_if_t<std::is_void<U>::value> set(std::size_t generation = default_generation)
void close(launch::apply_policy, bool force_delete_entries = false)
hpx::future<std::size_t> close(launch::async_policy, bool force_delete_entries = false)
std::size_t close(launch::sync_policy, bool force_delete_entries = false)
std::size_t close(bool force_delete_entries = false)

Private Types

template<>
using base_type = components::client_base<send_channel<T>, lcos::server::channel<T>>

Private Static Attributes

constexpr std::size_t default_generation = std::size_t(-1)
namespace hpx
namespace lcos
template<typename ValueType>
struct object_semaphore : public components::client_base<object_semaphore<ValueType>, lcos::server::object_semaphore<ValueType>>

Public Types

template<>
using server_type = lcos::server::object_semaphore<ValueType>
template<>
using base_type = components::client_base<object_semaphore, lcos::server::object_semaphore<ValueType>>

Public Functions

object_semaphore()
object_semaphore(naming::id_type gid)
lcos::future<void> signal(launch::async_policy, ValueType const &val, std::uint64_t count = 1)
void signal(launch::sync_policy, ValueType const &val, std::uint64_t count = 1)
lcos::future<ValueType> get(launch::async_policy)
ValueType get(launch::sync_policy)
future<void> abort_pending(launch::async_policy, error ec = no_success)
void abort_pending(launch::sync_policy, error = no_success)
void wait(launch::async_policy)
void wait(launch::sync_policy)

Defines

HPX_REGISTER_CHANNEL_DECLARATION(...)
HPX_REGISTER_CHANNEL_DECLARATION_(...)
HPX_REGISTER_CHANNEL_DECLARATION_1(type)
HPX_REGISTER_CHANNEL_DECLARATION_2(type, name)
HPX_REGISTER_CHANNEL(...)
HPX_REGISTER_CHANNEL_(...)
HPX_REGISTER_CHANNEL_1(type)
HPX_REGISTER_CHANNEL_2(type, name)
namespace hpx
namespace lcos
namespace server
template<typename T, typename RemoteType>
class channel

Public Types

template<>
using base_type_holder = lcos::base_lco_with_value<T, RemoteType, traits::detail::component_tag>
template<>
using wrapping_type = typename base_type::wrapping_type

Public Functions

channel()
void set_value(RemoteType &&result)
void set_exception(std::exception_ptr const&)
result_type get_value()
result_type get_value(error_code &ec)
hpx::future<T> get_generation(std::size_t generation)
HPX_DEFINE_COMPONENT_DIRECT_ACTION(channel, get_generation)
void set_generation(RemoteType &&value, std::size_t generation)
HPX_DEFINE_COMPONENT_DIRECT_ACTION(channel, set_generation)
std::size_t close(bool force_delete_entries)
HPX_DEFINE_COMPONENT_ACTION(channel, close)

Public Static Functions

static components::component_type get_component_type()
static void set_component_type(components::component_type type)

Private Types

template<>
using base_type = components::component_base<channel>
template<>
using result_type = std::conditional_t<std::is_void<T>::value, util::unused_type, T>

Private Members

lcos::local::channel<result_type> channel_
namespace hpx
namespace lcos
namespace server
template<typename ValueType>
struct object_semaphore : public components::managed_component_base<object_semaphore<ValueType>>

Public Types

template<>
using base_type = components::managed_component_base<object_semaphore>
template<>
using mutex_type = hpx::lcos::local::spinlock
template<>
using slist_option_type = boost::intrusive::member_hook<queue_thread_entry, typename queue_thread_entry::hook_type, &queue_thread_entry::slist_hook_>
template<>
using thread_queue_type = boost::intrusive::slist<queue_thread_entry, slist_option_type, boost::intrusive::cache_last<true>, boost::intrusive::constant_time_size<false>>
template<>
using value_slist_option_type = boost::intrusive::member_hook<queue_value_entry, typename queue_value_entry::hook_type, &queue_value_entry::slist_hook_>
template<>
using value_queue_type = boost::intrusive::slist<queue_value_entry, value_slist_option_type, boost::intrusive::cache_last<true>, boost::intrusive::constant_time_size<false>>

Public Functions

object_semaphore()
~object_semaphore()
void signal(ValueType const &val, std::uint64_t count)
void get(naming::id_type const &lco)
void abort_pending(error ec)
void wait()
HPX_DEFINE_COMPONENT_ACTION(object_semaphore, signal, signal_action)
HPX_DEFINE_COMPONENT_ACTION(object_semaphore, get, get_action)
HPX_DEFINE_COMPONENT_ACTION(object_semaphore, abort_pending, abort_pending_action)
HPX_DEFINE_COMPONENT_ACTION(object_semaphore, wait, wait_action)

Private Functions

void resume(std::unique_lock<mutex_type> &l)

Private Members

value_queue_type value_queue_
thread_queue_type thread_queue_
mutex_type mtx_
struct queue_thread_entry

Public Types

template<>
typedef boost::intrusive::slist_member_hook<boost::intrusive::link_mode<boost::intrusive::normal_link>> hook_type

Public Functions

template<>
queue_thread_entry(naming::id_type const &id)

Public Members

template<>
naming::id_type id_
template<>
hook_type slist_hook_
struct queue_value_entry

Public Types

template<>
typedef boost::intrusive::slist_member_hook<boost::intrusive::link_mode<boost::intrusive::normal_link>> hook_type

Public Functions

template<>
queue_value_entry(ValueType const &val, std::uint64_t count)

Public Members

template<>
ValueType val_
template<>
std::uint64_t count_
template<>
hook_type slist_hook_