aboutsummaryrefslogtreecommitdiffstats
path: root/meson/test cases/cuda/4 shared/main.cu
blob: 12359140e6c74e4053817ca5ac4e6a973b47a444 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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;
}