23 #ifndef GRAPHLAB_DISTRIBUTED_CONSTRAINED_OBLIVIOUS_INGRESS_HPP
24 #define GRAPHLAB_DISTRIBUTED_CONSTRAINED_OBLIVIOUS_INGRESS_HPP
27 #include <graphlab/graph/graph_basic_types.hpp>
28 #include <graphlab/graph/ingress/idistributed_ingress.hpp>
29 #include <graphlab/graph/ingress/distributed_ingress_base.hpp>
30 #include <graphlab/graph/ingress/ingress_edge_decision.hpp>
31 #include <graphlab/graph/distributed_graph.hpp>
32 #include <graphlab/rpc/buffered_exchange.hpp>
33 #include <graphlab/rpc/distributed_event_log.hpp>
34 #include <graphlab/util/dense_bitset.hpp>
35 #include <graphlab/util/cuckoo_map_pow2.hpp>
36 #include <graphlab/graph/ingress/sharding_constraint.hpp>
37 #include <graphlab/macros_def.hpp>
39 template<
typename VertexData,
typename EdgeData>
40 class distributed_graph;
45 template<
typename VertexData,
typename EdgeData>
47 public distributed_ingress_base<VertexData, EdgeData> {
55 typedef typename graph_type::vertex_record vertex_record;
58 typedef distributed_ingress_base<VertexData, EdgeData> base_type;
74 sharding_constraint* constraint;
75 boost::hash<vertex_id_type> hashvid;
81 constraint =
new sharding_constraint(dc.
numprocs(),
"grid");
90 const EdgeData& edata) {
92 std::vector<procid_t> candidates;
93 constraint->get_joint_neighbors(get_master(source), get_master(target), candidates);
95 base_type::edge_decision.edge_to_proc_greedy(source, target,
dht[source],
dht[target], candidates,
proc_num_edges,
usehash, userecent);
97 edge_buffer_record record(source, target, edata);
98 base_type::edge_exchange.send(owning_proc, record);
108 return hashvid(vid) % base_type::rpc.numprocs();
115 #include <graphlab/macros_undef.hpp>