Skip to content

Instantly share code, notes, and snippets.

@rainbyte
Last active August 29, 2015 14:04
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/d1d12817e406292a7593 to your computer and use it in GitHub Desktop.
Save rainbyte/d1d12817e406292a7593 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <stdlib.h>
#include "dricenter-lib.h"
int main(void)
{
struct dc_info *dc_info;
dc_init(dc_info);
int gpu_count = dc_get_gpu_count(dc_info);
printf("%d gpus were detected\n", gpu_count);
int i;
for (i = 0; i < gpu_count; i++) {
printf("gpu num: %d\n", i);
dc_print_info(dc_info, i);
}
dc_end(dc_info);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment