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


C++ Timing::DumpSummary方法代码示例

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


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

示例1: arch_dump_summary

void arch_dump_summary(struct arch_t *arch, FILE *f)
{
	Emu *emu = arch->emu;
	Timing *timing = arch->timing;

	/* If no instruction was run for this architecture, skip
	 * statistics summary. */
	if (!emu->instructions)
		return;

	/* Architecture-specific emulation statistics */
	assert(emu->DumpSummary);
	emu->DumpSummary(emu, f);

	/* Timing simulation statistics */
	if (arch->sim_kind == arch_sim_kind_detailed)
	{
		/* Architecture-specific */
		assert(timing->DumpSummary);
		timing->DumpSummary(timing, f);
	}

	/* End */
	fprintf(f, "\n");
}
开发者ID:3upperm2n,项目名称:gpuSimulators,代码行数:25,代码来源:arch.c

示例2: arch_dump

void arch_dump(struct arch_t *arch, FILE *f)
{
	double time_in_sec;
	int i;

	Emu *emu;
	Timing *timing;

	/* Get objects */
	emu = arch->emu;
	timing = arch->timing;

	/* Nothing to print if architecture was not active */
	if (!emu->instructions)
		return;

	/* Header */
	for (i = 0; i < 80; i++)
		fprintf(f, "=");
	fprintf(f, "\nArchitecture '%s'\n", arch->name);
	for (i = 0; i < 80; i++)
		fprintf(f, "=");
	fprintf(f, "\n\n");

	/* Emulator */
	time_in_sec = (double) m2s_timer_get_value(emu->timer) / 1.0e6;
	fprintf(f, "SimKind = %s\n", str_map_value(&arch_sim_kind_map, arch->sim_kind));
	fprintf(f, "Time = %.2f\n", time_in_sec);
	fprintf(f, "Instructions = %lld\n", emu->instructions);
	fprintf(f, "\n");
	assert(emu->DumpSummary);
	emu->DumpSummary(emu, f);

	/* Continue with timing simulator only it active */
	if (arch->sim_kind == arch_sim_kind_functional)
		return;

	/* Timing simulator */
	fprintf(f, "Cycles = %lld\n", timing->cycle);
	fprintf(f, "\n");
	assert(timing->DumpSummary);
	timing->DumpSummary(timing, f);
}
开发者ID:3upperm2n,项目名称:gpuSimulators,代码行数:43,代码来源:arch.c


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