本文整理汇总了C++中stripedio::managed_preada_async方法的典型用法代码示例。如果您正苦于以下问题:C++ stripedio::managed_preada_async方法的具体用法?C++ stripedio::managed_preada_async怎么用?C++ stripedio::managed_preada_async使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类stripedio
的用法示例。
在下文中一共展示了stripedio::managed_preada_async方法的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);
}
}
}