STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
Functions

One-sided (point-to-point or point-to-many) communication primitives. More...

+ Collaboration diagram for ARMI One-sided primitives:

Functions

template<typename R , typename T , typename... Arg>
runtime::bind_rmi_result< R, T, runtime::identity_member_pointer, Arg... > stapl::bind_rmi (R(T::*pmf)(Arg...), rmi_handle::reference const &h)
 Returns an object used to do asynchronous RMIs to the member function pmf of object h. More...
 
template<typename Handle , typename MemFun , typename... T>
void stapl::async_rmi (unsigned int dest, Handle const &h, MemFun const &pmf, T &&... t)
 Asynchronous RMI primitive. More...
 
template<typename Handle , typename MemFun , typename... T>
void stapl::async_rmi (all_locations_t, Handle const &h, MemFun const &pmf, T &&... t)
 Asynchronous RMI primitive to all locations the object exists on. More...
 
template<typename Handle , typename F >
void stapl::executor_rmi (unsigned int dest, Handle const &h, F &&f)
 Invokes the given function on the gang_executor of the location that h lives on. More...
 
template<typename Handle , typename MemFun , typename... T>
future< typename callable_traits< MemFun >::result_type > stapl::opaque_rmi (unsigned int dest, Handle const &h, MemFun const &pmf, T &&... t)
 Asynchronous RMI primitive. More...
 
template<typename Handle , typename MemFun , typename... T>
futures< typename callable_traits< MemFun >::result_type > stapl::opaque_rmi (all_locations_t, Handle const &h, MemFun const &pmf, T &&... t)
 Asynchronous RMI primitive to all locations the object it exists on. More...
 
template<typename BinaryOperation , typename Handle , typename MemFun , typename... T>
runtime::binary_operation_result_t< typename callable_traits< MemFun >::result_type, BinaryOperation > stapl::sync_reduce_rmi (BinaryOperation op, Handle const &h, MemFun const &pmf, T &&... t)
 Reduction RMI primitive. More...
 
template<typename BinaryOperation , typename Handle , typename MemFun , typename... T>
future< runtime::binary_operation_result_t< typename callable_traits< MemFun >::result_type, BinaryOperation >> stapl::reduce_rmi (BinaryOperation op, Handle const &h, MemFun const &pmf, T &&... t)
 Reduction RMI primitive. More...
 
template<typename Handle , typename MemFun , typename... T>
callable_traits< MemFun >::result_type stapl::sync_rmi (unsigned int dest, Handle const &h, MemFun const &pmf, T &&... t)
 Synchronous RMI primitive. More...
 
template<typename Handle , typename MemFun , typename... T>
void stapl::try_rmi (unsigned int dest, Handle const &h, MemFun const &pmf, T &&... t)
 Asynchronous best-effort RMI primitive. More...
 

Detailed Description

One-sided (point-to-point or point-to-many) communication primitives.

Function Documentation

◆ bind_rmi()

template<typename R , typename T , typename... Arg>
runtime::bind_rmi_result<R, T, runtime::identity_member_pointer, Arg...> stapl::bind_rmi ( R(T::*)(Arg...)  pmf,
rmi_handle::reference const &  h 
)

Returns an object used to do asynchronous RMIs to the member function pmf of object h.

Warning
An explicit call to runtime::bind_rmi_result::flush() is required to flush the requests.

◆ async_rmi() [1/2]

template<typename Handle , typename MemFun , typename... T>
void stapl::async_rmi ( unsigned int  dest,
Handle const &  h,
MemFun const &  pmf,
T &&...  t 
)

Asynchronous RMI primitive.

The given member function is called on the object in the destination location. Any return values are discarded.

This function supports combining: if two or more async_rmi() calls are made to the same object, function and location one after another, then the requests are compressed and only the arguments of the requests past the first are sent, saving on space and request execution time.

Parameters
destDestination location.
hHandle to the target object.
pmfMember function to invoke.
tArguments to pass to the member function.

◆ async_rmi() [2/2]

template<typename Handle , typename MemFun , typename... T>
void stapl::async_rmi ( all_locations_t  ,
Handle const &  h,
MemFun const &  pmf,
T &&...  t 
)

Asynchronous RMI primitive to all locations the object exists on.

The given member function is called on the object in all the locations it exists on. Any return values are discarded.

Parameters
hHandle to the target object.
pmfMember function to invoke.
tArguments to pass to the member function.

