functional¶
#include <compatibility/hpx/util/mem_fn.hpp>
¶
#include <compatibility/hpx/util/protect.hpp>
¶
#include <compatibility/hpx/util/invoke.hpp>
¶
#include <compatibility/hpx/util/deferred_call.hpp>
¶
#include <compatibility/hpx/util/bind_front.hpp>
¶
#include <compatibility/hpx/util/invoke_fused.hpp>
¶
#include <compatibility/hpx/util/first_argument.hpp>
¶
#include <compatibility/hpx/util/function_ref.hpp>
¶
#include <compatibility/hpx/util/bind.hpp>
¶
#include <compatibility/hpx/util/function.hpp>
¶
#include <compatibility/hpx/util/bind_back.hpp>
¶
#include <compatibility/hpx/util/result_of.hpp>
¶
#include <compatibility/hpx/util/one_shot.hpp>
¶
#include <compatibility/hpx/util/unique_function.hpp>
¶
#include <hpx/functional/mem_fn.hpp>
¶
-
namespace
hpx
-
namespace
util
Functions
-
template <typename M, typename C>
detail::mem_fn<M C::*>mem_fn
(M C::*pm)¶
- template <typename R, typename C, typename… Ps>
-
detail::mem_fn<R (C::*)(Ps...)> hpx::util::mem_fn(R(C::*)(Ps...) pm)
- template <typename R, typename C, typename… Ps>
-
detail::mem_fn<R (C::*)(Ps...) const> hpx::util::mem_fn(R(C::*)(Ps...) const pm)
-
template <typename M, typename C>
-
namespace
#include <hpx/functional/protect.hpp>
¶
-
namespace
hpx
-
namespace
util
Functions
- template <typename T>
-
HPX_HOST_DEVICE std::enable_if< traits::is_bind_expression<typename std::decay<T>::type>::value, detail::protected_bind<typename std::decay<T>::type> >::type hpx::util::protect(T && f)
- template <typename T>
-
HPX_HOST_DEVICE std::enable_if< !traits::is_bind_expression<typename std::decay<T>::type>::value, T>::type hpx::util::protect(T && v)
-
namespace
#include <hpx/functional/invoke.hpp>
¶
-
namespace
hpx
-
namespace
util
Functions
- template <typename F, typename… Ts>
-
HPX_HOST_DEVICE util::invoke_result<F, Ts...>::type hpx::util::invoke(F && f, Ts &&... vs)
Invokes the given callable object f with the content of the argument pack vs
- Return
- The result of the callable object when it’s called with the given argument types.
- Note
- This function is similar to
std::invoke
(C++17) - Parameters
f
: Requires to be a callable object. If f is a member function pointer, the first argument in the pack will be treated as the callee (this object).vs
: An arbitrary pack of arguments
- Exceptions
std::exception
: like objects thrown by call to object f with the argument types vs.
- template <typename R, typename F, typename… Ts>
-
HPX_HOST_DEVICE R hpx::util::invoke_r(F && f, Ts &&... vs)
- Template Parameters
R
: The result type of the function when it’s called with the content of the given argument types vs.
-
namespace
functional
-
struct
invoke
¶ Public Functions
- template <typename F, typename… Ts>
-
HPX_HOST_DEVICE util::invoke_result<F, Ts...>::type hpx::util::functional::invoke::operator()(F && f, Ts &&... vs) const
-
template <typename R>
structinvoke_r
¶ Public Functions
- template <typename F, typename… Ts>
-
HPX_HOST_DEVICE R hpx::util::functional::invoke_r::operator()(F && f, Ts &&... vs) const
-
struct
-
namespace
#include <hpx/functional/deferred_call.hpp>
¶
-
namespace
hpx
-
namespace
serialization
-
namespace
util
-
namespace
#include <hpx/functional/bind_front.hpp>
¶
-
namespace
hpx
-
namespace
serialization
-
namespace
util
-
namespace
#include <hpx/functional/invoke_fused.hpp>
¶
-
namespace
hpx
-
namespace
util
Functions
- template <typename F, typename Tuple>
-
HPX_HOST_DEVICE detail::invoke_fused_result<F, Tuple>::type hpx::util::invoke_fused(F && f, Tuple && t)
Invokes the given callable object f with the content of the sequenced type t (tuples, pairs)
- Return
- The result of the callable object when it’s called with the content of the given sequenced type.
- Note
- This function is similar to
std::apply
(C++17) - Parameters
f
: Must be a callable object. If f is a member function pointer, the first argument in the sequenced type will be treated as the callee (this object).t
: A type which is content accessible through a call to hpx::util::get.
- Exceptions
std::exception
: like objects thrown by call to object f with the arguments contained in the sequenceable type t.
- template <typename R, typename F, typename Tuple>
-
HPX_HOST_DEVICE R hpx::util::invoke_fused_r(F && f, Tuple && t)
- Template Parameters
R
: The result type of the function when it’s called with the content of the given sequenced type.
-
namespace
#include <hpx/functional/first_argument.hpp>
¶
#include <hpx/functional/function_ref.hpp>
¶
-
namespace
hpx
-
namespace
util
-
template <typename R, typename... Ts>
template<>
classfunction_ref
<R(Ts...)>¶ Public Functions
-
template <typename F, typename FD = typename std::decay<F>::type, typename Enable = typename std::enable_if< !std::is_same<FD, function_ref>::value && traits::is_invocable_r<R, F&, Ts...>::value>::type>
function_ref
(F &&f)¶
-
function_ref
(function_ref const &other)¶
-
template <typename F, typename FD = typename std::decay<F>::type, typename Enable = typename std::enable_if< !std::is_same<FD, function_ref>::value && traits::is_invocable_r<R, F&, Ts...>::value>::type>
function_ref &operator=
(F &&f)¶
-
function_ref &
operator=
(function_ref const &other)¶
-
template <typename F, typename T = typename std::remove_reference<F>::type, typename Enable = typename std::enable_if<!std::is_pointer<T>::value>::type>
voidassign
(F &&f)¶
-
template <typename T>
voidassign
(T *f_ptr)¶
-
void
swap
(function_ref &f)¶
-
R
operator()
(Ts... vs) const¶
-
char const *
get_function_annotation
() const¶
-
util::itt::string_handle
get_function_annotation_itt
() const¶
Private Types
-
template<>
usingVTable
= detail::function_ref_vtable<R(Ts...)>¶
Private Static Functions
-
template <typename T>
static VTable const *get_vtable
()¶
-
template <typename F, typename FD = typename std::decay<F>::type, typename Enable = typename std::enable_if< !std::is_same<FD, function_ref>::value && traits::is_invocable_r<R, F&, Ts...>::value>::type>
-
template <typename R, typename... Ts>
-
namespace
#include <hpx/functional/bind.hpp>
¶
-
namespace
hpx
-
namespace
serialization
-
namespace
util
Functions
-
namespace
placeholders
¶ Variables
-
HPX_STATIC_CONSTEXPR detail::placeholder<1> hpx::util::placeholders::_1
= {}
-
HPX_STATIC_CONSTEXPR detail::placeholder<2> hpx::util::placeholders::_2
= {}
-
HPX_STATIC_CONSTEXPR detail::placeholder<3> hpx::util::placeholders::_3
= {}
-
HPX_STATIC_CONSTEXPR detail::placeholder<4> hpx::util::placeholders::_4
= {}
-
HPX_STATIC_CONSTEXPR detail::placeholder<5> hpx::util::placeholders::_5
= {}
-
HPX_STATIC_CONSTEXPR detail::placeholder<6> hpx::util::placeholders::_6
= {}
-
HPX_STATIC_CONSTEXPR detail::placeholder<7> hpx::util::placeholders::_7
= {}
-
HPX_STATIC_CONSTEXPR detail::placeholder<8> hpx::util::placeholders::_8
= {}
-
HPX_STATIC_CONSTEXPR detail::placeholder<9> hpx::util::placeholders::_9
= {}
-
-
namespace
-
namespace
#include <hpx/functional/function.hpp>
¶
Defines
-
HPX_UTIL_REGISTER_FUNCTION_DECLARATION
(Sig, F, Name)¶
-
HPX_UTIL_REGISTER_FUNCTION
(Sig, F, Name)¶
-
namespace
hpx
-
namespace
util
Typedefs
-
using
hpx::util::function_nonser = typedef function<Sig, false>
-
template <typename R, typename... Ts, bool Serializable>
template<>
classfunction
<R(Ts...), Serializable> : public detail::basic_function<R(Ts...), true, Serializable>¶ Public Types
-
typedef R
result_type
¶
Public Functions
-
function &
operator=
(function const&)¶
-
function &
operator=
(function&&)¶
-
template <typename F, typename FD = typename std::decay<F>::type, typename Enable1 = typename std::enable_if< !std::is_same<FD, function>::value>::type, typename Enable2 = typename std::enable_if< traits::is_invocable_r<R, FD&, Ts...>::value>::type>
function
(F &&f)¶
-
template <typename F, typename FD = typename std::decay<F>::type, typename Enable1 = typename std::enable_if< !std::is_same<FD, function>::value>::type, typename Enable2 = typename std::enable_if< traits::is_invocable_r<R, FD&, Ts...>::value>::type>
function &operator=
(F &&f)¶
Private Types
-
template<>
usingbase_type
= detail::basic_function<R(Ts...), true, Serializable>¶
-
typedef R
-
using
-
namespace
#include <hpx/functional/bind_back.hpp>
¶
-
namespace
hpx
-
namespace
serialization
-
namespace
util
-
namespace
#include <hpx/functional/result_of.hpp>
¶
#include <hpx/functional/one_shot.hpp>
¶
-
namespace
hpx
-
namespace
serialization
-
namespace
util
-
namespace
#include <hpx/functional/unique_function.hpp>
¶
Defines
-
HPX_UTIL_REGISTER_UNIQUE_FUNCTION_DECLARATION
(Sig, F, Name)¶
-
HPX_UTIL_REGISTER_UNIQUE_FUNCTION
(Sig, F, Name)¶
-
namespace
hpx
-
namespace
util
Typedefs
-
using
hpx::util::unique_function_nonser = typedef unique_function<Sig, false>
-
template <typename R, typename... Ts, bool Serializable>
template<>
classunique_function
<R(Ts...), Serializable> : public detail::basic_function<R(Ts...), false, Serializable>¶ Public Types
-
typedef R
result_type
¶
Public Functions
-
unique_function
(unique_function&&)¶
-
unique_function &
operator=
(unique_function&&)¶
-
template <typename F, typename FD = typename std::decay<F>::type, typename Enable1 = typename std::enable_if< !std::is_same<FD, unique_function>::value>::type, typename Enable2 = typename std::enable_if< traits::is_invocable_r<R, FD&, Ts...>::value>::type>
unique_function
(F &&f)¶
-
template <typename F, typename FD = typename std::decay<F>::type, typename Enable1 = typename std::enable_if< !std::is_same<FD, unique_function>::value>::type, typename Enable2 = typename std::enable_if< traits::is_invocable_r<R, FD&, Ts...>::value>::type>
unique_function &operator=
(F &&f)¶
Private Types
-
template<>
usingbase_type
= detail::basic_function<R(Ts...), false, Serializable>¶
-
typedef R
-
using
-
namespace
#include <hpx/functional/traits/is_bind_expression.hpp>
¶
-
namespace
hpx
-
namespace
traits
-
template <typename T>
structis_bind_expression
: public false_type¶ Subclassed by hpx::traits::is_bind_expression< T const >
-
template <typename T>
-
namespace
#include <hpx/functional/traits/get_function_annotation.hpp>
¶
#include <hpx/functional/traits/get_function_address.hpp>
¶
-
template <typename R, typename Obj, typename... Ts>
template<>
structget_function_address
<R (Obj::*)(Ts...)>¶ Public Static Functions
-
static std::size_t hpx::traits::get_function_address::call(R(Obj::*)(Ts...) f)
-
-
template <typename R, typename Obj, typename... Ts>
template<>
structget_function_address
<R (Obj::*)(Ts...) const>¶ Public Static Functions
-
static std::size_t hpx::traits::get_function_address::call(R(Obj::*)(Ts...) const f)
-
-
namespace
hpx
-
namespace
traits
-
template <typename F, typename Enable = void>
structget_function_address
¶
-
template <typename R, typename... Ts>
template<>
structget_function_address
<R (*)(Ts...)>¶
-
template <typename R, typename Obj, typename... Ts>
template<>
structget_function_address
<R (Obj::*)(Ts...) const> Public Static Functions
-
static std::size_t hpx::traits::get_function_address::call(R(Obj::*)(Ts...) const f)
-
-
template <typename R, typename Obj, typename... Ts>
template<>
structget_function_address
<R (Obj::*)(Ts...)> Public Static Functions
-
static std::size_t hpx::traits::get_function_address::call(R(Obj::*)(Ts...) f)
-
-
template <typename F, typename Enable = void>
-
namespace