PowerControlDynamicCapsSet PowerControlCapabilitiesArbitrator::getArbitratedPowerControlCapabilities() const { std::vector<PowerControlDynamicCaps> allCaps; auto controlTypes = getControlTypes(); for (auto controlType = controlTypes.begin(); controlType != controlTypes.end(); controlType++) { Power maxPowerLimit = getLowestMaxPowerLimit(*controlType); Power minPowerLimit = getHighestMinPowerLimit(*controlType); Power stepSize = getHighestPowerLimitStep(*controlType); TimeSpan maxTimeWindow = getLowestMaxTimeWindow(*controlType); TimeSpan minTimeWindow = getHighestMinTimeWindow(*controlType); PowerControlDynamicCaps caps(*controlType, minPowerLimit, maxPowerLimit, stepSize, minTimeWindow, maxTimeWindow, Percentage(0.0), Percentage(0.0)); allCaps.push_back(caps); } return PowerControlDynamicCapsSet(allCaps); }
PowerControlDynamicCapsSet DomainPowerControl_001::getAdjustedDynamicCapsBasedOnConfigTdpMaxLimit( const PowerControlDynamicCapsSet& capsSet) { std::vector<PowerControlDynamicCaps> newCapsList; for (UIntN capsIndex = 0; capsIndex < capsSet.getCount(); capsIndex++) { Power maxPowerLimit(Power::createInvalid()); if (capsSet[capsIndex].getPowerControlType() == PowerControlType::pl1) { maxPowerLimit = capsSet[capsIndex].getMaxPowerLimit(); } else { maxPowerLimit = capsSet[capsIndex].getMaxPowerLimit(); } newCapsList.push_back(PowerControlDynamicCaps( capsSet[capsIndex].getPowerControlType(), capsSet[capsIndex].getMinPowerLimit(), maxPowerLimit, capsSet[capsIndex].getPowerStepSize(), capsSet[capsIndex].getMinTimeWindow(), capsSet[capsIndex].getMaxTimeWindow(), capsSet[capsIndex].getMinDutyCycle(), capsSet[capsIndex].getMaxDutyCycle())); } return PowerControlDynamicCapsSet(newCapsList); }