◆ executor_rmi()

template<typename Handle , typename F >
void stapl::executor_rmi ( unsigned int  dest,
Handle const &  h,
F &&  f 
)

Invokes the given function on the gang_executor of the location that h lives on.

Parameters
destDestination location.
hHandle to an object that is on the same gang as the target gang_executor.
fFunction to be called.

◆ opaque_rmi() [1/2]

template<typename Handle , typename MemFun , typename... T>
future<typename callable_traits<MemFun>::result_type> stapl::opaque_rmi ( unsigned int  dest,
Handle const &  h,
MemFun const &  pmf,
T &&...  t 
)

Asynchronous RMI primitive.

The given member function is called on the object in the destination location.

If the return value is not needed, it is recommended that async_rmi() is used.

Parameters
destDestination location.
hHandle to the target object.
pmfMember function to invoke.
tArguments to pass to the member function.
Returns
A future object with the return value of the invoked function.

◆ opaque_rmi() [2/2]

template<typename Handle , typename MemFun , typename... T>
futures<typename callable_traits<MemFun>::result_type> stapl::opaque_rmi ( all_locations_t  ,
Handle const &  h,
MemFun const &  pmf,
T &&...  t 
)

Asynchronous RMI primitive to all locations the object it exists on.

The given member function is called on the object in all the locations it exists on. The return values are ordered by location id.

If the return values are not needed, it is recommended that async_rmi() is used.

Parameters
hHandle to the target object.
pmfMember function to invoke.
tArguments to pass to the member function.
Returns
A futures object with the return values from each member function invocation.

◆ sync_reduce_rmi()

template<typename BinaryOperation , typename Handle , typename MemFun , typename... T>
runtime::binary_operation_result_t< typename callable_traits<MemFun>::result_type, BinaryOperation> stapl::sync_reduce_rmi ( BinaryOperation  op,
Handle const &  h,
MemFun const &  pmf,
T &&...  t 
)

Reduction RMI primitive.

The given member function is called on all locations the object is defined on with the given arguments and returns an object that is the result of the reduction using the supplied function.

If the operator op is non-commutative, this has to be declared by using non_commutative.

Warning
This is a function that can harm scalability. It exists to facilitate one-sided synchronization. Use reduce_rmi() if possible.
Parameters
opReduction operator.
hHandle to the target object.
pmfMember function to invoke.
tArguments to pass to the member function.
Returns
The result of the reduction of the return values from all the locations the object exists on.

◆ reduce_rmi()

template<typename BinaryOperation , typename Handle , typename MemFun , typename... T>
future< runtime::binary_operation_result_t< typename callable_traits<MemFun>::result_type, BinaryOperation>> stapl::reduce_rmi ( BinaryOperation  op,
Handle const &  h,
MemFun const &  pmf,
T &&...  t 
)

Reduction RMI primitive.

The given member function is called on all locations the object is defined on with the given arguments and returns an object that is the result of the reduction using the supplied function.

If the operator binary_op is non-commutative, this has to be declared by using non_commutative().

Parameters
opReduction operator.
hHandle to the target object.
pmfMember function to invoke.
tArguments to pass to the member function.
Returns
A future object with the result of the reduction of the return values from all the locations the object exists on.

◆ sync_rmi()

template<typename Handle , typename MemFun , typename... T>
callable_traits<MemFun>::result_type stapl::sync_rmi ( unsigned int  dest,
Handle const &  h,
MemFun const &  pmf,
T &&...  t 
)

Synchronous RMI primitive.

The given member function is called on the object in the destination location.

Warning
This is a function that can harm scalability. It exists to facilitate one-sided synchronization. Use opaque_rmi() or async_rmi() if possible.
Parameters
destDestination location.
hHandle to the target object.
pmfMember function to invoke.
tArguments to pass to the member function.
Returns
The return value of the invoked function.

◆ try_rmi()

template<typename Handle , typename MemFun , typename... T>
void stapl::try_rmi ( unsigned int  dest,
Handle const &  h,
MemFun const &  pmf,
T &&...  t 
)

Asynchronous best-effort RMI primitive.

The given member function is called on the object in the destination location. It discards any return value.

If the object does not exist in the destination, this primitive silently drops the request without errors.

Parameters
destDestination location.
hHandle to the target object.
pmfMember function to invoke.
tArguments to pass to the member function.