本文整理汇总了C++中XML_PARSER::skip_unexpected方法的典型用法代码示例。如果您正苦于以下问题:C++ XML_PARSER::skip_unexpected方法的具体用法?C++ XML_PARSER::skip_unexpected怎么用?C++ XML_PARSER::skip_unexpected使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XML_PARSER
的用法示例。
在下文中一共展示了XML_PARSER::skip_unexpected方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: parse
//.........这里部分代码省略.........
rt = gpu_usage.rsc_type;
if (rt) {
if (strstr(plan_class, "opencl")) {
if (!coprocs.coprocs[rt].have_opencl) {
msg_printf(0, MSG_INFO,
"App version needs OpenCL but GPU doesn't support it"
);
missing_coproc = true;
missing_coproc_usage = gpu_usage.usage;
safe_strcpy(missing_coproc_name, coprocs.coprocs[rt].type);
}
} else if (strstr(plan_class, "cuda")) {
if (!coprocs.coprocs[rt].have_cuda) {
msg_printf(0, MSG_INFO,
"App version needs CUDA but GPU doesn't support it"
);
missing_coproc = true;
missing_coproc_usage = gpu_usage.usage;
safe_strcpy(missing_coproc_name, coprocs.coprocs[rt].type);
}
} else if (strstr(plan_class, "ati")) {
if (!coprocs.coprocs[rt].have_cal) {
msg_printf(0, MSG_INFO,
"App version needs CAL but GPU doesn't support it"
);
missing_coproc = true;
missing_coproc_usage = gpu_usage.usage;
safe_strcpy(missing_coproc_name, coprocs.coprocs[rt].type);
}
}
}
if (strstr(plan_class, "vbox")) {
is_vm_app = true;
}
return 0;
}
if (xp.parse_str("app_name", app_name, sizeof(app_name))) continue;
if (xp.match_tag("file_ref")) {
int retval = file_ref.parse(xp);
if (!retval) {
if (strstr(file_ref.file_name, "vboxwrapper")) {
is_vm_app = true;
}
app_files.push_back(file_ref);
}
continue;
}
if (xp.parse_int("version_num", version_num)) continue;
if (xp.parse_str("api_version", api_version, sizeof(api_version))) continue;
if (xp.parse_str("platform", platform, sizeof(platform))) continue;
if (xp.parse_str("plan_class", plan_class, sizeof(plan_class))) continue;
if (xp.parse_double("avg_ncpus", avg_ncpus)) continue;
if (xp.parse_double("max_ncpus", max_ncpus)) continue;
if (xp.parse_double("flops", dtemp)) {
if (dtemp <= 0) {
msg_printf(0, MSG_INTERNAL_ERROR,
"non-positive FLOPS in app version"
);
} else {
flops = dtemp;
}
continue;
}
if (xp.parse_str("cmdline", cmdline, sizeof(cmdline))) continue;
if (xp.parse_str("file_prefix", file_prefix, sizeof(file_prefix))) continue;
if (xp.parse_double("gpu_ram", gpu_ram)) continue;
if (xp.match_tag("coproc")) {
COPROC_REQ cp;
int retval = cp.parse(xp);
if (!retval) {
rt = rsc_index(cp.type);
if (rt <= 0) {
msg_printf(0, MSG_INFO,
"app version refers to missing GPU type %s", cp.type
);
missing_coproc = true;
missing_coproc_usage = cp.count;
safe_strcpy(missing_coproc_name, cp.type);
continue;
}
gpu_usage.rsc_type = rt;
gpu_usage.usage = cp.count;
} else {
msg_printf(0, MSG_INTERNAL_ERROR, "Error parsing <coproc>");
}
continue;
}
if (xp.parse_bool("dont_throttle", dont_throttle)) continue;
if (xp.parse_bool("is_wrapper", is_wrapper)) continue;
if (xp.parse_bool("needs_network", needs_network)) continue;
if (log_flags.unparsed_xml) {
msg_printf(0, MSG_INFO,
"[unparsed_xml] APP_VERSION::parse(): unrecognized: %s\n",
xp.parsed_tag
);
}
xp.skip_unexpected();
}
return ERR_XML_PARSE;
}