summaryrefslogtreecommitdiff
path: root/working/test_gpu.c
blob: 592fcf9fca09992196450692edbd98765a64559f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//#include <cv.h>
#include "opencv2/opencv.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/gpu/gpu.hpp"
#include <cstddef>
#include <stdio.h>
#include <stdlib.h>

int main() {

	int gpus=cv::gpu::getCudaEnabledDeviceCount();

	if (gpus) printf("OpenCV is gpu enabled! %d GPUs found\n",gpus);
	else printf("OpenCV is not gpu enabled! Check build flags and hardware\n");

	return 0;
}