From 787d5345609459f21fd65d2d8b4fcd55201e21a1 Mon Sep 17 00:00:00 2001
From: Joseph Redmon <pjreddie@gmail.com>
Date: Mon, 13 Oct 2014 07:31:10 +0000
Subject: [PATCH] Convolutional working on GPU

---
 src/opencl.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/opencl.c b/src/opencl.c
index bcc0f09..5aec33c 100644
--- a/src/opencl.c
+++ b/src/opencl.c
@@ -1,11 +1,12 @@
 #ifdef GPU
-#include "opencl.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <time.h>
 #include <unistd.h>
 
+#include "opencl.h"
+#include "utils.h"
 
 cl_info cl = {0};
 
@@ -103,6 +104,7 @@
 	char src[64*1024];
 	memset(src, 0, 64*1024);
 	FILE *fil=fopen(filename,"r");
+    if(fil == 0) file_error(filename);
 	srcsize=fread(src, sizeof src, 1, fil);
 	fclose(fil);
 	const char *srcptr[]={src};

--
Gitblit v1.10.0