Skip to content

Instantly share code, notes, and snippets.

@espdev
espdev / deviceInfo.cu
Created June 1, 2016 10:13 — forked from stevendborrelli/deviceInfo.cu
Get Information about CUDA cards on your system. Compile with: nvcc deviceInfo.cu -o deviceInfo
#include <cuda.h>
#include <stdio.h>
void cudasafe(int error, char* message, char* file, int line) {
if (error != cudaSuccess) {
fprintf(stderr, "CUDA Error: %s : %i. In %s line %d\n", message, error, file, line);
exit(-1);
}
}