Skip to content

Commit 4112e62

Browse files
committed
Revert generation formatting
Signed-off-by: Ryan Nett <[email protected]>
1 parent 8e50f07 commit 4112e62

File tree

4 files changed

+2558
-3241
lines changed

4 files changed

+2558
-3241
lines changed

tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/internal/c_api/NameMap.java

Lines changed: 22 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -2,88 +2,37 @@
22

33
package org.tensorflow.internal.c_api;
44

5-
import org.bytedeco.javacpp.BytePointer;
6-
import org.bytedeco.javacpp.Loader;
7-
import org.bytedeco.javacpp.Pointer;
8-
import org.bytedeco.javacpp.annotation.ByRef;
9-
import org.bytedeco.javacpp.annotation.ByVal;
10-
import org.bytedeco.javacpp.annotation.Const;
11-
import org.bytedeco.javacpp.annotation.Index;
12-
import org.bytedeco.javacpp.annotation.MemberGetter;
13-
import org.bytedeco.javacpp.annotation.Name;
14-
import org.bytedeco.javacpp.annotation.NoOffset;
15-
import org.bytedeco.javacpp.annotation.Properties;
16-
import org.bytedeco.javacpp.annotation.StdString;
5+
import java.nio.*;
6+
import org.bytedeco.javacpp.*;
7+
import org.bytedeco.javacpp.annotation.*;
178

