35 #ifndef GRAPHCHI_FUNCTIONAL_BULKSYNC_DEF
36 #define GRAPHCHI_FUNCTIONAL_BULKSYNC_DEF
46 #include "graphchi_types.hpp"
50 template <
typename KERNEL>
68 vinfo.indegree = indeg;
69 vinfo.outdegree = outdeg;
71 cumval = kernel.reset();
84 this->
set_data(kernel.initial_value(ginfo, vinfo));
90 inline void add_inedge(vid_t src,
ET * ptr,
bool special_edge) {
91 if (gcontext->iteration > 0) {
92 cumval = kernel.plus(cumval, kernel.op_neighborval(*gcontext,
95 ptr->oldval(gcontext->iteration)));
100 this->
set_data(kernel.compute_vertexvalue(*gcontext, vinfo, cumval));
103 inline void add_outedge(vid_t dst,
ET * ptr,
bool special_edge) {
104 typename KERNEL::EdgeDataType newval =
105 kernel.value_to_neighbor(*gcontext, vinfo, dst, this->
get_data());
107 paircont.set_newval(gcontext->iteration, newval);
111 bool computational_edges() {
126 template <
typename KERNEL>
157 if (ginfo.iteration == 0) {
158 v.first_iteration(ginfo);