summaryrefslogtreecommitdiffstats
path: root/src/com/mbien/opencl/NativeLibLoader.java
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-02-01 01:09:18 +0100
committerMichael Bien <[email protected]>2010-02-01 01:09:18 +0100
commite4e7dc4e7a63206c091cd3288adc6a7346f74191 (patch)
treeab2435f774da803489fd58612e6b1f22a3e46cee /src/com/mbien/opencl/NativeLibLoader.java
parent2015fa5cd47b9be234f30e4b98d06b83486e4fb2 (diff)
trivial bugfixes, typo and javadoc warning fixes.
began to switch to gluegen's libloading infrastructure. added CL extensions accessors to CLPlatform. optimized isFooEnabled() methods for CLCommandQueue.
Diffstat (limited to 'src/com/mbien/opencl/NativeLibLoader.java')
-rw-r--r--src/com/mbien/opencl/NativeLibLoader.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/com/mbien/opencl/NativeLibLoader.java b/src/com/mbien/opencl/NativeLibLoader.java
new file mode 100644
index 00000000..b8148432
--- /dev/null
+++ b/src/com/mbien/opencl/NativeLibLoader.java
@@ -0,0 +1,22 @@
+package com.mbien.opencl;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import com.sun.nativewindow.impl.NativeLibLoaderBase;
+
+/**
+ *
+ * @author Michael Bien
+ */
+class NativeLibLoader extends NativeLibLoaderBase {
+
+ @SuppressWarnings("unchecked")
+ public static void loadJOCL() {
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ loadLibrary("jocl", null, true);
+ return null;
+ }
+ });
+ }
+}