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
This commit is contained in:
26
src/main.cpp
26
src/main.cpp
@@ -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,10 +18,14 @@
|
|||||||
# include <OpenGL/OpenGL.h>
|
# include <OpenGL/OpenGL.h>
|
||||||
# include <OpenCL/opencl.h>
|
# include <OpenCL/opencl.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "Map.h"
|
||||||
|
#include "Curses.h"
|
||||||
|
#include "util.hpp"
|
||||||
|
#include "RayCaster.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const int WINDOW_X = 150;
|
const int WINDOW_X = 150;
|
||||||
const int WINDOW_Y = 150;
|
const int WINDOW_Y = 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;
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user