本文整理汇总了C++中stripedio::print_session方法的典型用法代码示例。如果您正苦于以下问题:C++ stripedio::print_session方法的具体用法?C++ stripedio::print_session怎么用?C++ stripedio::print_session使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类stripedio
的用法示例。
在下文中一共展示了stripedio::print_session方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: read_next_vertices
/**
* Read out-edges for vertices.
*/
void read_next_vertices(int nvecs, vid_t start, std::vector<svertex_t> & prealloc, bool record_index=false, bool disable_writes=false) {
metrics_entry me = m.start_time();
if (!record_index)
move_close_to(start);
/* Release the blocks we do not need anymore */
curblock = NULL;
release_prior_to_offset(false, disable_writes);
assert(activeblocks.size() <= 1);
/* Read next */
if (!activeblocks.empty() && !only_adjacency) {
curblock = &activeblocks[0];
}
vid_t lastrec = start;
window_start_edataoffset = edataoffset;
for(int i=((int)curvid) - ((int)start); i<nvecs; i++) {
if (adjoffset >= adjfilesize) break;
// TODO: skip unscheduled vertices.
int n;
if (record_index && (size_t)(curvid - lastrec) >= (size_t) std::max((int)100000, nvecs/16)) {
save_offset();
lastrec = curvid;
}
uint8_t ns = read_val<uint8_t>();
if (ns == 0x00) {
curvid++;
uint8_t nz = read_val<uint8_t>();
curvid += nz;
i += nz;
continue;
}
if (ns == 0xff) {
n = read_val<uint32_t>();
} else {
n = ns;
}
if (i<0) {
// Just skipping
skip(n, sizeof(vid_t));
} else {
svertex_t& vertex = prealloc[i];
assert(vertex.id() == curvid);
if (vertex.scheduled) {
while(--n >= 0) {
bool special_edge = false;
vid_t target = (sizeof(ET) == sizeof(ETspecial) ? read_val<vid_t>() : translate_edge(read_val<vid_t>(), special_edge));
ET * evalue = read_edgeptr();
vertex.add_outedge(target, evalue, special_edge);
if (!((target >= range_st && target <= range_end))) {
logstream(LOG_ERROR) << "Error : " << target << " not in [" << range_st << " - " << range_end << "]" << std::endl;
iomgr->print_session(adjfile_session);
}
assert(target >= range_st && target <= range_end);
}
} else {
// This vertex was not scheduled, so we can just skip its edges.
skip(n, sizeof(vid_t));
}
}
curvid++;
}
m.stop_time(me, "read_next_vertices");
curblock = NULL;
}