summaryrefslogtreecommitdiffstats
path: root/src/com/mbien/opencl/CLPlatform.java
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-03-30 17:19:15 +0200
committerMichael Bien <[email protected]>2010-03-30 17:19:15 +0200
commit9ec0937d729faade497a3d2a394f76992dcdaa45 (patch)
tree5ae54ffaf676f988609e66f6a88858f468f296bf /src/com/mbien/opencl/CLPlatform.java
parent8b6228d7978c515d1d8de160c45fe52b77874779 (diff)
refactorings due to newly introduced Int64Buffer in gluegen.
Diffstat (limited to 'src/com/mbien/opencl/CLPlatform.java')
-rw-r--r--src/com/mbien/opencl/CLPlatform.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/com/mbien/opencl/CLPlatform.java b/src/com/mbien/opencl/CLPlatform.java
index 85868387..b6b502b9 100644
--- a/src/com/mbien/opencl/CLPlatform.java
+++ b/src/com/mbien/opencl/CLPlatform.java
@@ -1,5 +1,6 @@
package com.mbien.opencl;
+import com.jogamp.gluegen.runtime.Int64Buffer;
import com.mbien.opencl.util.CLUtil;
import com.mbien.opencl.impl.CLImpl;
import com.jogamp.gluegen.runtime.PointerBuffer;
@@ -257,13 +258,14 @@ public final class CLPlatform {
* Returns a info string in exchange for a key (CL_PLATFORM_*).
*/
public String getInfoString(int key) {
- PointerBuffer pb = PointerBuffer.allocateDirect(1);
+ Int64Buffer size = Int64Buffer.allocateDirect(1);
+ // TODO use cache/query size
ByteBuffer bb = ByteBuffer.allocateDirect(512);
- int ret = cl.clGetPlatformInfo(ID, key, bb.capacity(), bb, pb);
+ int ret = cl.clGetPlatformInfo(ID, key, bb.capacity(), bb, size);
checkForError(ret, "can not receive info string");
- return CLUtil.clString2JavaString(bb, (int)pb.get(0));
+ return CLUtil.clString2JavaString(bb, (int)size.get(0));
}
@Override