示例#1
0
 /**
  * \brief Synchronizes all copies of this vertex
  * 
  * If the current vertex value has changed, copy the vertex value to
  * all mirrors. This is for advanced use!
  * Under most circumstances you should not need to use 
  * this function directly.
  */
 void synchronize() {
   if (vtx_set && graph.l_is_master(vtx.local_id())) {
     std::string new_value = serialize_to_string(vtx.data());
     if (original_value != new_value) {
       // synchronize this vertex's value
       engine.synchronize_one_vertex_wait(vtx);
     }
     std::swap(original_value, new_value);
   }
 }
 void SynchronousEngine<algorithm_t>::
 internalSignal(const vertex_type &vertex, const message_type& message){
     const lvid_type lvid = vertex.local_id();
     //        local_vertex_lock[lvid].lock();
     if (has_msg_[lvid]) {
         messages_[lvid] += message;
     }else{
         has_msg_[lvid] = 1;
         messages_[lvid] = message;
     }
     //        local_vertex_lock[lvid].unlock();
 }
示例#3
0
 /**
  * \internal
  * \brief Flags that this vertex was synchronized.
  */
 void set_synchronized() {
   if (vtx_set && graph.l_is_master(vtx.local_id())) {
     original_value = serialize_to_string(vtx.data());
   }
 }
示例#4
0
 void SynchronousEngine<algorithm_t>::
 internalSignal(const vertex_type &vertex, const message_type& message){
     lvid_type lvid = vertex.local_id();
     internalSignal(lvid, message);
 }