我目前正在分析 AMD ADL sdk 并发现非常有趣的功能
int FindTController(const int iAdapter)
{
for (int i = 0; ; i++)
{
ADLThermalControllerInfo tcinfo;
tcinfo.iSize = sizeof(tcinfo);
if (ADL_OK == ADL_Overdrive5_ThermalDevices_Enum(iAdapter, i, &tcinfo))
{
if (tcinfo.iThermalDomain) // if GPU domain
return i;
//tcinfo.iDomainIndex;
//tcinfo.iFlags;
}
}
return 0;
}
我了解此功能正在搜索响应式 AMD GPU 散热设备,但为什么它需要在这样的功能中
void SetDefaultFanSpeed(const int iAdapter, const int iTController)
{
if (ADL_OK != ADL_Overdrive5_FanSpeedToDefault_Set(iAdapter, iTController))
{
fprintf(stderr, "Error: cannot set Fan Speed to default.\n");
}
}
int ADL_Overdrive5_FanSpeedToDefault_Set(int iAdapterIndex, int iThermalControllerIndex)
{
return Error = ((int (*)(int,int)) (mProcAddress[E_ADL_Overdrive5_FanSpeedToDefault_Set]))
(iAdapterIndex, iThermalControllerIndex);
}
几乎所有的 amd ADL 函数都在使用这个 FindTController 函数,它真的很重要还是只是蛇油?