work on gpu clocks and gpu turbo example

This commit is contained in:
Carl Pearson
2019-09-19 16:56:57 -05:00
parent 81cc7feafd
commit 13e6c8e03d
12 changed files with 194 additions and 136 deletions

View File

@@ -12,24 +12,14 @@ int main(void) {
perfect::init();
ret = get_cpu_turbo_state(&state);
if (ret != Result::SUCCESS) {
std::cerr << "ERROR: " << get_string(ret) << "\n";
exit(EXIT_FAILURE);
}
PERFECT(get_cpu_turbo_state(&state));
if (is_turbo_enabled(state)) {
std::cerr << "turbo already enabled\n";
std::cerr << "cpu turbo already enabled\n";
exit(EXIT_SUCCESS);
} else {
ret = enable_cpu_turbo();
if (ret != Result::SUCCESS) {
std::cerr << "ERROR: " << get_string(ret) << "\n";
exit(EXIT_FAILURE);
} else {
std::cerr << "enabled turbo\n";
PERFECT(enable_cpu_turbo());
std::cerr << "enabled cpu turbo\n";
exit(EXIT_SUCCESS);
}
}
}