当前位置: 首页>>代码示例>>C++>>正文


C++ dc_dist_object::barrier方法代码示例

本文整理汇总了C++中dc_dist_object::barrier方法的典型用法代码示例。如果您正苦于以下问题:C++ dc_dist_object::barrier方法的具体用法?C++ dc_dist_object::barrier怎么用?C++ dc_dist_object::barrier使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在dc_dist_object的用法示例。


在下文中一共展示了dc_dist_object::barrier方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: prepare_injective_join

    void prepare_injective_join(LeftEmitKey left_emit_key, 
                                RightEmitKey right_emit_key) {
      typedef std::pair<size_t, vertex_id_type> key_vertex_pair;
      // Basically, what we are trying to do is to figure out, for each vertex
      // on one side of the graph, which vertices for the other graph
      // (and on on which machines) emitted the same key.
      //
      // The target datastructure is:
      // vtx_to_key[vtx]: The key for each vertex
      // opposing_join_proc[vtx]: Machines which hold a vertex on the opposing
      //                          graph which emitted the same key
      // key_to_vtx[key] Mapping of keys to vertices. 
      
      // resize the left index
      // resize the right index

      reset_and_fill_injective_index(left_inj_index, 
                                     left_graph, 
                                     left_emit_key, "left graph");    

      reset_and_fill_injective_index(right_inj_index, 
                                     right_graph, 
                                     right_emit_key, "right graph");    
      rmi.barrier(); 
      // now, we need cross join across all machines to figure out the 
      // opposing join proc
      // we need to do this twice. Once for left, and once for right. 
      compute_injective_join();
    }
开发者ID:DreamStudio2015,项目名称:SFrame,代码行数:29,代码来源:graph_vertex_join.hpp

示例2: run_synchronous

 void run_synchronous(MemberFunction member_fun, const vertex_set& vset) {
   shared_lvid_counter = 0;
   if (threads.size() <= 1) {
     (this->*(member_fun))(0, vset);
   }
   else {
     // launch the initialization threads
     for(size_t i = 0; i < threads.size(); ++i) {
       boost::function<void(void)> invoke = boost::bind(member_fun, this, i, vset);
       threads.launch(invoke, i);
     }
   }
   // Wait for all threads to finish
   threads.join();
   rmi.barrier();
 } // end of run_synchronous
开发者ID:LiuJianan,项目名称:powerswitch,代码行数:16,代码来源:graph_gather_apply.hpp

示例3: clear

 /**
    Must be called by all machines simultaneously
 */
 void clear() {
     rpc.barrier();
     storage.clear();
 }
开发者ID:jerrylam,项目名称:GraphLab,代码行数:7,代码来源:dht.hpp

示例4: barrier

 /// \copydoc distributed_control::barrier()
 inline void barrier() {
   rmi.barrier();
 }
开发者ID:Hannah1999,项目名称:Dato-Core,代码行数:4,代码来源:dc_services.hpp


注:本文中的dc_dist_object::barrier方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。