From 08b757a0bf76efe8c76b453063a1bb19315bcaa6 Mon Sep 17 00:00:00 2001
From: Joseph Redmon <pjreddie@gmail.com>
Date: Wed, 14 Jan 2015 20:18:57 +0000
Subject: [PATCH] Stable, needs to be way faster

---
 src/opencl.h |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/src/opencl.h b/src/opencl.h
index 59efbae..ceb6e56 100644
--- a/src/opencl.h
+++ b/src/opencl.h
@@ -1,9 +1,14 @@
+#ifndef OPENCL_H
+#define OPENCL_H
+extern int gpu_index;
+#ifdef GPU
 #ifdef __APPLE__
 #include <OpenCL/opencl.h>
 #else
 #include <CL/cl.h>
 #endif
 
+
 typedef struct {
     int initialized;
     cl_int error;
@@ -18,4 +23,12 @@
 void cl_setup();
 void check_error(cl_info info);
 cl_kernel get_kernel(char *filename, char *kernelname, char *options);
-
+void cl_read_array(cl_mem mem, float *x, int n);
+void cl_write_array(cl_mem mem, float *x, int n);
+cl_mem cl_make_array(float *x, int n);
+cl_mem cl_make_int_array(int *x, int n);
+void cl_copy_array(cl_mem src, cl_mem dst, int n);
+cl_mem cl_sub_array(cl_mem src, int offset, int size);
+float cl_checksum(cl_mem mem, int n);
+#endif
+#endif

--
Gitblit v1.10.0