#ifndef PROJECT_OPENCL_H
#define PROJECT_OPENCL_H

#define MAX_SOURCE_SIZE (0x100000)

#include <CL/cl.h>
#include <CL/cl_gl.h>

void print_ocl_error(int num);

class Cclprog
{
public:
	Cclprog();
	~Cclprog();

	void print_error();

	cl_context context;
	cl_command_queue command_queue;
	cl_kernel kernel;
	cl_int err;

	void init(char* fileName, char* kernelName);
	void deinit();

protected:
	cl_device_id device_id;
	cl_program program;
	cl_platform_id platform_id;
	cl_uint ret_num_devices;
	cl_uint ret_num_platforms;

	char *source_str;
};

#endif
