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


C++ Info::ReadPState方法代码示例

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


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

示例1: PrintInfo

void PrintInfo(const Info& info)
{
	cout << endl;
	cout << "AmdMsrTweaker v1.1" << endl;
	cout << endl;

	cout << ".:. General" << endl << "---" << endl;
	cout << "  AMD family 0x" << std::hex << info.Family << ", model 0x" << info.Model << std::dec << " CPU, " << info.NumCores << " cores" << endl;
	cout << "  Default reference clock: " << info.multiScaleFactor * 100 << " MHz" << endl;
	cout << "  Available multipliers: " << (info.MinMulti / info.multiScaleFactor) << " .. " << (info.MaxSoftwareMulti / info.multiScaleFactor) << endl;
	cout << "  Available voltage IDs: " << info.MinVID << " .. " << info.MaxVID << " (" << info.VIDStep << " steps)" << endl;
	cout << endl;

	cout << ".:. Turbo" << endl << "---" << endl;
	if (!info.IsBoostSupported)
		cout << "  not supported" << endl;
	else
	{
		cout << "  " << (info.IsBoostEnabled ? "enabled" : "disabled") << endl;
		cout << "  " << (info.IsBoostLocked ? "locked" : "unlocked") << endl;

		if (info.MaxMulti != info.MaxSoftwareMulti)
			cout << "  Max multiplier: " << (info.MaxMulti / info.multiScaleFactor) << endl;
	}
	cout << endl;

	cout << ".:. P-states" << endl << "---" << endl;
	cout << "  " << info.NumPStates << " of " << (info.Family == 0x10 ? 5 : 8) << " enabled (P0 .. P" << (info.NumPStates - 1) << ")" << endl;

	if (info.IsBoostSupported && info.NumBoostStates > 0)
	{
		cout << "  Turbo P-states:";
		for (int i = 0; i < info.NumBoostStates; i++)
			cout << " P" << i;
		cout << endl;
	}

	cout << "  ---" << endl;

	for (int i = 0; i < info.NumPStates; i++)
	{
		const PStateInfo pi = info.ReadPState(i);

		cout << "  P" << i << ": " << (pi.Multi / info.multiScaleFactor) << "x at " << info.DecodeVID(pi.VID) << "V" << endl;

		if (pi.NBPState >= 0)
		{
			cout << "      NorthBridge in NB_P" << pi.NBPState;
			if (pi.NBVID >= 0)
				cout << " at " << info.DecodeVID(pi.NBVID) << "V";
			cout << endl;
		}
	}

	if (info.Family == 0x15)
	{
		cout << "  ---" << endl;

		for (int i = 0; i < info.NumNBPStates; i++)
		{
			const NBPStateInfo pi = info.ReadNBPState(i);
			cout << "  NB_P" << i << ": " << pi.Multi << "x at " << info.DecodeVID(pi.VID) << "V" << endl;
		}
	}
}
开发者ID:johkra,项目名称:AmdMsrTweaker,代码行数:65,代码来源:AmdMsrTweaker.cpp


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