From bd05285cf2e0681c552eff76c2e962749f3aeaad Mon Sep 17 00:00:00 2001 From: Comment Date: Wed, 27 Nov 2013 09:10:26 +0000 Subject: gpu test --- working/test_gpu.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 working/test_gpu.c (limited to 'working/test_gpu.c') diff --git a/working/test_gpu.c b/working/test_gpu.c new file mode 100644 index 0000000..592fcf9 --- /dev/null +++ b/working/test_gpu.c @@ -0,0 +1,20 @@ +//#include +#include "opencv2/opencv.hpp" +#include "opencv2/imgproc/imgproc.hpp" +#include "opencv2/highgui/highgui.hpp" +#include "opencv2/gpu/gpu.hpp" +#include +#include +#include + +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; +} + + -- cgit v1.2.3