Joseph Redmon
2014-12-18 9e98f1b68e2ebf618d7f65a0985f5efd11e413f9
src/opencl.h
@@ -1,12 +1,14 @@
#ifdef GPU
#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;
@@ -24,6 +26,9 @@
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