Skip to content

Commit 9da472e

Browse files
committed
Fix format issues
1 parent 688fcbb commit 9da472e

File tree

1 file changed

+44
-15
lines changed
  • tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/internal/c_api/presets

1 file changed

+44
-15
lines changed

tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/internal/c_api/presets/tensorflow.java

+44-15
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
/* Copyright 2019-2021 The TensorFlow Authors. All Rights Reserved.
22
3-
Licensed under the Apache License, Version 2.0 (the "License");
4-
you may not use this file except in compliance with the License.
5-
You may obtain a copy of the License at
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
66
7-
http://www.apache.org/licenses/LICENSE-2.0
7+
http://www.apache.org/licenses/LICENSE-2.0
88
9-
Unless required by applicable law or agreed to in writing, software
10-
distributed under the License is distributed on an "AS IS" BASIS,
11-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
See the License for the specific language governing permissions and
13-
limitations under the License.
14-
=======================================================================
15-
*/
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.
14+
=======================================================================
15+
*/
1616
package org.tensorflow.internal.c_api.presets;
1717

1818
import java.util.List;
@@ -270,6 +270,38 @@ public void init(ClassProperties properties) {
270270

271271
@Override
272272
public void map(InfoMap infoMap) {
273+
infoMap.put(new Info("TF_CAPI_EXPORT", "TF_Bool").cppTypes().annotations())
274+
.put(new Info("TF_Buffer::data").javaText("public native @Const Pointer data(); public native TF_Buffer data(Pointer data);"))
275+
.put(new Info("TF_Status").pointerTypes("TF_Status").base("org.tensorflow.internal.c_api.AbstractTF_Status"))
276+
.put(new Info("TF_Buffer").pointerTypes("TF_Buffer").base("org.tensorflow.internal.c_api.AbstractTF_Buffer"))
277+
.put(new Info("TF_Tensor").pointerTypes("TF_Tensor").base("org.tensorflow.internal.c_api.AbstractTF_Tensor"))
278+
.put(new Info("TF_Session").pointerTypes("TF_Session").base("org.tensorflow.internal.c_api.AbstractTF_Session"))
279+
.put(new Info("TF_SessionOptions").pointerTypes("TF_SessionOptions").base("org.tensorflow.internal.c_api.AbstractTF_SessionOptions"))
280+
.put(new Info("TF_Graph").pointerTypes("TF_Graph").base("org.tensorflow.internal.c_api.AbstractTF_Graph"))
281+
.put(new Info("TF_Graph::graph").javaText("public native @MemberGetter @ByRef Graph graph();"))
282+
.put(new Info("TF_Graph::refiner").javaText("public native @MemberGetter @ByRef ShapeRefiner refiner();"))
283+
.put(new Info("TF_ImportGraphDefOptions").pointerTypes("TF_ImportGraphDefOptions").base("org.tensorflow.internal.c_api.AbstractTF_ImportGraphDefOptions"))
284+
.put(new Info("TF_Operation", "TF_WhileParams", "TFE_MonitoringCounterCell", "TFE_MonitoringSamplerCell",
285+
"TFE_MonitoringCounter0", "TFE_MonitoringCounter1", "TFE_MonitoringCounter2",
286+
"TFE_MonitoringIntGaugeCell", "TFE_MonitoringStringGaugeCell", "TFE_MonitoringBoolGaugeCell",
287+
"TFE_MonitoringIntGauge0", "TFE_MonitoringIntGauge1", "TFE_MonitoringIntGauge2",
288+
"TFE_MonitoringStringGauge0", "TFE_MonitoringStringGauge1", "TFE_MonitoringStringGauge2",
289+
"TFE_MonitoringBoolGauge0", "TFE_MonitoringBoolGauge1", "TFE_MonitoringBoolGauge2",
290+
"TFE_MonitoringSampler0", "TFE_MonitoringSampler1", "TFE_MonitoringSampler2").purify())
291+
.put(new Info("TF_Operation::node").javaText("public native @MemberGetter @ByRef Node node();"))
292+
.put(new Info("TFE_MonitoringCounterCell::cell").javaText("public native @MemberGetter @ByRef CounterCell cell();"))
293+
.put(new Info("TFE_MonitoringSamplerCell::cell").javaText("public native @MemberGetter @ByRef SamplerCell cell();"))
294+
.put(new Info("TFE_MonitoringIntGaugeCell::cell").javaText("public native @MemberGetter @ByRef IntGaugeCell cell();"))
295+
.put(new Info("TFE_MonitoringStringGaugeCell::cell").javaText("public native @MemberGetter @ByRef StringGaugeCell cell();"))
296+
.put(new Info("TFE_MonitoringBoolGaugeCell::cell").javaText("public native @MemberGetter @ByRef BoolGaugeCell cell();"))
297+
.put(new Info("TFE_Context").pointerTypes("TFE_Context").base("org.tensorflow.internal.c_api.AbstractTFE_Context"))
298+
.put(new Info("TFE_ContextOptions").pointerTypes("TFE_ContextOptions").base("org.tensorflow.internal.c_api.AbstractTFE_ContextOptions"))
299+
.put(new Info("TFE_Context::context").javaText("@MemberGetter public native @ByRef EagerContext context();"))
300+
.put(new Info("TFE_Op").pointerTypes("TFE_Op").base("org.tensorflow.internal.c_api.AbstractTFE_Op"))
301+
.put(new Info("TFE_Op::operation").javaText("@MemberGetter public native @ByRef EagerOperation operation();"))
302+
.put(new Info("TFE_TensorHandle").pointerTypes("TFE_TensorHandle").base("org.tensorflow.internal.c_api.AbstractTFE_TensorHandle"))
303+
.put(new Info("SP_Stream").cast().pointerTypes("Pointer"))
304+
.put(new Info("TF_ShapeInferenceContextDimValueKnown", "TFE_NewTensorHandle(const tensorflow::Tensor&, TF_Status*)").skip());
273305
infoMap
274306
.put(new Info("TF_CAPI_EXPORT", "TF_Bool").cppTypes().annotations())
275307
.put(
@@ -379,10 +411,7 @@ public void map(InfoMap infoMap) {
379411
new Info("TFE_TensorHandle")
380412
.pointerTypes("TFE_TensorHandle")
381413
.base("org.tensorflow.internal.c_api.AbstractTFE_TensorHandle"))
382-
.put(
383-
new Info("SP_Stream")
384-
.cast()
385-
.pointerTypes("Pointer"))
414+
.put(new Info("SP_Stream").cast().pointerTypes("Pointer"))
386415
.put(
387416
new Info(
388417
"TF_ShapeInferenceContextDimValueKnown",

0 commit comments

Comments
 (0)