STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
Classes | Functions
Binding Function Objects

Function objects that bind a value to one or more parameters of another function object. Defined in stapl/algorithms/functional.hpp. More...

+ Collaboration diagram for Binding Function Objects:

Classes

class  stapl::binder1st< Operation, Stored, b_is_stapl_ref >
 Functor representing the result of binding the first argument of the given operation to the stored value. More...
 
class  stapl::binder2nd< Operation, Stored, b_is_stapl_ref >
 Functor representing the result of binding the second argument of the given operation to the stored value. More...
 
class  stapl::binder3rd< Operation, Stored, b_is_stapl_ref >
 Functor representing the result of binding the third argument of the given operation to the stored value. More...
 
struct  stapl::result_of::bind1st< Operation, T >
 Defines the type of a binder1st instantiated with the given parameters. More...
 
struct  stapl::result_of::bind1st< Operation, proxy< T, A > >
 Defines the type of a binder1st instantiated with the given parameters, where the bound argument is a stapl::proxy. More...
 
struct  stapl::result_of::bind2nd< Operation, T >
 Defines the type of a binder2nd instantiated with the given parameters. More...
 
struct  stapl::result_of::bind2nd< Operation, proxy< T, A > >
 Defines the type of a binder2nd instantiated with the given parameters, where the bound argument is a stapl::proxy. More...
 
struct  stapl::result_of::bind3rd< Operation, T >
 Defines the type of a binder2nd instantiated with the given parameters. More...
 
struct  stapl::result_of::bind3rd< Operation, proxy< T, A > >
 Defines the type of a binder2nd instantiated with the given parameters, where the bound argument is a stapl::proxy. More...
 

Functions

template<typename Operation , typename T >
binder1st< Operation, T, false > stapl::bind1st (Operation const &fn, T const &x)
 Bind the first argument of fn to x. More...
 
template<typename Operation , typename T , typename A >
binder1st< Operation, proxy< T, A >, true > stapl::bind1st (Operation const &fn, proxy< T, A > p)
 Bind the first argument of fn to x. More...
 
template<typename Operation , typename T >
binder2nd< Operation, T, false > stapl::bind2nd (Operation const &fn, T const &x)
 Bind the second argument of fn to x. More...
 
template<typename Operation , typename T , typename A >
binder2nd< Operation, proxy< T, A >, true > stapl::bind2nd (Operation const &fn, proxy< T, A > p)
 Bind the second argument of fn to x. More...
 
template<typename Operation , typename T >
binder3rd< Operation, T, false > stapl::bind3rd (Operation const &fn, T const &x)
 Bind the third argument of fn to x. More...
 
template<typename Operation , typename T , typename A >
binder3rd< Operation, proxy< T, A >, true > stapl::bind3rd (Operation const &fn, proxy< T, A > p)
 Bind the third argument of fn to x. More...
 

Detailed Description

Function objects that bind a value to one or more parameters of another function object. Defined in stapl/algorithms/functional.hpp.

Function Documentation

◆ bind1st() [1/2]

template<typename Operation , typename T >
binder1st<Operation, T, false> stapl::bind1st ( Operation const &  fn,
T const &  x 
)

Bind the first argument of fn to x.

Parameters
fnThe function to bind.
xThe value for the bound argument.
Returns
A function object representing the bound function.

◆ bind1st() [2/2]

template<typename Operation , typename T , typename A >
binder1st<Operation, proxy<T,A>, true> stapl::bind1st ( Operation const &  fn,
proxy< T, A >  p 
)

Bind the first argument of fn to x.

Parameters
fnThe function to bind.
pThe value for the bound argument, which is a stapl::proxy.
Returns
A function object representing the bound function.

◆ bind2nd() [1/2]

template<typename Operation , typename T >
binder2nd<Operation, T, false> stapl::bind2nd ( Operation const &  fn,
T const &  x 
)

Bind the second argument of fn to x.

Parameters
fnThe function to bind.
xThe value for the bound argument.
Returns
A function object representing the bound function.

◆ bind2nd() [2/2]

template<typename Operation , typename T , typename A >
binder2nd<Operation, proxy<T,A>, true> stapl::bind2nd ( Operation const &  fn,
proxy< T, A >  p 
)

Bind the second argument of fn to x.

Parameters
fnThe function to bind.
pThe value for the bound argument, which is a stapl::proxy.
Returns
A function object representing the bound function.

◆ bind3rd() [1/2]

template<typename Operation , typename T >
binder3rd<Operation, T, false> stapl::bind3rd ( Operation const &  fn,
T const &  x 
)

Bind the third argument of fn to x.

Parameters
fnThe function to bind.
xThe value for the bound argument.
Returns
A function object representing the bound function.

◆ bind3rd() [2/2]

template<typename Operation , typename T , typename A >
binder3rd<Operation, proxy<T,A>, true> stapl::bind3rd ( Operation const &  fn,
proxy< T, A >  p 
)

Bind the third argument of fn to x.

Parameters
fnThe function to bind.
pThe value for the bound argument, which is a stapl::proxy.
Returns
A function object representing the bound function.