diff options
Diffstat (limited to 'meson/test cases/cuda/4 shared/main.cu')
-rw-r--r-- | meson/test cases/cuda/4 shared/main.cu | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/meson/test cases/cuda/4 shared/main.cu b/meson/test cases/cuda/4 shared/main.cu new file mode 100644 index 000000000..12359140e --- /dev/null +++ b/meson/test cases/cuda/4 shared/main.cu @@ -0,0 +1,20 @@ +#include <stdio.h> +#include <cuda_runtime.h> +#include "shared/kernels.h" + + +int main(void) { + int cuda_devices = 0; + cudaGetDeviceCount(&cuda_devices); + if(cuda_devices == 0) { + printf("No Cuda hardware found. Exiting.\n"); + return 0; + } + + if(run_tests() != 0){ + printf("CUDA tests failed! Exiting.\n"); + return 0; + } + + return 0; +} |