diff options
author | Michael Bien <[email protected]> | 2009-11-05 02:52:26 +0100 |
---|---|---|
committer | Michael Bien <[email protected]> | 2009-11-05 02:52:26 +0100 |
commit | 3d8df0c175ff84ac7b42e0ee5f247099b953514a (patch) | |
tree | 41b8a9a7e3b366938919efb75ab38599fc1d8c5b /src/com/mbien/opencl/CLProgram.java | |
parent | 0eebae54517e816aaeb36495dfdbdc1b6d03bfba (diff) |
bug fixes in buffer handling.
Diffstat (limited to 'src/com/mbien/opencl/CLProgram.java')
-rw-r--r-- | src/com/mbien/opencl/CLProgram.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/com/mbien/opencl/CLProgram.java b/src/com/mbien/opencl/CLProgram.java index da0a0447..5b00898f 100644 --- a/src/com/mbien/opencl/CLProgram.java +++ b/src/com/mbien/opencl/CLProgram.java @@ -141,7 +141,10 @@ public class CLProgram { // Build the program int ret = cl.clBuildProgram(ID, deviceIDs, options, null, null); - checkForError(ret, "error building program"); + + if(ret != CL.CL_SUCCESS) { + checkForError(ret, "\n"+getBuildLog()); + } return this; } @@ -218,8 +221,9 @@ public class CLProgram { CLDevice[] devices = getCLDevices(); for (int i = 0; i < devices.length; i++) { CLDevice device = devices[i]; - sb.append(device).append(" build log:"); - sb.append(getBuildLog(device)); + sb.append(device).append(" build log:\n"); + String log = getBuildLog(device).trim(); + sb.append(log.isEmpty()?" <empty>":log); if(i != devices.length-1) sb.append("\n"); } |