Blame c++/contourgl/clcontext.h

Ivan Mahonin c76ce8
/*
Ivan Mahonin c76ce8
    ......... 2015 Ivan Mahonin
Ivan Mahonin c76ce8
Ivan Mahonin c76ce8
    This program is free software: you can redistribute it and/or modify
Ivan Mahonin c76ce8
    it under the terms of the GNU General Public License as published by
Ivan Mahonin c76ce8
    the Free Software Foundation, either version 3 of the License, or
Ivan Mahonin c76ce8
    (at your option) any later version.
Ivan Mahonin c76ce8
Ivan Mahonin c76ce8
    This program is distributed in the hope that it will be useful,
Ivan Mahonin c76ce8
    but WITHOUT ANY WARRANTY; without even the implied warranty of
Ivan Mahonin c76ce8
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Ivan Mahonin c76ce8
    GNU General Public License for more details.
Ivan Mahonin c76ce8
Ivan Mahonin c76ce8
    You should have received a copy of the GNU General Public License
Ivan Mahonin c76ce8
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
Ivan Mahonin c76ce8
*/
Ivan Mahonin c76ce8
Ivan Mahonin 49e693
#ifndef _CLCONTEXT_H_
Ivan Mahonin 49e693
#define _CLCONTEXT_H_
Ivan Mahonin 49e693
Ivan Mahonin c76ce8
#include <vector>
Ivan Mahonin f83e6b
#include <string>
Ivan Mahonin c76ce8
Ivan Mahonin c76ce8
#include <CL/opencl.h>
Ivan Mahonin c76ce8
Ivan Mahonin c76ce8
Ivan Mahonin c76ce8
class ClContext {
Ivan Mahonin c76ce8
public:
Ivan Mahonin c76ce8
	cl_int err;
Ivan Mahonin c76ce8
	cl_context context;
Ivan Mahonin c76ce8
	std::vector<cl_device_id> devices;
Ivan Mahonin f83e6b
	cl_command_queue queue;
Ivan Mahonin c76ce8
Ivan Mahonin c76ce8
	ClContext();
Ivan Mahonin c76ce8
	~ClContext();
Ivan Mahonin c76ce8
Ivan Mahonin c76ce8
	void hello();
Ivan Mahonin f83e6b
	cl_program load_program(const std::string &filename);
Ivan Mahonin c7fa36
	static void callback(const char *, const void *, size_t, void *);
Ivan Mahonin c76ce8
};
Ivan Mahonin 49e693
Ivan Mahonin 49e693
#endif