24 #include <graphlab/rpc/dc_dist_object.hpp>
25 #ifndef GRAPHLAB_DC_SERVICES_HPP
26 #define GRAPHLAB_DC_SERVICES_HPP
27 #include <graphlab/parallel/pthread_tools.hpp>
31 #include <graphlab/macros_def.hpp>
47 dc_dist_object<dc_services> rmi;
50 dc_services(distributed_control &dc):rmi(dc, this) { }
53 dc_dist_object<dc_services>& rmi_instance() {
58 const dc_dist_object<dc_services>& rmi_instance()
const {
66 inline void send_to(
procid_t target, U& t,
bool control =
false) {
67 rmi.send_to(target, t, control);
74 inline void recv_from(
procid_t source, U& t,
bool control =
false) {
75 rmi.recv_from(source, t, control);
82 inline void broadcast(U& data,
bool originator,
bool control =
false) {
83 rmi.broadcast(data, originator, control);
90 inline void gather(std::vector<U>& data,
procid_t sendto,
bool control =
false) {
91 rmi.gather(data, sendto, control);
98 inline void all_gather(std::vector<U>& data,
bool control =
false) {
99 rmi.all_gather(data, control);
105 template <
typename U>
106 inline void all_reduce(U& data,
bool control =
false) {
107 rmi.all_reduce(data, control);
111 template <
typename U,
typename PlusEqual>
112 void all_reduce2(U& data, PlusEqual plusequal,
bool control =
false) {
113 rmi.all_reduce2(data, plusequal, control);
123 inline void full_barrier() {
135 #include <graphlab/macros_undef.hpp>