|
|
@ -69,7 +69,19 @@ OpenCLHandler::OpenCLHandler(std::string kernelcode) |
|
|
|
//std::string programSource = FileToString("../kernels/programs.cl");
|
|
|
|
std::string programSource = FileToString(kernelcode); |
|
|
|
program = cl::Program(context, programSource); |
|
|
|
program.build(devices); |
|
|
|
err = program.build(devices); |
|
|
|
if (!CheckCLError(err)) |
|
|
|
{ |
|
|
|
for (size_t devID = 0; devID < devices.size(); ++devID) |
|
|
|
{ |
|
|
|
std::cout << "Device: " << devID << std::endl; |
|
|
|
std::cout << "Build Status: " << program.getBuildInfo<CL_PROGRAM_BUILD_STATUS>(devices[devID]) << std::endl; |
|
|
|
std::cout << "Build Options:\t" << program.getBuildInfo<CL_PROGRAM_BUILD_OPTIONS>(devices[devID]) << std::endl; |
|
|
|
std::cout << "Build Log:\t " << program.getBuildInfo<CL_PROGRAM_BUILD_LOG>(devices[devID]) << std::endl; |
|
|
|
std::cout << "--------------------------------------------------" << std::endl; |
|
|
|
} |
|
|
|
exit(-1); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
bool OpenCLHandler::run_test(TestCase* test) |
|
|
|