本文整理匯總了Java中org.bytedeco.javacpp.tools.Info類的典型用法代碼示例。如果您正苦於以下問題:Java Info類的具體用法?Java Info怎麽用?Java Info使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Info類屬於org.bytedeco.javacpp.tools包,在下文中一共展示了Info類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: map
import org.bytedeco.javacpp.tools.Info; //導入依賴的package包/類
public void map(InfoMap infoMap) {
infoMap
.put(new Info("fasttext::real").pointerTypes("float"))
.put(new Info("std::vector<std::string>").pointerTypes("StringVector").define())
.put(new Info("std::vector<fasttext::real>").pointerTypes("RealVector").define())
.put(new Info("std::pair<fasttext::real,std::string>").pointerTypes("FloatStringPair").define())
.put(new Info("std::vector<std::pair<fasttext::real,std::string> >").pointerTypes("FloatStringPairVector").define())
.put(new Info("std::pair<fasttext::real,int32_t>").pointerTypes("DoubleIntPair").define());
}
示例2: map
import org.bytedeco.javacpp.tools.Info; //導入依賴的package包/類
@Override
public void map(InfoMap infoMap) {
infoMap.put(new Info("libusb_context").pointerTypes("LibUSBContext"))
.put(new Info("uvc_device").pointerTypes("UVCDevice"))
.put(new Info("uvc_device_handle").pointerTypes("UVCDeviceHandle"))
.put(new Info("uvc_context").pointerTypes("UVCContext"))
.put(new Info("uvc_streaming_interface").pointerTypes("UVCStreamingInterface"))
.put(new Info("uvc_device_descriptor").pointerTypes("UVCDeviceDescriptor"))
.put(new Info("uvc_stream_ctrl_t").pointerTypes("UVCStreamCtrl"))
.put(new Info("timeval").pointerTypes("TimeVal"))
.put(new Info("uvc_frame").pointerTypes("UVCFrame"))
.put(new Info("uvc_frame_desc").pointerTypes("UVCFrameDesc"))
.put(new Info("uvc_format_desc").pointerTypes("UVCFormatDesc"));
}
示例3: map
import org.bytedeco.javacpp.tools.Info; //導入依賴的package包/類
@Override
public void map(InfoMap infoMap) {
infoMap.put(new Info("thread_local", "ND4J_EXPORT", "INLINEDEF", "CUBLASWINAPI", "FORCEINLINE", "_CUDA_H", "_CUDA_D", "_CUDA_G", "_CUDA_HD").cppTypes().annotations())
.put(new Info("NativeOps").base("org.nd4j.nativeblas.NativeOps"))
.put(new Info("char").valueTypes("char").pointerTypes("@Cast(\"char*\") String",
"@Cast(\"char*\") BytePointer"))
.put(new Info("Nd4jPointer").cast().valueTypes("Pointer").pointerTypes("PointerPointer"))
.put(new Info("Nd4jIndex").cast().valueTypes("long").pointerTypes("LongPointer", "LongBuffer",
"long[]"))
.put(new Info("Nd4jStatus").cast().valueTypes("int").pointerTypes("IntPointer", "IntBuffer",
"int[]"))
.put(new Info("float16").cast().valueTypes("short").pointerTypes("ShortPointer", "ShortBuffer",
"short[]"));
infoMap.put(new Info("__CUDACC__").define(false))
.put(new Info("__JAVACPP_HACK__").define(true))
.put(new Info("MAX_UINT").translate(false))
.put(new Info("std::initializer_list", "cnpy::NpyArray", "nd4j::NDArray::applyLambda", "nd4j::NDArray::applyPairwiseLambda",
"nd4j::graph::FlatResult", "nd4j::graph::FlatVariable").skip())
.put(new Info("std::string").annotations("@StdString").valueTypes("BytePointer", "String")
.pointerTypes("@Cast({\"char*\", \"std::string*\"}) BytePointer"))
.put(new Info("std::pair<int,int>").pointerTypes("IntIntPair").define())
.put(new Info("std::vector<nd4j::NDArray<float>*>").pointerTypes("FloatNDArrayVector").define())
.put(new Info("std::vector<nd4j::NDArray<float16>*>").pointerTypes("HalfNDArrayVector").define())
.put(new Info("std::vector<nd4j::NDArray<double>*>").pointerTypes("DoubleNDArrayVector").define())
.put(new Info("nd4j::IndicesList").purify());
String classTemplates[] = {
"nd4j::NDArray",
"nd4j::NDArrayList",
"nd4j::ResultSet",
"nd4j::graph::GraphState",
"nd4j::NDArrayFactory",
"nd4j::graph::Variable",
"nd4j::graph::VariablesSet",
"nd4j::graph::Stash",
"nd4j::graph::VariableSpace",
"nd4j::graph::Context",
"nd4j::graph::ContextPrototype",
"nd4j::ops::DeclarableOp",
"nd4j::ops::DeclarableListOp",
"nd4j::ops::DeclarableReductionOp",
"nd4j::ops::DeclarableCustomOp",
"nd4j::ops::BooleanOp",
"nd4j::ops::LogicOp"};
for (String t : classTemplates) {
String s = t.substring(t.lastIndexOf(':') + 1);
infoMap.put(new Info(t + "<float>").pointerTypes("Float" + s))
.put(new Info(t + "<float16>").pointerTypes("Half" + s))
.put(new Info(t + "<double>").pointerTypes("Double" + s));
}
infoMap.put(new Info("nd4j::ops::OpRegistrator::updateMSVC").skip());
}