diff options
author | Michael Bien <[email protected]> | 2009-12-02 14:49:41 +0100 |
---|---|---|
committer | Michael Bien <[email protected]> | 2009-12-02 14:49:41 +0100 |
commit | 72203a5d1f8896463ded10d1b21ca116621d1900 (patch) | |
tree | 93472cac4c61381ea9cdc48bbe97a59b2cd6f64b /src/com/mbien/opencl/CLProgram.java | |
parent | 7c7f5070dcbcc37afe36a4744161157cac49997c (diff) |
fixed gcc setup on mac.
updated native taglet toc url.
fixed small bug in cl char[] -> String conversion.
Diffstat (limited to 'src/com/mbien/opencl/CLProgram.java')
-rw-r--r-- | src/com/mbien/opencl/CLProgram.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/com/mbien/opencl/CLProgram.java b/src/com/mbien/opencl/CLProgram.java index 57c242ba..86d573e1 100644 --- a/src/com/mbien/opencl/CLProgram.java +++ b/src/com/mbien/opencl/CLProgram.java @@ -97,7 +97,7 @@ public class CLProgram implements CLResource { ret = cl.clGetProgramBuildInfo(ID, device, flag, bb.capacity(), bb, null, 0); checkForError(ret, "on clGetProgramBuildInfo"); - return new String(bb.array(), 0, (int)longArray[0]); + return CLUtils.clString2JavaString(bb.array(), (int)longArray[0]); } private final String getProgramInfoString(int flag) { @@ -112,7 +112,7 @@ public class CLProgram implements CLResource { ret = cl.clGetProgramInfo(ID, flag, bb.capacity(), bb, null, 0); checkForError(ret, "on clGetProgramInfo"); - return new String(bb.array(), 0, (int)longArray[0]); + return CLUtils.clString2JavaString(bb.array(), (int)longArray[0]); } // private int getProgramInfoInt(int flag) { @@ -184,7 +184,7 @@ public class CLProgram implements CLResource { int ret = cl.clBuildProgram(ID, deviceIDs, options, null, null); if(ret != CL.CL_SUCCESS) { - checkForError(ret, "\n"+getBuildLog()); + throw new CLException(ret, "\n"+getBuildLog()); } return this; |