本文整理汇总了C++中vertex_type::local_id方法的典型用法代码示例。如果您正苦于以下问题:C++ vertex_type::local_id方法的具体用法?C++ vertex_type::local_id怎么用?C++ vertex_type::local_id使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vertex_type
的用法示例。
在下文中一共展示了vertex_type::local_id方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: synchronize
/**
* \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);
}
}
示例2: internalSignal
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: set_synchronized
/**
* \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: internalSignal
void SynchronousEngine<algorithm_t>::
internalSignal(const vertex_type &vertex, const message_type& message){
lvid_type lvid = vertex.local_id();
internalSignal(lvid, message);
}