Operations class for container distributions that provides apply_set() and apply_get().
More...
|
template<typename Functor > |
void | apply_set (gid_type const &gid, Functor const &f) |
| Apply a function object to the element with the given GID. More...
|
|
template<typename Functor > |
void | unordered_apply_set (gid_type const &gid, Functor &&f) |
| Apply a function object to the element with the given GID, disregarding RMI causal ordering. More...
|
|
template<typename Functor > |
void | unordered_apply (gid_type const &gid, Functor &&f) |
| Apply a function object to the element with the given GID, passing along the distribution pointer and disregarding RMI causal ordering. More...
|
|
template<typename Functor > |
boost::result_of< Functor(value_type &)>::type | apply_get (gid_type const &gid, Functor const &f) |
| Apply a function object to the element with the given GID and return the result. More...
|
|
template<typename Functor > |
boost::result_of< Functor(value_type &)>::type | apply_get (gid_type const &gid, Functor const &f) const |
| Apply a function object to the element with the given GID and return the result. More...
|
|
template<typename Derived>
class stapl::operations::applyable< Derived >
Operations class for container distributions that provides apply_set() and apply_get().
Uses the CRTP pattern. Requires that the base container manager has contains(), contains_apply_set() and contains_apply_get() functions method that take a GID and an arbitrary function object.
- Template Parameters
-
Derived | Most derived distribution class |
◆ apply_set()
template<typename Derived>
template<typename Functor >
Apply a function object to the element with the given GID.
- Parameters
-
gid | GID of the element for which we want to apply the function object. |
f | Function object to apply to the element. |
- Warning
- The function operator of
f
has to be const
qualified.
◆ unordered_apply_set()
template<typename Derived>
template<typename Functor >
Apply a function object to the element with the given GID, disregarding RMI causal ordering.
- Parameters
-
gid | GID of the element for which we want to apply the function object. |
f | Function object to apply to the element. |
- Warning
- The function operator of
f
has to be const
qualified.
◆ unordered_apply()
template<typename Derived>
template<typename Functor >
Apply a function object to the element with the given GID, passing along the distribution pointer and disregarding RMI causal ordering.
- Parameters
-
gid | GID of the element for which we want to apply the function object. |
f | Function object to apply to the element. |
- Warning
- The function operator of
f
has to be const
qualified.
◆ apply_get() [1/2]
template<typename Derived>
template<typename Functor >
Apply a function object to the element with the given GID and return the result.
- Parameters
-
gid | GID of the element for which we want to apply the function object and return the result. |
f | Function object to apply to the element. |
- Returns
- The result of applying
f
to the element.
- Warning
- This function assumes that the
Functor
reflects a public type result_type
and that the invocation of its function operator returns a value that is convertible to result_type. The function operator of f
has to be const
qualified.
◆ apply_get() [2/2]
template<typename Derived>
template<typename Functor >
Apply a function object to the element with the given GID and return the result.
- Parameters
-
gid | GID of the element for which we want to apply the function object and return the result. |
f | Function object to apply to the element. |
- Returns
- The result of applying
f
to the element.
- Warning
- This function assumes that the
Functor
reflects a public type result_type
and that the invocation of its function operator returns a value that is convertible to result_type. The function operator of f
has to be const
qualified.
The documentation for this class was generated from the following file: