本文整理汇总了C++中SimpleTimer::total_time方法的典型用法代码示例。如果您正苦于以下问题:C++ SimpleTimer::total_time方法的具体用法?C++ SimpleTimer::total_time怎么用?C++ SimpleTimer::total_time使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SimpleTimer
的用法示例。
在下文中一共展示了SimpleTimer::total_time方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: part_rcb
void part_rcb(int numoflevel, int dims,
int nnode, int nedge, int nbedge, int ncell,
point *partnode, point *partedge, point *partbedge, point *partcell,
int *cell, int *ecell, int *becell, int *edge,
float *x){
// calc coordinate of center of gravity in each cell
vector<float> coord_cell(ncell*dims);
calc_cellcentre(ncell, dims, cell, x, &coord_cell);
// initialize map and partition data
vector<int> map, part;
for(int i=0; i<ncell; i++){
map.push_back(i);
part.push_back(0);
}
// call recursive coordinate bisection algorithm
rcb_rec2D(&coord_cell, &map, &part, 0, ncell, dims, numoflevel, numoflevel);
// Debug Print
//part_rcb_DebugPrint(ncell, dims, &coord_cell, &map, &part);
// output partition data
tmr_out.start();
/*
if(check_partdata(ncell, &map, &part, numoflevel)){
generate_partdata(nnode, nedge, nbedge, ncell,
&map, &part,
partnode, partedge, partbedge, partcell,
cell, ecell, becell);
}else{
cout << "partition data is invalid" << endl;
exit(-1);
}
*/
tmr_out.stop_and_add_to_total();
printf("span =%lf\n", tmr_span.total_time());
printf("pivot =%lf\n", tmr_pivot1.total_time());
printf("part1 =%lf\n", tmr_part1.total_time());
printf("part2 =%lf\n", tmr_part2.total_time());
printf("part3 =%lf\n", tmr_part3.total_time());
printf("out =%lf\n", tmr_out.total_time());
}