24 #ifndef GRAPHLAB_CONTEXT_HPP
25 #define GRAPHLAB_CONTEXT_HPP
31 #include <graphlab/macros_def.hpp>
43 template<
typename Engine>
45 public icontext<typename Engine::graph_type,
46 typename Engine::gather_type,
47 typename Engine::message_type> {
76 engine(engine), graph(graph) { }
83 size_t num_edges()
const {
return graph.num_edges(); }
91 size_t procid()
const {
return graph.procid(); }
93 size_t num_procs()
const {
return graph.numprocs(); }
95 std::ostream&
cout()
const {
96 return graph.dc().cout();
99 std::ostream&
cerr()
const {
100 return graph.dc().cerr();
116 void stop() { engine.internal_stop(); }
123 engine.internal_signal(vertex, message);
135 engine.internal_signal_broadcast(vid, message);
144 engine.internal_post_delta(vertex, delta);
151 engine.internal_clear_gather_cache(vertex);
160 #include <graphlab/macros_undef.hpp>