summaryrefslogtreecommitdiff
path: root/working
diff options
context:
space:
mode:
authorComment <tim@gray.(none)>2013-11-27 09:10:26 +0000
committerComment <tim@gray.(none)>2013-11-27 09:10:26 +0000
commitbd05285cf2e0681c552eff76c2e962749f3aeaad (patch)
treea24f5ec6f98fb6f877d1be557d9a8117e5a27a79 /working
parent38d09991d0f14f04146c14ebd33286b0f6806f67 (diff)
gpu test
Diffstat (limited to 'working')
-rwxr-xr-xworking/make_cvtest0
-rw-r--r--working/test_gpu.c20
2 files changed, 20 insertions, 0 deletions
diff --git a/working/make_cvtest b/working/make_cvtest
new file mode 100755
index 0000000..e69de29
--- /dev/null
+++ b/working/make_cvtest
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 <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;
+}
+
+