本文整理汇总了C++中graph_type::num_local_vertices方法的典型用法代码示例。如果您正苦于以下问题:C++ graph_type::num_local_vertices方法的具体用法?C++ graph_type::num_local_vertices怎么用?C++ graph_type::num_local_vertices使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类graph_type
的用法示例。
在下文中一共展示了graph_type::num_local_vertices方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
SynchronousEngine<algorithm_t>::SynchronousEngine(graph_type& graph):
iteration_counter_(0), max_iterations_(5), graph_(graph) {
vertex_programs_.resize(graph.num_local_vertices());
gather_accum_.resize(graph.num_local_vertices());
has_msg_.resize(graph.num_local_vertices(), 0);
has_msg_.resize(graph.num_local_vertices(), message_type());
active_superstep_.resize(graph.num_local_vertices(), 0);
active_minorstep_.resize(graph.num_local_vertices(), 0);
}
示例2:
SynchronousEngine<algorithm_t>::SynchronousEngine(graph_type& graph):
iteration_counter_(0), max_iterations_(5), graph_(graph) {
vertex_programs_.resize(graph.num_local_vertices());
gather_accum_.resize(graph.num_local_vertices());
has_msg_.resize(graph.num_local_vertices(), 0);
messages_.resize(graph.num_local_vertices(), message_type());
active_superstep_.resize(graph.num_local_vertices(), 0);
active_minorstep_.resize(graph.num_local_vertices(), 0);
context = new context_type(*this, graph);
aggregator = new aggregator_type(graph, context);
cout<<"sync engine init"<<endl;
}