local_lcos¶
#include <compatibility/hpx/lcos/local/packaged_task.hpp>¶
#include <compatibility/hpx/lcos/local/promise.hpp>¶
#include <compatibility/hpx/lcos/local/trigger.hpp>¶
#include <compatibility/hpx/lcos/local/composable_guard.hpp>¶
#include <compatibility/hpx/lcos/local/receive_buffer.hpp>¶
#include <compatibility/hpx/lcos/local/channel.hpp>¶
#include <compatibility/hpx/lcos/local/and_gate.hpp>¶
#include <compatibility/hpx/lcos/local/conditional_trigger.hpp>¶
#include <hpx/local_lcos/packaged_task.hpp>¶
-
namespace
hpx -
namespace
lcos -
namespace
local¶ -
template <typename R, typename... Ts>
template<>
classpackaged_task<R(Ts...)>¶ Public Functions
-
packaged_task()¶
-
template <typename F, typename FD = typename std::decay<F>::type, typename Enable = typename std::enable_if< !std::is_same<FD, packaged_task>::value && traits::is_invocable_r<R, FD&, Ts...>::value>::type>
packaged_task(F &&f)¶
-
template <typename Allocator, typename F, typename FD = typename std::decay<F>::type, typename Enable = typename std::enable_if< !std::is_same<FD, packaged_task>::value && traits::is_invocable_r<R, FD&, Ts...>::value>::type>
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 Functions
-
-
template <typename R, typename... Ts>
-
namespace
-
namespace
#include <hpx/local_lcos/promise.hpp>¶
-
namespace
hpx -
namespace
lcos -
namespace
local -
-
template <typename R>
classpromise: public hpx::lcos::local::detail::promise_base<R>¶ Public Functions
-
promise()¶
-
~promise()¶
-
bool
valid() const¶
-
void
set_value(R const &r)¶
-
void
set_value(R &&r)¶
-
template <typename... Ts>
voidset_value(Ts&&... ts)¶
Private Types
-
typedef detail::promise_base<R>
base_type¶
-
-
template <typename R>
template<>
classpromise<R&> : public hpx::lcos::local::detail::promise_base<R&>¶ Public Functions
-
promise()
-
~promise()
-
void
swap(promise &other)
-
bool
valid() const
-
void
set_value(R &r)
-
void
set_exception(std::exception_ptr e)
Private Types
-
typedef detail::promise_base<R&>
base_type
-
-
template <typename R>
-
namespace
-
namespace
#include <hpx/local_lcos/trigger.hpp>¶
-
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 = "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 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_trigger &gate, conditional_trigger &cond)¶
-
template<>
~manage_condition()¶
-
template <typename Condition>
template<>
future<void>get_future(Condition &&func, error_code &ec = hpx::throws)¶
-
template<>
-
-
struct
trigger: public hpx::lcos::local::base_trigger<no_mutex>¶ Public Functions
-
trigger()¶
-
template <typename Lock>
voidsynchronize(std::size_t generation_value, Lock &l, char const *function_name = "trigger::synchronize", error_code &ec = throws)¶
Private Types
-
typedef base_trigger<no_mutex>
base_type¶
-
-
template <typename Mutex = lcos::local::spinlock>
-
namespace
-
namespace
#include <hpx/local_lcos/composable_guard.hpp>¶
-
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
#include <hpx/local_lcos/receive_buffer.hpp>¶
-
namespace
hpx -
namespace
lcos -
namespace
local -
template <typename T, typename Mutex = 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>
template<>
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 T, typename Mutex = lcos::local::spinlock>
-
namespace
-
namespace
#include <hpx/local_lcos/channel.hpp>¶
-
namespace
hpx -
namespace
lcos -
namespace
local -
template <typename T>
classchannel: protected hpx::lcos::local::detail::channel_base<T>¶ Public Types
-
typedef T
value_type¶
Public Functions
-
channel()¶
Private Types
-
typedef detail::channel_base<T>
base_type¶
Friends
-
friend
hpx::lcos::local::channel_iterator< T >
-
friend
hpx::lcos::local::receive_channel< T >
-
friend
hpx::lcos::local::send_channel< T >
-
typedef T
-
template <>
template<>
classchannel<void> : protected hpx::lcos::local::detail::channel_base<void>¶ Public Types
-
typedef void
value_type
Public Functions
-
channel()
Private Types
-
typedef detail::channel_base<void>
base_type
Friends
-
friend
hpx::lcos::local::channel_iterator< void >
-
friend
hpx::lcos::local::receive_channel< void >
-
friend
hpx::lcos::local::send_channel< void >
-
typedef void
-
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
-
typedef hpx::util::iterator_facade<channel_async_iterator<T>, hpx::future<T>, std::input_iterator_tag, hpx::future<T>>
base_type¶
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
-
typedef hpx::util::iterator_facade<channel_iterator<T>, T const, std::input_iterator_tag>
base_type¶
Private Members
Friends
-
friend
hpx::lcos::local::hpx::util::iterator_core_access
-
-
template <>
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
-
typedef hpx::util::iterator_facade<channel_iterator<void>, util::unused_type const, std::input_iterator_tag>
base_type
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: protected hpx::lcos::local::detail::channel_base<T>¶ Public Types
-
typedef T
value_type¶
Public Functions
-
one_element_channel()¶
Private Types
-
typedef detail::channel_base<T>
base_type¶
Friends
-
friend
hpx::lcos::local::channel_iterator< T >
-
friend
hpx::lcos::local::receive_channel< T >
-
friend
hpx::lcos::local::send_channel< T >
-
typedef T
-
template <>
template<>
classone_element_channel<void> : protected hpx::lcos::local::detail::channel_base<void>¶ Public Types
-
typedef void
value_type
Public Functions
-
one_element_channel()
Private Types
-
typedef detail::channel_base<void>
base_type
Friends
-
friend
hpx::lcos::local::channel_iterator< void >
-
friend
hpx::lcos::local::receive_channel< void >
-
friend
hpx::lcos::local::send_channel< void >
-
typedef void
-
template <typename T>
classreceive_channel: protected hpx::lcos::local::detail::channel_base<T>¶ Public Functions
-
receive_channel(one_element_channel<T> const &c)¶
Private Types
-
typedef detail::channel_base<T>
base_type¶
Friends
-
friend
hpx::lcos::local::channel_iterator< T >
-
friend
hpx::lcos::local::send_channel< T >
-
-
template <>
template<>
classreceive_channel<void> : protected hpx::lcos::local::detail::channel_base<void>¶ Public Functions
-
receive_channel(one_element_channel<void> const &c)¶
Private Types
-
typedef detail::channel_base<void>
base_type
Friends
-
friend
hpx::lcos::local::channel_iterator< void >
-
friend
hpx::lcos::local::send_channel< void >
-
-
template <typename T>
-
namespace
-
namespace
#include <hpx/local_lcos/force_linking.hpp>¶
-
namespace
hpx -
namespace
local_lcos¶ Functions
-
force_linking_helper &
force_linking()¶
-
struct
force_linking_helper¶
-
force_linking_helper &
-
namespace
#include <hpx/local_lcos/and_gate.hpp>¶
-
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)¶
Private Types
-
typedef base_and_gate<no_mutex>
base_type¶
-
template <typename Lock>
-
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)¶
-
template <typename OuterLock, typename Lock>
voidinit_locked(OuterLock &outer_lock, Lock &l, std::size_t count, 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>
template<>
future<void>get_future(Condition &&func, error_code &ec = hpx::throws)¶
-
template<>
-
-
struct
-
namespace
-
namespace
#include <hpx/local_lcos/conditional_trigger.hpp>¶
-
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