本文整理了Java中org.bytedeco.javacpp.Loader.isLoadLibraries()
方法的一些代码示例,展示了Loader.isLoadLibraries()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Loader.isLoadLibraries()
方法的具体详情如下:
包路径:org.bytedeco.javacpp.Loader
类名称:Loader
方法名:isLoadLibraries
[英]Returns System.getProperty("org.bytedeco.javacpp.loadlibraries"). Flag set by the Builder to tell us not to try to load anything.
[中]返回系统。getProperty(“org.bytedeco.javacpp.loadlibraries”)。生成器设置的标志,用于告诉我们不要尝试加载任何内容。
代码示例来源:origin: bytedeco/javacpp
boolean match = platform.extension().length == 0 || (Loader.isLoadLibraries() && platformExtension == null);
for (String s : platform.extension()) {
if (platformExtension != null && platformExtension.length() > 0 && platformExtension.endsWith(s)) {
代码示例来源:origin: bytedeco/javacpp
String[] resources = properties.get("platform.preloadresource").toArray(new String[0]);
String libpath = System.getProperty("java.library.path", "");
if (libpath.length() > 0 && (pathsFirst || !isLoadLibraries() || reference)) {
代码示例来源:origin: bytedeco/javacpp
if (!isLoadLibraries()) {
return null;
代码示例来源:origin: bytedeco/javacpp
if (!isLoadLibraries() || cls == null) {
return null;
代码示例来源:origin: bytedeco/javacpp
boolean match = p.extension().length == 0 || (Loader.isLoadLibraries() && platformExtension == null);
for (String s : p.extension()) {
if (platformExtension != null && platformExtension.length() > 0 && platformExtension.endsWith(s)) {
代码示例来源:origin: org.bytedeco.javacpp-presets/tensorrt
@Override public void init(ClassProperties properties) {
String platform = properties.getProperty("platform");
List<String> preloads = properties.get("platform.preload");
// Only apply this at load time since we don't want to copy the CUDA libraries here
if (!Loader.isLoadLibraries() || !platform.equals("linux-x86_64")) {
return;
}
int i = 0;
String[] libs = {"cudart", "cublas", "cudnn"};
for (String lib : libs) {
lib += lib.equals("cudnn") ? "@.7" : "@.10.0";
if (!preloads.contains(lib)) {
preloads.add(i++, lib);
}
}
}
代码示例来源:origin: org.bytedeco.javacpp-presets/mkl-dnn
@Override public void init(ClassProperties properties) {
String platform = properties.getProperty("platform");
List<String> preloads = properties.get("platform.preload");
// Only apply this at load time
if (!Loader.isLoadLibraries()) {
return;
}
// Let users enable loading of the full version of MKL
String lib = System.getProperty("org.bytedeco.javacpp.mklml.load", "").toLowerCase();
int i = 0;
if (lib.equals("mkl") || lib.equals("mkl_rt")) {
String[] libs = {"iomp5", "libiomp5md", "mkl_core", "mkl_avx", "mkl_avx2", "mkl_avx512", "mkl_avx512_mic",
"mkl_def", "mkl_mc", "mkl_mc3", "mkl_intel_lp64", "mkl_intel_thread", "mkl_rt"};
for (i = 0; i < libs.length; i++) {
preloads.add(i, libs[i] + "#" + libs[i]);
}
lib = "mkl_rt";
}
if (lib.length() > 0) {
if (platform.startsWith("linux")) {
preloads.add(i, lib + "#mklml_intel");
} else if (platform.startsWith("macosx")) {
preloads.add(i, lib + "#mklml");
} else if (platform.startsWith("windows")) {
preloads.add(i, lib + "#mklml");
}
}
}
代码示例来源:origin: org.bytedeco.javacpp-presets/mxnet
@Override public void init(ClassProperties properties) {
String platform = properties.getProperty("platform");
String extension = properties.getProperty("platform.extension");
List<String> preloads = properties.get("platform.preload");
// Only apply this at load time since we don't want to copy the CUDA libraries here
if (!Loader.isLoadLibraries() || extension == null || !extension.equals("-gpu")) {
return;
}
int i = 0;
String[] libs = {"cudart", "cublas", "cufft", "curand", "cusolver", "cudnn", "nvrtc"};
for (String lib : libs) {
switch (platform) {
case "linux-x86_64":
case "macosx-x86_64":
lib += lib.equals("cudnn") ? "@.7" : "@.10.0";
break;
case "windows-x86_64":
lib += lib.equals("cudnn") ? "64_7" : lib.equals("nvrtc") ? "64_100_0" : "64_100";
break;
default:
continue; // no CUDA
}
if (!preloads.contains(lib)) {
preloads.add(i++, lib);
}
}
}
代码示例来源:origin: org.bytedeco.javacpp-presets/tensorflow
@Override public void init(ClassProperties properties) {
String platform = properties.getProperty("platform");
String extension = properties.getProperty("platform.extension");
List<String> preloads = properties.get("platform.preload");
// Only apply this at load time since we don't want to copy the CUDA libraries here
if (!Loader.isLoadLibraries() || extension == null || !extension.equals("-gpu")) {
return;
}
int i = 0;
String[] libs = {"cudart", "cublas", "cufft", "curand", "cusolver", "cudnn"};
for (String lib : libs) {
switch (platform) {
case "linux-x86_64":
case "macosx-x86_64":
lib += lib.equals("cudnn") ? "@.7" : "@.10.0";
break;
case "windows-x86_64":
lib += lib.equals("cudnn") ? "64_7" : "64_100";
break;
default:
continue; // no CUDA
}
if (!preloads.contains(lib)) {
preloads.add(i++, lib);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!