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

Collective communication primitives. More...

+ Collaboration diagram for ARMI Collective primitives:

Functions

template<typename Handle , typename MemFun , typename... T>
futures< typename callable_traits< MemFun >::result_type > stapl::allgather_rmi (Handle const &h, MemFun const &pmf, T &&... t)
 Allgather 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::allreduce_rmi (BinaryOperation op, Handle const &h, MemFun const &pmf, T &&... t)
 Allreduce RMI primitive. More...
 
template<typename Handle , typename MemFun , typename... T>
future< typename callable_traits< MemFun >::result_type > stapl::broadcast_rmi (root_location_t, Handle const &h, MemFun const &pmf, T &&... t)
 Broadcast RMI primitive for root locations. More...
 
template<typename MemFun >
future< typename callable_traits< MemFun >::result_type > stapl::broadcast_rmi (unsigned int root, MemFun const &)
 Broadcast RMI primitive for non-root locations. More...
 

Detailed Description

Collective communication primitives.

Function Documentation

◆ allgather_rmi()

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

Allgather RMI primitive.

The given member function is called on all locations the object is defined on and returns a futures object which can be used to retrieve the return values from all the member function invocations.

Each location passes the locally provided arguments to the member function.

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 all the locations, ordered per location id.

◆ allreduce_rmi()

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

Allreduce RMI primitive.

The given member function is called on all locations the object is defined on and the result of the local invocations of the member function are combined using op and the result is distributed to all locations that made the call. This result can be retrieved through the returned future object.

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 combined return values.

◆ broadcast_rmi() [1/2]

template<typename Handle , typename MemFun , typename... T>
future<typename callable_traits<MemFun>::result_type> stapl::broadcast_rmi ( root_location_t  ,
Handle const &  h,
MemFun const &  pmf,
T &&...  t 
)

Broadcast RMI primitive for root locations.

The given member function is called on the root location and the result of the invocation is broadcast to all locations.

Warning
This primitive is supposed to be called only from the root location. Non-root locations have to call broadcast_rmi(unsigned int,MemFun const&).
Parameters
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 function call.

◆ broadcast_rmi() [2/2]

template<typename MemFun >
future<typename callable_traits<MemFun>::result_type> stapl::broadcast_rmi ( unsigned int  root,
MemFun const &   
)

Broadcast RMI primitive for non-root locations.

Warning
This primitive is supposed to be called only from the non-root locations. The root location has to call broadcast_rmi(root_location_t,Handle const&,MemFun const&,T&&...).
Parameters
rootRoot location of the broadcast.
pmfMember function to invoke.
Returns
A future object with the result of the function call on the root location.