main.cu 380 B

123456789101112131415161718192021
  1. #include <stdio.h>
  2. #include <cuda_runtime.h>
  3. #include "shared/kernels.h"
  4. int main(void) {
  5. int cuda_devices = 0;
  6. cudaGetDeviceCount(&cuda_devices);
  7. if(cuda_devices == 0) {
  8. printf("No Cuda hardware found. Exiting.\n");
  9. return 0;
  10. }
  11. if(run_tests() != 0){
  12. printf("CUDA tests failed! Exiting.\n");
  13. return 0;
  14. }
  15. return 0;
  16. }