Commit 766591d4 authored by Kazutomo Yoshii's avatar Kazutomo Yoshii
Browse files

print the compiler log when fails to build

parent c4ee0e4a
......@@ -59,7 +59,7 @@ public:
char *loadfile(string fn, cl_ulong &sz)
{
struct stat st;
sz = 0;
stat(fn.c_str(), &st);
......@@ -113,7 +113,12 @@ public:
cout << "Program failed" << err << endl;
return false;
}
p.build(devs);
err = p.build(devs);
if (err != CL_SUCCESS) {
cout << "Program failed to build: " << err << endl;
cout << p.getBuildInfo<CL_PROGRAM_BUILD_LOG>(devs[device_id]);
return false;
}
prgs.push_back(p);
return true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment