diff options
author | Michael Bien <[email protected]> | 2009-09-23 01:32:54 +0200 |
---|---|---|
committer | Michael Bien <[email protected]> | 2009-09-23 01:32:54 +0200 |
commit | 0ac4a12fb74de16f41ee9ad46e917b45523bbac4 (patch) | |
tree | d9072115c60805c0f50df2ae4cd90227e6c10cea /test/com/mbien | |
parent | 8ba956a7df1b98ed2957a932debfce4c6d4cb848 (diff) |
splitted binding in core (CL) and CL-GL interop. (CLGLI)
began with custom impl. for functions with c -> java callbacks
added an utility which uncomments function parameter names in headers
Diffstat (limited to 'test/com/mbien')
-rw-r--r-- | test/com/mbien/opencl/JOCLTest.java | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/test/com/mbien/opencl/JOCLTest.java b/test/com/mbien/opencl/JOCLTest.java index a3bdee3e..68673746 100644 --- a/test/com/mbien/opencl/JOCLTest.java +++ b/test/com/mbien/opencl/JOCLTest.java @@ -1,6 +1,7 @@ package com.mbien.opencl; import com.mbien.opencl.impl.CLImpl; +import java.nio.ByteBuffer; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -29,10 +30,22 @@ public class JOCLTest { System.out.println(0xFFFFFFFE); System.out.println(0xFFFFFFFD); + System.loadLibrary("gluegen-rt"); System.loadLibrary("jocl"); + CreateContextCallback cb = new CreateContextCallback() { + @Override + public void createContextCallback(String errinfo, ByteBuffer private_info, long cb, Object user_data) { + throw new RuntimeException(errinfo); + } + }; + CLImpl impl = new CLImpl(); - long ctx = impl.clCreateContextFromType(null, CL.CL_DEVICE_TYPE_ALL, null); + + System.out.println("test call1: "+impl.clFinish(1)); + System.out.println("test call2: "+impl.clUnloadCompiler()); + + long ctx = impl.clCreateContextFromType(null, CL.CL_DEVICE_TYPE_ALL, cb, null, null); System.out.println("context handle: "+ctx); |