added the final kernel create function, moved around includes

Next on the plate is either, abstract the cl routine, or
begin digging into creating the kernel
master
mitchellhansen 8 years ago
parent d2b79ceec3
commit 3c9b39f682

@ -1,15 +1,13 @@
#include <SFML/Graphics.hpp>
#include <iostream> #include <iostream>
#include <chrono> #include <chrono>
#include "util.hpp"
#include "RayCaster.h"
#include <Map.h>
#include "Curses.h"
# include <GL/glew.h>
#include <fstream> #include <fstream>
#include <sstream> #include <sstream>
#include <SFML/Graphics.hpp>
#include <GL/glew.h>
#ifdef linux #ifdef linux
#include <CL/cl.h>
#include <CL/opencl.h>
#elif defined _WIN32 #elif defined _WIN32
#include <CL/cl.h> #include <CL/cl.h>
@ -20,9 +18,13 @@
# include <OpenGL/OpenGL.h> # include <OpenGL/OpenGL.h>
# include <OpenCL/opencl.h> # include <OpenCL/opencl.h>
#endif
#include "Map.h"
#include "Curses.h"
#include "util.hpp"
#include "RayCaster.h"
#endif
const int WINDOW_X = 150; const int WINDOW_X = 150;
@ -180,6 +182,14 @@ int main(){
return error; return error;
} }
// Done initializing the kernel
cl_kernel finished_kernel = clCreateKernel(kernel_program, "kernel_name", &error);
if (error != 0){
std::cout << "Err: clCreateKernel returned: " << error << std::endl;
return error;
}
}; };

Loading…
Cancel
Save