#include<cuda_runtime.h>#include<stdio.h>intcuda_devices(void){intresult=0;cudaGetDeviceCount(&result);returnresult;}intmain(void){intn=cuda_devices();if(n==0){printf("No CUDA hardware found. Exiting.\n");return0;}printf("Found %i CUDA devices.\n",n);return0;}