Skip to content

Instantly share code, notes, and snippets.

@rainbyte
Last active August 29, 2015 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rainbyte/c5dae13dd49028f0c96d to your computer and use it in GitHub Desktop.
Save rainbyte/c5dae13dd49028f0c96d to your computer and use it in GitHub Desktop.
#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