From 5ef74c2031a040f30a670dc7d60790fc6a9ec720 Mon Sep 17 00:00:00 2001
From: Joseph Redmon <pjreddie@gmail.com>
Date: Fri, 02 May 2014 22:20:34 +0000
Subject: [PATCH] Slowly refactoring and pushing to GPU
---
src/opencl.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/opencl.c b/src/opencl.c
index 08bc8a7..0d645ba 100644
--- a/src/opencl.c
+++ b/src/opencl.c
@@ -1,3 +1,4 @@
+#ifdef GPU
#include "opencl.h"
#include <stdio.h>
#include <stdlib.h>
@@ -12,6 +13,7 @@
{
if (info.error != CL_SUCCESS) {
printf("\n Error number %d", info.error);
+ exit(1);
}
}
@@ -66,6 +68,7 @@
clGetProgramBuildInfo( prog, info.device, CL_PROGRAM_BUILD_LOG, 4096, build_c, 0);
fprintf(stderr, "Build Log for %s program:\n%s\n", filename, build_c);
}
+ check_error(info);
return prog;
}
@@ -85,4 +88,4 @@
return kernel;
}
-
+#endif
--
Gitblit v1.10.0