Skip to content

Commit

Permalink
blank lines, PROCESSOR_PROCESSOR
Browse files Browse the repository at this point in the history
  • Loading branch information
eggrobin committed Dec 29, 2024
1 parent 5c7c521 commit c969067
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions nanobenchmarks/performance_settings_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ void WindowsPerformanceSettingsController::NotifyPowerSetting(DWORD type,
#define PRINCIPIA_PROCESSOR_PERF_BOOST_MODE_CASE(value) \
case PROCESSOR_PERF_BOOST_MODE_##value: \
return #value

std::string_view WindowsPerformanceSettingsController::PerfBoostModeToString(
DWORD mode) {
switch (mode) {
Expand All @@ -217,22 +218,25 @@ std::string_view WindowsPerformanceSettingsController::PerfBoostModeToString(
return "Unknown";
}
};

#undef PRINCIPIA_PROCESSOR_PERF_BOOST_MODE_CASE

#define PRINCIPIA_PROCESSOR_PROCESSOR_THROTTLE(value) \
#define PRINCIPIA_PROCESSOR_THROTTLE(value) \
case PROCESSOR_THROTTLE_##value: \
return #value

std::string_view
WindowsPerformanceSettingsController::ProcessorThrottleToString(DWORD mode) {
switch (mode) {
PRINCIPIA_PROCESSOR_PROCESSOR_THROTTLE(DISABLED);
PRINCIPIA_PROCESSOR_PROCESSOR_THROTTLE(ENABLED);
PRINCIPIA_PROCESSOR_PROCESSOR_THROTTLE(AUTOMATIC);
PRINCIPIA_PROCESSOR_THROTTLE(DISABLED);
PRINCIPIA_PROCESSOR_THROTTLE(ENABLED);
PRINCIPIA_PROCESSOR_THROTTLE(AUTOMATIC);
default:
return "Unknown";
}
};
#undef PRINCIPIA_PROCESSOR_PERF_BOOST_MODE_CASE

#undef PRINCIPIA_PROCESSOR_THROTTLE

std::pair<DWORD, DWORD>
WindowsPerformanceSettingsController::ReadAndPrintPerfBoostModeACDC() const {
Expand Down

0 comments on commit c969067

Please sign in to comment.