summaryrefslogtreecommitdiffstats
path: root/src/com/mbien/opencl/NativeLibLoader.java
diff options
context:
space:
mode:
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;
+ }
+ });
+ }
+}