29package com.jogamp.opencl.llb.impl;
31import com.jogamp.common.jvm.JNILibLoaderBase;
32import com.jogamp.common.os.DynamicLibraryBundle;
33import com.jogamp.common.os.DynamicLibraryBundleInfo;
34import com.jogamp.common.os.Platform;
35import com.jogamp.common.util.RunnableExecutor;
36import com.jogamp.common.util.cache.TempJarCache;
38import java.security.AccessController;
39import java.security.PrivilegedAction;
42import jogamp.common.os.PlatformPropsImpl;
45 private static final boolean isAndroid;
46 private static final List<String> glueLibNames;
49 AccessController.doPrivileged(
new PrivilegedAction<Object>() {
52 Platform.initSingleton();
54 if( TempJarCache.isInitialized(
true) ) {
56 JNILibLoaderBase.addNativeJarLibs(
new Class<?>[] { jogamp.opencl.Debug.class }, null );
61 isAndroid = Platform.OSType.ANDROID == PlatformPropsImpl.OS_TYPE;
63 glueLibNames =
new ArrayList<String>();
64 glueLibNames.add(
"jocl");
111 final List<List<String>> libNamesList =
new ArrayList<List<String>>();
113 final List<String> libCL =
new ArrayList<String>();
116 libCL.add(
"libOpenCL.so.1");
120 libCL.add(
"libPVROCL.so");
121 libCL.add(
"/system/vendor/lib/libPVROCL.so");
124 libCL.add(
"libGL.so.1");
128 libCL.add(
"libGLESv2.so.2");
131 libCL.add(
"libGLESv2.so");
135 libNamesList.add(libCL);
144 final List<String> res =
new ArrayList<String>();
145 res.add(
"clGetExtensionFunctionAddress");
149 private static String Impl_str =
"Impl";
150 private static int Impl_len = Impl_str.length();
155 if( funcName.endsWith(Impl_str) ) {
156 funcName = funcName.substring(0, funcName.length() - Impl_len);
158 if( funcName.endsWith(
"KHR") || funcName.endsWith(
"EXT") ) {
159 return CLImpl11.clGetExtensionFunctionAddress(toolGetProcAddressHandle, funcName);
171 return DynamicLibraryBundle.getDefaultRunnableExecutor();
final boolean searchToolLibInSystemPath()
final List< String > getGlueLibNames()
final RunnableExecutor getLibLoaderExecutor()
final boolean searchToolLibSystemPathFirst()
CLDynamicLibraryBundleInfo()
final boolean shallLinkGlobal()
final long toolGetProcAddress(final long toolGetProcAddressHandle, String funcName)
final List< List< String > > getToolLibNames()
final boolean useToolGetProcAdressFirst(final String funcName)
List< String > getSymbolForToolLibPath()
final List< String > getToolGetProcAddressFuncNameList()
final boolean shallLookupGlobal()
Returns true on Android, and false otherwise.
Java bindings to OpenCL, the Open Computing Language (generated).