18-
@Name("std::unordered_map<tensorflow::string,tensorflow::Node*>")
19-
@Properties(inherit = org.tensorflow.internal.c_api.presets.tensorflow.class)
20-
public class NameMap extends Pointer {
21-
22-
static {
23-
Loader.load();
24-
}
25-
26-
/**
27-
* Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}.
28-
*/
29-
public NameMap(Pointer p) {
30-
super(p);
31-
}
32-
33-
public NameMap() {
34-
allocate();
35-
}
9+
import static org.tensorflow.internal.c_api.global.tensorflow.*;
3610

11+
@Name("std::unordered_map<tensorflow::string,tensorflow::Node*>") @Properties(inherit = org.tensorflow.internal.c_api.presets.tensorflow.class)
12+
public class NameMap extends Pointer {
13+
static { Loader.load(); }
14+
/** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
15+
public NameMap(Pointer p) { super(p); }
16+
public NameMap() { allocate(); }
3717
private native void allocate();
18+
public native @Name("operator =") @ByRef NameMap put(@ByRef NameMap x);
3819

39-
public native @Name("operator =")
40-
@ByRef
41-
NameMap put(@ByRef NameMap x);
42-
43-
public boolean empty() {
44-
return size() == 0;
45-
}
46-
20+
public boolean empty() { return size() == 0; }
4721
public native long size();
4822

49-
@Index
50-
public native Node get(@StdString BytePointer i);
51-
23+
@Index public native Node get(@StdString BytePointer i);
5224
public native NameMap put(@StdString BytePointer i, Node value);
5325

54-
public native @ByVal
55-
Iterator begin();
56-
57-
public native @ByVal
58-
Iterator end();
59-
60-
@NoOffset
61-
@Name("iterator")
62-
public static class Iterator extends Pointer {
63-
64-
public Iterator(Pointer p) {
65-
super(p);
66-
}
67-
68-
public Iterator() {
69-
}
70-
71-
public native @Name("operator ++")
72-
@ByRef
73-
Iterator increment();
74-
75-
public native @Name("operator ==")
76-
boolean equals(@ByRef Iterator it);
77-
78-
public native @Name("operator *().first")
79-
@MemberGetter
80-
@StdString
81-
BytePointer first();
26+
public native @ByVal Iterator begin();
27+
public native @ByVal Iterator end();
28+
@NoOffset @Name("iterator") public static class Iterator extends Pointer {
29+
public Iterator(Pointer p) { super(p); }
30+
public Iterator() { }
8231

83-
public native @Name("operator *().second")
84-
@MemberGetter
85-
@Const
86-
Node second();
32+
public native @Name("operator ++") @ByRef Iterator increment();
33+
public native @Name("operator ==") boolean equals(@ByRef Iterator it);
34+
public native @Name("operator *().first") @MemberGetter @StdString BytePointer first();
35+
public native @Name("operator *().second") @MemberGetter @Const Node second();
8736
}
8837
}
8938

tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/internal/c_api/Node.java

Lines changed: 58 additions & 141 deletions
Original file line numberDiff line numberDiff line change
@@ -2,49 +2,27 @@
22

33
package org.tensorflow.internal.c_api;
44

5-
import org.bytedeco.javacpp.BytePointer;
6-
import org.bytedeco.javacpp.Loader;
7-
import org.bytedeco.javacpp.Pointer;
8-
import org.bytedeco.javacpp.annotation.Cast;
9-
import org.bytedeco.javacpp.annotation.Name;
10-
import org.bytedeco.javacpp.annotation.NoOffset;
11-
import org.bytedeco.javacpp.annotation.Properties;
12-
import org.bytedeco.javacpp.annotation.StdString;
5+
import java.nio.*;
6+
import org.bytedeco.javacpp.*;
7+
import org.bytedeco.javacpp.annotation.*;
8+
9+
import static org.tensorflow.internal.c_api.global.tensorflow.*;
1310

1411
// Parsed from tensorflow/core/graph/graph.h
1512

16-
@Name("tensorflow::Node")
17-
@NoOffset
18-
@Properties(inherit = org.tensorflow.internal.c_api.presets.tensorflow.class)
13+
@Name("tensorflow::Node") @NoOffset @Properties(inherit = org.tensorflow.internal.c_api.presets.tensorflow.class)
1914
public class Node extends Pointer {
15+
static { Loader.load(); }
16+
/** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
17+
public Node(Pointer p) { super(p); }
2018

21-
static {
22-
Loader.load();
23-
}
24-
25-
/**
26-
* Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}.
27-
*/
28-
public Node(Pointer p) {
29-
super(p);
30-
}
31-
32-
public native @StdString
33-
BytePointer DebugString();
34-
19+
public native @StdString BytePointer DebugString();
3520
public native int id();
36-
3721
public native int cost_id();
38-
39-
public native @StdString
40-
BytePointer name();
41-
22+
public native @StdString BytePointer name();
4223
public native void set_name(@StdString BytePointer name);
43-
4424
public native void set_name(@StdString String name);
45-
46-
public native @StdString
47-
BytePointer type_string();
25+
public native @StdString BytePointer type_string();
4826

4927
// def() provides the NodeDef the user supplied, but the specifics
5028
// of this Node may have changed due to placement, optimization, etc.
@@ -58,21 +36,17 @@ public Node(Pointer p) {
5836
// TODO(irving): Replace with NodeInfo.
5937

6038
// input and output types
61-
public native @Cast("tensorflow::int32")
62-
int num_inputs();
39+
public native @Cast("tensorflow::int32") int num_inputs();
6340

64-
public native @Cast("tensorflow::int32")
65-
int num_outputs();
41+
public native @Cast("tensorflow::int32") int num_outputs();
6642

6743
// The device requested by the user. For the actual assigned device,
6844
// use assigned_device_name() below.
69-
public native @StdString
70-
BytePointer requested_device();
45+
public native @StdString BytePointer requested_device();
7146

7247
// This changes the user requested device but not necessarily the device that
7348
// on which the operation will run.
7449
public native void set_requested_device(@StdString BytePointer device);
75-
7650
public native void set_requested_device(@StdString String device);
7751

7852
// This gives the device the runtime has assigned this node to. If
@@ -81,22 +55,16 @@ public Node(Pointer p) {
8155
// fully specifies a device, and satisfies def().device().
8256
// TODO(josh11b): Move assigned_device_name outside of Node into a
8357
// NodeId->DeviceName map.
84-
public native @StdString
85-
BytePointer assigned_device_name();
86-
58+
public native @StdString BytePointer assigned_device_name();
8759
public native void set_assigned_device_name(@StdString BytePointer device_name);
88-
8960
public native void set_assigned_device_name(@StdString String device_name);
90-
91-
public native @Cast("bool")
92-
boolean has_assigned_device_name();
93-
61+
public native @Cast("bool") boolean has_assigned_device_name();
9462
public native int assigned_device_name_index();
95-
9663
public native void set_assigned_device_name_index(int index);
9764

9865
// Sets 'original_node_names' field of this node's DebugInfo proto to
9966
// 'names'.
67+
10068

10169
// Read only access to attributes
10270

@@ -106,109 +74,56 @@ public Node(Pointer p) {
10674
// includes control edges.
10775

10876
// Node type helpers.
109-
public native @Cast("bool")
110-
boolean IsSource();
111-
112-
public native @Cast("bool")
113-
boolean IsSink();
114-
77+
public native @Cast("bool") boolean IsSource();
78+
public native @Cast("bool") boolean IsSink();
11579
// Anything other than the special Source & Sink nodes.
116-
public native @Cast("bool")
117-
boolean IsOp();
80+
public native @Cast("bool") boolean IsOp();
11881

11982
// Node class helpers
120-
public native @Cast("bool")
121-
boolean IsSwitch();
122-
123-
public native @Cast("bool")
124-
boolean IsMerge();
125-
126-
public native @Cast("bool")
127-
boolean IsEnter();
128-
129-
public native @Cast("bool")
130-
boolean IsExit();
131-
132-
public native @Cast("bool")
133-
boolean IsNextIteration();
134-
135-
public native @Cast("bool")
136-
boolean IsLoopCond();
137-
138-
public native @Cast("bool")
139-
boolean IsControlTrigger();
140-
141-
public native @Cast("bool")
142-
boolean IsSend();
143-
144-
public native @Cast("bool")
145-
boolean IsRecv();
146-
147-
public native @Cast("bool")
148-
boolean IsConstant();
149-
150-
public native @Cast("bool")
151-
boolean IsVariable();
152-
153-
public native @Cast("bool")
154-
boolean IsIdentity();
155-
156-
public native @Cast("bool")
157-
boolean IsGetSessionHandle();
158-
159-
public native @Cast("bool")
160-
boolean IsGetSessionTensor();
161-
162-
public native @Cast("bool")
163-
boolean IsDeleteSessionTensor();
164-
165-
public native @Cast("bool")
166-
boolean IsControlFlow();
167-
168-
public native @Cast("bool")
169-
boolean IsHostSend();
170-
171-
public native @Cast("bool")
172-
boolean IsHostRecv();
173-
174-
public native @Cast("bool")
175-
boolean IsScopedAllocator();
176-
177-
public native @Cast("bool")
178-
boolean IsCollective();
179-
180-
public native @Cast("bool")
181-
boolean IsMetadata();
182-
183-
public native @Cast("bool")
184-
boolean IsFakeParam();
185-
186-
public native @Cast("bool")
187-
boolean IsPartitionedCall();
83+
public native @Cast("bool") boolean IsSwitch();
84+
public native @Cast("bool") boolean IsMerge();
85+
public native @Cast("bool") boolean IsEnter();
86+
public native @Cast("bool") boolean IsExit();
87+
public native @Cast("bool") boolean IsNextIteration();
88+
public native @Cast("bool") boolean IsLoopCond();
89+
public native @Cast("bool") boolean IsControlTrigger();
90+
public native @Cast("bool") boolean IsSend();
91+
public native @Cast("bool") boolean IsRecv();
92+
public native @Cast("bool") boolean IsConstant();
93+
public native @Cast("bool") boolean IsVariable();
94+
public native @Cast("bool") boolean IsIdentity();
95+
public native @Cast("bool") boolean IsGetSessionHandle();
96+
public native @Cast("bool") boolean IsGetSessionTensor();
97+
public native @Cast("bool") boolean IsDeleteSessionTensor();
98+
public native @Cast("bool") boolean IsControlFlow();
99+
public native @Cast("bool") boolean IsHostSend();
100+
public native @Cast("bool") boolean IsHostRecv();
101+
public native @Cast("bool") boolean IsScopedAllocator();
102+
public native @Cast("bool") boolean IsCollective();
103+
104+
public native @Cast("bool") boolean IsMetadata();
105+
public native @Cast("bool") boolean IsFakeParam();
106+
public native @Cast("bool") boolean IsPartitionedCall();
188107

189108
// Returns true if this node is any kind of function call node.
190109
//
191110
// NOTE: "function call nodes" include partitioned call ops, symbolic gradient
192111
// ops, and ops whose type_string is the name of a function ("function ops").
193-
public native @Cast("bool")
194-
boolean IsFunctionCall();
112+
public native @Cast("bool") boolean IsFunctionCall();
195113

196-
public native @Cast("bool")
197-
boolean IsIfNode();
114+
public native @Cast("bool") boolean IsIfNode();
115+
public native @Cast("bool") boolean IsWhileNode();
116+
public native @Cast("bool") boolean IsCaseNode();
117+
// Is this node a function input
118+
public native @Cast("bool") boolean IsArg();
119+
// Is this node a function output
120+
public native @Cast("bool") boolean IsRetval();
198121

199-
public native @Cast("bool")
200-
boolean IsWhileNode();
122+
201123

202-
public native @Cast("bool")
203-
boolean IsCaseNode();
124+
204125

205-
// Is this node a function input
206-
public native @Cast("bool")
207-
boolean IsArg();
208-
209-
// Is this node a function output
210-
public native @Cast("bool")
211-
boolean IsRetval();
126+
212127

213128
// Returns into '*e' the edge connecting to the 'idx' input of this Node.
214129

@@ -217,6 +132,8 @@ public Node(Pointer p) {
217132

218133
// Returns into '*n' the node that has an output connected to the
219134
// 'idx' input of this Node.
135+
136+
220137

221138
// Returns into '*t' the idx-th input tensor of this node, represented as the
222139
// output tensor of input_node(idx).

0 commit comments

Comments
 (0)