This file contains 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 <cuda.h> | |
int | |
main(void){ | |
const int SIZE = 256; | |
char name[SIZE]; | |
CUdevice device; | |
cuInit(0); | |
int count = 0; | |
cuDeviceGetCount(&count); | |
printf("Number of Devices = %d\n",count); | |
for(int i=0;i<count;i++){ | |
cuDeviceGet(&device,0); | |
cuDeviceGetName(name,SIZE,device); | |
printf("%d: %s\n",i,name); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment