Last active
August 29, 2015 14:03
-
-
Save rainbyte/c5dae13dd49028f0c96d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdbool.h> | |
#include <dricenter-lib.h> | |
int main(void) | |
{ | |
printf("dricenter-cli\n"); | |
struct gpu_info *gpu_table; | |
if (!dc_get_gpu_table(gpu_table)) { | |
printf("Couldn't obtain gpu table!\n"); | |
exit 1; | |
} | |
int gpu_count = dc_get_gpu_count(gpu_table); | |
printf("Number of cards: %d\n", gpu_count); | |
int core_clock; | |
for (int i = 0; i < gpu_count; i++) { | |
printf("Card number: %d\n", i); | |
dc_get_core_clock(gpu_table, i, &core_clock); | |
printf("Core clock: %d\n", core_clock); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment