29 #ifndef GRAPHCHI_FUNCTIONAL_SEMISYNC_DEF
30 #define GRAPHCHI_FUNCTIONAL_SEMISYNC_DEF
40 #include "graphchi_types.hpp"
44 template <
typename KERNEL>
49 typedef typename KERNEL::EdgeDataType ET;
61 vinfo.indegree = indeg;
62 vinfo.outdegree = outdeg;
64 cumval = kernel.reset();
77 this->
set_data(kernel.initial_value(gcontext_, vinfo));
82 inline void add_inedge(vid_t src, ET * ptr,
bool special_edge) {
83 if (gcontext->iteration > 0) {
84 cumval = kernel.plus(cumval, kernel.op_neighborval(*gcontext, vinfo, src, *ptr));
89 this->
set_data(kernel.compute_vertexvalue(gcontext_, vinfo, cumval));
92 inline void add_outedge(vid_t dst, ET * ptr,
bool special_edge) {
93 *ptr = kernel.value_to_neighbor(*gcontext, vinfo, dst, this->
get_data());
96 bool computational_edges() {
101 static bool read_outedges() {
110 template <
typename KERNEL>
114 typedef typename KERNEL::EdgeDataType EdgeDataType;
139 if (ginfo.iteration == 0) {
140 v.first_iteration(ginfo);