hpx/lcos_local/and_gate.hpp#

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

namespace hpx
namespace lcos
namespace local#
struct and_gate : public hpx::lcos::local::base_and_gate<hpx::no_mutex>#

Public Functions

inline and_gate(std::size_t count = 0)#
inline and_gate(and_gate &&rhs) noexcept#
inline and_gate &operator=(and_gate &&rhs) noexcept#
template<typename Lock>
inline hpx::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>
inline hpx::shared_future<void> get_shared_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>
inline bool set(std::size_t which, Lock l, error_code &ec = throws)#
template<typename Lock>
inline void synchronize(std::size_t generation_value, Lock &l, char const *function_name = "and_gate::synchronize", error_code &ec = throws)#

Private Types

typedef base_and_gate<hpx::no_mutex> base_type#
template<typename Mutex = hpx::spinlock>
struct base_and_gate#

Public Functions

inline explicit 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.

inline base_and_gate(base_and_gate &&rhs) noexcept#
inline base_and_gate &operator=(base_and_gate &&rhs) noexcept#
inline hpx::future<void> get_future(std::size_t count = std::size_t(-1), std::size_t *generation_value = nullptr, error_code &ec = hpx::throws)#
inline hpx::shared_future<void> get_shared_future(std::size_t count = std::size_t(-1), std::size_t *generation_value = nullptr, error_code &ec = hpx::throws)#
inline bool set(std::size_t which, error_code &ec = throws)#
inline 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.

template<typename Lock>
inline std::size_t next_generation(Lock &l, std::size_t new_generation)#
inline std::size_t next_generation(std::size_t new_generation = std::size_t(-1))#
template<typename Lock>
inline std::size_t generation(Lock &l) const#
inline std::size_t generation() const#

Protected Types

typedef Mutex mutex_type#

Protected Functions

inline bool trigger_conditions(error_code &ec = throws)#
template<typename OuterLock>
inline hpx::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

template<typename OuterLock>
inline hpx::shared_future<void> get_shared_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 shared future allowing to wait for the gate to fire

template<typename OuterLock>
inline bool set(std::size_t which, OuterLock outer_lock, error_code &ec = throws)#

Set the data which has to go into the segment which.

inline bool test_condition(std::size_t generation_value)#
template<typename Lock>
inline void synchronize(std::size_t generation_value, Lock &l, char const *function_name = "base_and_gate<>::synchronize", error_code &ec = throws)#
template<typename OuterLock, typename Lock>
inline void init_locked(OuterLock &outer_lock, Lock &l, std::size_t count, error_code &ec = throws)#

Private Types

typedef std::list<conditional_trigger*> condition_list_type#

Private Members

mutable mutex_type mtx_#
hpx::detail::dynamic_bitset received_segments_#
hpx::promise<void> promise_#
std::size_t generation_#
condition_list_type conditions_#
struct manage_condition#

Public Functions

inline manage_condition(base_and_gate &gate, conditional_trigger &cond)#
inline ~manage_condition()#
template<typename Condition>
inline hpx::future<void> get_future(Condition &&func, error_code &ec = hpx::throws)#

Public Members

base_and_gate &this_#
condition_list_type::iterator it_#