Skip to content

Commit

Permalink
Adding back in most of the removed configurations needed for linux an…
Browse files Browse the repository at this point in the history
…d macos.
  • Loading branch information
andreas-eberle committed Oct 8, 2016
1 parent 75e6c45 commit 768f0e4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,21 @@ public void map(InfoMap infoMap) {
.put(new Info("std::vector<tensorflow::NodeBuilder::NodeOut>").pointerTypes("NodeOutVector").define())
.put(new Info("std::vector<tensorflow::Node*>").pointerTypes("NodeVector").define())
.put(new Info("google::protobuf::Map<std::string,tensorflow::AttrValue>").pointerTypes("StringAttrValueMap").define())
.put(new Info("tensorflow::ops::NodeOut").valueTypes("@ByVal NodeBuilder.NodeOut", "Node"))
.put(new Info("tensorflow::NodeBuilder::NodeOut").pointerTypes("NodeBuilder.NodeOut"))

.put(new Info("std::vector<tensorflow::ops::Input>::iterator").skip())
.put(new Info("std::vector<tensorflow::ops::Input>::const_iterator").skip())
.put(new Info("tensorflow::ops::Cast").cppTypes("class tensorflow::ops::Cast").pointerTypes("CastOp"))
.put(new Info("tensorflow::ops::Const").cppTypes("class tensorflow::ops::Const").pointerTypes("ConstOp"))

.put(new Info("mode_t").skip())

.put(new Info("tensorflow::gtl::ArraySlice<std::string>").cast().pointerTypes("StringVector"))
.put(new Info("tensorflow::gtl::ArraySlice<tensorflow::Tensor>")/*.cast()*/.pointerTypes("TensorVector"))
.put(new Info("tensorflow::gtl::ArraySlice<tensorflow::TensorProto>")/*.cast()*/.pointerTypes("TensorProtoVector"))
.put(new Info("tensorflow::gtl::ArraySlice<tensorflow::TensorShape>").cast().pointerTypes("TensorShapeVector"))
.put(new Info("tensorflow::gtl::ArraySlice<tensorflow::ops::NodeOut>")/*.cast()*/.pointerTypes("NodeOutVector"))
.put(new Info("tensorflow::gtl::ArraySlice<tensorflow::Node*>")/*.cast()*/.pointerTypes("NodeVector"))
.put(new Info("tensorflow::gtl::iterator_range<tensorflow::NeighborIter>").pointerTypes("NeighborIterRange").define())
.put(new Info("tensorflow::gtl::iterator_range<tensorflow::NeighborIter>()").skip())
Expand Down Expand Up @@ -312,6 +319,15 @@ public static class EdgeLabelFunction extends FunctionPointer {
public native @StdString BytePointer call(@Cast("const tensorflow::Edge*") Pointer node);
}

public static class FactoryFn extends FunctionPointer {
static { Loader.load(); }
/** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
public FactoryFn(Pointer p) { super(p); }
protected FactoryFn() { allocate(); }
private native void allocate();
public native @Cast("tensorflow::FileSystem*") Pointer call();
}

public static class ShapeInferenceFn extends FunctionPointer {
static { Loader.load(); }
/** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
Expand Down
8 changes: 4 additions & 4 deletions tensorflow/src/main/java/org/bytedeco/javacpp/tensorflow.java
Original file line number Diff line number Diff line change
Expand Up @@ -12924,15 +12924,15 @@ private native void allocate(
@Namespace("tensorflow::ops") public static native Node SourceOp(@StdString String op_name, @Const @ByRef GraphDefBuilder.Options opts);

// For adding an Op with one input to a GraphDefBuilder.
@Namespace("tensorflow::ops") public static native Node UnaryOp(@StdString BytePointer op_name, @ByVal @Cast("tensorflow::ops::NodeOut*") NodeBuilder.NodeOut input,
@Namespace("tensorflow::ops") public static native Node UnaryOp(@StdString BytePointer op_name, @ByVal NodeBuilder.NodeOut input,
@Const @ByRef GraphDefBuilder.Options opts);
@Namespace("tensorflow::ops") public static native Node UnaryOp(@StdString String op_name, @ByVal @Cast("tensorflow::ops::NodeOut*") NodeBuilder.NodeOut input,
@Namespace("tensorflow::ops") public static native Node UnaryOp(@StdString String op_name, Node input,
@Const @ByRef GraphDefBuilder.Options opts);

// For adding an Op with two inputs to a GraphDefBuilder.
@Namespace("tensorflow::ops") public static native Node BinaryOp(@StdString BytePointer op_name, @ByVal @Cast("tensorflow::ops::NodeOut*") NodeBuilder.NodeOut a, @ByVal @Cast("tensorflow::ops::NodeOut*") NodeBuilder.NodeOut b,
@Namespace("tensorflow::ops") public static native Node BinaryOp(@StdString BytePointer op_name, @ByVal NodeBuilder.NodeOut a, @ByVal NodeBuilder.NodeOut b,
@Const @ByRef GraphDefBuilder.Options opts);
@Namespace("tensorflow::ops") public static native Node BinaryOp(@StdString String op_name, @ByVal @Cast("tensorflow::ops::NodeOut*") NodeBuilder.NodeOut a, @ByVal @Cast("tensorflow::ops::NodeOut*") NodeBuilder.NodeOut b,
@Namespace("tensorflow::ops") public static native Node BinaryOp(@StdString String op_name, Node a, Node b,
@Const @ByRef GraphDefBuilder.Options opts);

// namespace ops
Expand Down

0 comments on commit 768f0e4

Please sign in to comment.