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


C++ DB_HOST::fpops_percentile方法代码示例

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


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

示例1: handle_trickle_init

int handle_trickle_init(int argc, char** argv) {
    int retval;
    for (int i=1; i<argc; i++) {
        if (!strcmp(argv[i], "--max_runtime")) {
            max_runtime = atof(argv[++i]);
        } else {
            log_messages.printf(MSG_CRITICAL, "unknown arg %s\n", argv[i]);
            return ERR_XML_PARSE;
        }
    }
    if (!max_runtime) {
        log_messages.printf(MSG_CRITICAL, "missing --max_runtime arg\n");
        return ERR_NULL;
    }

    DB_HOST host;
    retval = host.fpops_percentile(50, flops_50_percentile);
    if (retval) {
        log_messages.printf(MSG_CRITICAL, "fpops_percentile failed: %d\n", retval);
        return retval;
    }
    retval = host.fpops_percentile(95, flops_95_percentile);
    if (retval) {
        log_messages.printf(MSG_CRITICAL, "fpops_percentile failed: %d\n", retval);
        return retval;
    }

    log_messages.printf(MSG_NORMAL, "default FLOPS: %f\n", flops_50_percentile);
    log_messages.printf(MSG_NORMAL, "max FLOPS: %f\n", flops_95_percentile);
    log_messages.printf(MSG_NORMAL, "max runtime: %f\n", max_runtime);
    return 0;
}
开发者ID:FoxKyong,项目名称:boinc,代码行数:32,代码来源:trickle_credit.cpp

示例2: get_from_db

int PERF_INFO::get_from_db() {
    int retval, n;
    DB_HOST host;

    host_fpops_mean = 2.2e9;
    host_fpops_stddev = .7e9;
    host_fpops_50_percentile = 3.3e9;
    host_fpops_95_percentile = 3.3e9;

    retval = host.count(n);
    if (retval) return retval;
    if (n < 10) return 0;
    retval = host.fpops_mean(host_fpops_mean);
    retval = host.fpops_stddev(host_fpops_stddev);
    retval = host.fpops_percentile(50, host_fpops_50_percentile);
    retval = host.fpops_percentile(95, host_fpops_95_percentile);
    return 0;
}
开发者ID:Murph9000,项目名称:boinc-v2,代码行数:18,代码来源:sched_util.cpp


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