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


C++ stripedio::launch_stream_reader方法代码示例

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


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

示例1: load

        // TODO: recycle ptr!
        void load() {
            is_loaded = true;
            adjfilesize = get_filesize(filename_adj);
            edatafilesize = get_filesize(filename_edata);
            
            bool async_inedgedata_loading = !svertex_t().computational_edges();
            
#ifdef SUPPORT_DELETIONS
            async_inedgedata_loading = false;  // Currently we encode the deleted status of an edge into the edge value (should be changed!),
                                               // so we need the edge data while loading
#endif
                        
            //preada(adjf, adjdata, adjfilesize, 0);
            
            adj_session = iomgr->open_session(filename_adj, true);
            iomgr->managed_malloc(adj_session, &adjdata, adjfilesize, 0);
            adj_stream_session = streaming_task(iomgr, adj_session, adjfilesize, (char**) &adjdata);
            
            iomgr->launch_stream_reader(&adj_stream_session);            
            /* Initialize edge data asynchonous reading */
            if (!only_adjacency) {
                edata_iosession = iomgr->open_session(filename_edata, false);
                
                iomgr->managed_malloc(edata_iosession, &edgedata, edatafilesize, 0);
                if (async_inedgedata_loading) {
                    iomgr->managed_preada_async(edata_iosession, &edgedata, edatafilesize, 0);
                } else {
                    iomgr->managed_preada_now(edata_iosession, &edgedata, edatafilesize, 0);
                }
            }
        }
开发者ID:bmabey,项目名称:graphchi,代码行数:32,代码来源:memoryshard.hpp


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