|
|
@ -25,7 +25,7 @@ void OpenCLHandler::printTimeStats(cl::Event& event) |
|
|
|
std::endl; |
|
|
|
} |
|
|
|
|
|
|
|
OpenCLHandler::OpenCLHandler() |
|
|
|
OpenCLHandler::OpenCLHandler(std::string kernelcode) |
|
|
|
{ |
|
|
|
|
|
|
|
cl_int err = CL_SUCCESS; |
|
|
@ -57,7 +57,8 @@ OpenCLHandler::OpenCLHandler() |
|
|
|
cl::Event event; |
|
|
|
queue = cl::CommandQueue(context, devices[0], CL_QUEUE_PROFILING_ENABLE, &err); |
|
|
|
// Create the OpenCL program
|
|
|
|
std::string programSource = FileToString("../kernels/programs.cl"); |
|
|
|
//std::string programSource = FileToString("../kernels/programs.cl");
|
|
|
|
std::string programSource = FileToString(kernelcode); |
|
|
|
program = cl::Program(context, programSource); |
|
|
|
program.build(devices); |
|
|
|
} |
|
|
|