blob: 5cce1a3660ce8f1bddcc83d47cceaa8c717c9ece (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
package com.jogamp.opencl;
import java.security.PrivilegedAction;
import com.jogamp.common.jvm.JNILibLoaderBase;
import com.jogamp.common.os.NativeLibrary;
import static java.security.AccessController.*;
/**
* Responsible for JOCL lib loading.
* @author Michael Bien
*/
class NativeLibLoader extends JNILibLoaderBase {
/**
* Loads the native binding and returns the OpenCL library for dynamic linking.
*/
static NativeLibrary loadJOCL() {
return doPrivileged(new PrivilegedAction<NativeLibrary>() {
public NativeLibrary run() {
loadLibrary("jocl", null, true);
return NativeLibrary.open("OpenCL", NativeLibLoader.class.getClassLoader());
}
});
}
}
|