lcos_local¶
The contents of this module can be included with the header
hpx/modules/lcos_local.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_local.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 -
namespace
local -
struct
and_gate: public hpx::lcos::local::base_and_gate<no_mutex>¶ Public Functions
-
template<typename
Lock>
future<void>get_future(Lock &l, std::size_t count = std::size_t(-1), std::size_t *generation_value = nullptr, error_code &ec = hpx::throws)¶
-
template<typename
Lock>
boolset(std::size_t which, Lock l, error_code &ec = throws)¶
-
template<typename
Lock>
voidsynchronize(std::size_t generation_value, Lock &l, char const *function_name = "and_gate::synchronize", error_code &ec = throws)¶
-
template<typename
-
template<typename
Mutex= lcos::local::spinlock>
structbase_and_gate¶ Public Functions
-
base_and_gate(std::size_t count = 0)¶ This constructor initializes the base_and_gate object from the the number of participants to synchronize the control flow with.
-
base_and_gate(base_and_gate &&rhs)¶
-
base_and_gate &
operator=(base_and_gate &&rhs)¶
-
future<void>
get_future(std::size_t count = std::size_t(-1), std::size_t *generation_value = nullptr, error_code &ec = hpx::throws)¶
-
bool
set(std::size_t which, error_code &ec = throws)¶
-
void
synchronize(std::size_t generation_value, char const *function_name = "base_and_gate<>::synchronize", error_code &ec = throws)¶ Wait for the generational counter to reach the requested stage.
Protected Types
-
typedef Mutex
mutex_type¶
Protected Functions
-
bool
trigger_conditions(error_code &ec = throws)¶
-
template<typename
OuterLock>
future<void>get_future(OuterLock &outer_lock, std::size_t count = std::size_t(-1), std::size_t *generation_value = nullptr, error_code &ec = hpx::throws)¶ get a future allowing to wait for the gate to fire
get a shared future allowing to wait for the gate to fire
-
template<typename
OuterLock>
boolset(std::size_t which, OuterLock outer_lock, error_code &ec = throws)¶ Set the data which has to go into the segment which.
-
template<typename
Lock>
voidsynchronize(std::size_t generation_value, Lock &l, char const *function_name = "base_and_gate<>::synchronize", error_code &ec = throws)¶
Private Types
-
typedef std::list<conditional_trigger*>
condition_list_type¶
-
struct
manage_condition¶ Public Functions
-
template<>
manage_condition(base_and_gate &gate, conditional_trigger &cond)¶
-
template<>
~manage_condition()¶
-
template<typename
Condition>
future<void>get_future(Condition &&func, error_code &ec = hpx::throws)¶
-
template<>
-
-
struct
-
namespace
-
namespace
-
namespace
hpx -
namespace
lcos -
namespace
local -
template<typename
T>
classchannel¶ Public Types
-
template<>
usingvalue_type= T¶
Public Functions
-
channel()¶
Private Types
-
template<>
usingbase_type= detail::channel_base<T>¶
Friends
-
friend
hpx::lcos::local::channel_iterator< T >
-
friend
hpx::lcos::local::receive_channel< T >
-
friend
hpx::lcos::local::send_channel< T >
-
template<>
-
template<>
classchannel<void> : protected hpx::lcos::local::detail::channel_base<void>¶ Public Types
-
template<>
usingvalue_type= void¶
Public Functions
-
channel()
Private Types
-
template<>
usingbase_type= detail::channel_base<void>¶
Friends
-
friend
hpx::lcos::local::channel_iterator< void >
-
friend
hpx::lcos::local::receive_channel< void >
-
friend
hpx::lcos::local::send_channel< void >
-
template<>
-
template<typename
T>
classchannel_async_iterator: public hpx::util::iterator_facade<channel_async_iterator<T>, hpx::future<T>, std::input_iterator_tag, hpx::future<T>>¶ Public Functions
-
channel_async_iterator()¶
-
channel_async_iterator(detail::channel_base<T> const *c)¶
Private Types
Private Functions
-
bool
equal(channel_async_iterator const &rhs) const¶
-
void
increment()¶
-
base_type::reference
dereference() const¶
Private Members
Friends
-
friend
hpx::lcos::local::hpx::util::iterator_core_access
-
-
template<typename
T>
classchannel_iterator: public hpx::util::iterator_facade<channel_iterator<T>, T const, std::input_iterator_tag>¶ Public Functions
-
channel_iterator()¶
-
channel_iterator(detail::channel_base<T> const *c)¶
-
channel_iterator(receive_channel<T> const *c)¶
Private Types
Private Functions
-
bool
equal(channel_iterator const &rhs) const¶
-
void
increment()¶
-
base_type::reference
dereference() const¶
Private Members
Friends
-
friend
hpx::lcos::local::hpx::util::iterator_core_access
-
-
template<>
classchannel_iterator<void> : public hpx::util::iterator_facade<channel_iterator<void>, util::unused_type const, std::input_iterator_tag>¶ Public Functions
-
channel_iterator()
-
channel_iterator(detail::channel_base<void> const *c)¶
-
channel_iterator(receive_channel<void> const *c)¶
Private Types
-
template<>
usingbase_type= hpx::util::iterator_facade<channel_iterator<void>, 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
-
hpx::intrusive_ptr<detail::channel_impl_base<util::unused_type>>
channel_
-
bool
data_
Friends
-
friend
hpx::lcos::local::hpx::util::iterator_core_access
-
-
template<typename
T>
classone_element_channel¶ Public Types
-
template<>
usingvalue_type= T¶
Public Functions
-
one_element_channel()¶
Private Types
-
template<>
usingbase_type= detail::channel_base<T>¶
Friends
-
friend
hpx::lcos::local::channel_iterator< T >
-
friend
hpx::lcos::local::receive_channel< T >
-
friend
hpx::lcos::local::send_channel< T >
-
template<>
-
template<>
classone_element_channel<void> : protected hpx::lcos::local::detail::channel_base<void>¶ Public Types
-
template<>
usingvalue_type= void¶
Public Functions
-
one_element_channel()
Private Types
-
template<>
usingbase_type= detail::channel_base<void>¶
Friends
-
friend
hpx::lcos::local::channel_iterator< void >
-
friend
hpx::lcos::local::receive_channel< void >
-
friend
hpx::lcos::local::send_channel< void >
-
template<>
-
template<typename
T>
classreceive_channel¶ Public Functions
-
receive_channel(channel<T> const &c)¶
-
receive_channel(one_element_channel<T> const &c)¶
Private Types
-
template<>
usingbase_type= detail::channel_base<T>¶
Friends
-
friend
hpx::lcos::local::channel_iterator< T >
-
friend
hpx::lcos::local::send_channel< T >
-
-
template<>
classreceive_channel<void> : protected hpx::lcos::local::detail::channel_base<void>¶ Public Functions
-
receive_channel(one_element_channel<void> const &c)¶
Private Types
-
template<>
usingbase_type= detail::channel_base<void>¶
Friends
-
friend
hpx::lcos::local::channel_iterator< void >
-
friend
hpx::lcos::local::send_channel< void >
-
-
template<typename
-
namespace
-
namespace
-
namespace
hpx -
namespace
lcos -
namespace
local Functions
-
void
run_guarded(guard &guard, detail::guard_function task)¶ Conceptually, a guard acts like a mutex on an asynchronous task. The mutex is locked before the task runs, and unlocked afterwards.
-
void
-
namespace
-
namespace
-
namespace
hpx -
namespace
lcos -
namespace
local -
struct
conditional_trigger¶ Public Functions
-
conditional_trigger()¶
-
conditional_trigger(conditional_trigger &&rhs)¶
-
conditional_trigger &
operator=(conditional_trigger &&rhs)¶
-
template<typename
Condition>
future<void>get_future(Condition &&func, error_code &ec = hpx::throws)¶ get a future allowing to wait for the trigger to fire
-
void
reset()¶
-
bool
set(error_code &ec = throws)¶ Trigger this object.
-
-
struct
-
namespace
-
namespace
-
namespace
hpx -
namespace
lcos -
namespace
local -
template<typename
R, typename ...Ts>
classpackaged_task<R(Ts...)>¶ Public Functions
-
packaged_task()¶
-
template<typename
F, typenameFD= std::decay_t<F>, typenameEnable= std::enable_if_t<!std::is_same<FD, packaged_task>::value && is_invocable_r_v<R, FD&, Ts...>>>packaged_task(F &&f)¶
-
template<typename
Allocator, typenameF, typenameFD= std::decay_t<F>, typenameEnable= std::enable_if_t<!std::is_same<FD, packaged_task>::value && is_invocable_r_v<R, FD&, Ts...>>>packaged_task(std::allocator_arg_t, Allocator const &a, F &&f)¶
-
packaged_task(packaged_task &&rhs)¶
-
packaged_task &
operator=(packaged_task &&rhs)¶
-
void
swap(packaged_task &rhs)¶
-
void
operator()(Ts... vs)¶
-
lcos::future<R>
get_future(error_code &ec = throws)¶
-
bool
valid() const¶
-
void
reset(error_code &ec = throws)¶
Private Types
-
template<>
usingfunction_type= util::unique_function_nonser<R(Ts...)>¶
Private Functions
-
-
template<typename
-
namespace
-
namespace
-
namespace
hpx -
namespace
lcos -
namespace
local -
template<typename
T, typenameMutex= lcos::local::spinlock>
structreceive_buffer¶ Public Functions
-
receive_buffer()¶
-
receive_buffer(receive_buffer &&other)¶
-
~receive_buffer()¶
-
receive_buffer &
operator=(receive_buffer &&other)¶
-
template<typename
Lock= hpx::lcos::local::no_mutex>
voidstore_received(std::size_t step, T &&val, Lock *lock = nullptr)¶
-
bool
empty() const¶
Protected Types
-
typedef Mutex
mutex_type¶
-
typedef std::map<std::size_t, std::shared_ptr<entry_data>>
buffer_map_type¶
-
typedef buffer_map_type::iterator
iterator¶
-
struct
entry_data¶
-
-
template<typename
Mutex>
structreceive_buffer<void, Mutex>¶ Public Functions
-
receive_buffer()
-
receive_buffer(receive_buffer &&other)
-
~receive_buffer()
-
receive_buffer &
operator=(receive_buffer &&other)
-
template<typename
Lock= hpx::lcos::local::no_mutex>
voidstore_received(std::size_t step, Lock *lock = nullptr)¶
-
bool
empty() const
Protected Types
-
typedef Mutex
mutex_type
-
typedef std::map<std::size_t, std::shared_ptr<entry_data>>
buffer_map_type
-
typedef buffer_map_type::iterator
iterator
-
template<>
structentry_data¶ Public Functions
-
template<>
HPX_NON_COPYABLE(entry_data)¶
-
template<>
entry_data()¶
-
template<>
voidset_value()¶
-
template<>
-
-
template<typename
-
namespace
-
namespace
-
namespace
hpx -
namespace
lcos -
namespace
local -
template<typename
Mutex= lcos::local::spinlock>
structbase_trigger¶ Public Functions
-
base_trigger()¶
-
base_trigger(base_trigger &&rhs)¶
-
base_trigger &
operator=(base_trigger &&rhs)¶
-
future<void>
get_future(std::size_t *generation_value = nullptr, error_code &ec = hpx::throws)¶ get a future allowing to wait for the trigger to fire
-
bool
set(error_code &ec = throws)¶ Trigger this object.
-
void
synchronize(std::size_t generation_value, char const *function_name = "trigger::synchronize", error_code &ec = throws)¶ Wait for the generational counter to reach the requested stage.
Protected Types
-
typedef Mutex
mutex_type¶
Protected Functions
-
bool
trigger_conditions(error_code &ec = throws)¶
-
template<typename
Lock>
voidsynchronize(std::size_t generation_value, Lock &l, char const *function_name = "trigger::synchronize", error_code &ec = throws)¶
Private Types
-
typedef std::list<conditional_trigger*>
condition_list_type¶
-
struct
manage_condition¶ Public Functions
-
template<>
manage_condition(base_trigger &gate, conditional_trigger &cond)¶
-
template<>
~manage_condition()¶
-
template<typename
Condition>
future<void>get_future(Condition &&func, error_code &ec = hpx::throws)¶
-
template<>
-
-
template<typename
-
namespace
-
namespace