|
1 | 1 | /* Copyright 2019-2021 The TensorFlow Authors. All Rights Reserved. |
2 | 2 |
|
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 |
6 | 6 |
|
7 | | - http://www.apache.org/licenses/LICENSE-2.0 |
| 7 | + http://www.apache.org/licenses/LICENSE-2.0 |
8 | 8 |
|
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 | +*/ |
16 | 16 | package org.tensorflow.internal.c_api.presets; |
17 | 17 |
|
18 | 18 | import java.util.List; |
@@ -270,123 +270,39 @@ public void init(ClassProperties properties) { |
270 | 270 |
|
271 | 271 | @Override |
272 | 272 | public void map(InfoMap infoMap) { |
273 | | - infoMap |
274 | | - .put(new Info("TF_CAPI_EXPORT", "TF_Bool").cppTypes().annotations()) |
275 | | - .put( |
276 | | - new Info("TF_Buffer::data") |
277 | | - .javaText( |
278 | | - "public native @Const Pointer data(); public native TF_Buffer data(Pointer data);")) |
279 | | - .put( |
280 | | - new Info("TF_Status") |
281 | | - .pointerTypes("TF_Status") |
282 | | - .base("org.tensorflow.internal.c_api.AbstractTF_Status")) |
283 | | - .put( |
284 | | - new Info("TF_Buffer") |
285 | | - .pointerTypes("TF_Buffer") |
286 | | - .base("org.tensorflow.internal.c_api.AbstractTF_Buffer")) |
287 | | - .put( |
288 | | - new Info("TF_Tensor") |
289 | | - .pointerTypes("TF_Tensor") |
290 | | - .base("org.tensorflow.internal.c_api.AbstractTF_Tensor")) |
291 | | - .put( |
292 | | - new Info("TF_Session") |
293 | | - .pointerTypes("TF_Session") |
294 | | - .base("org.tensorflow.internal.c_api.AbstractTF_Session")) |
295 | | - .put( |
296 | | - new Info("TF_SessionOptions") |
297 | | - .pointerTypes("TF_SessionOptions") |
298 | | - .base("org.tensorflow.internal.c_api.AbstractTF_SessionOptions")) |
299 | | - .put( |
300 | | - new Info("TF_Graph") |
301 | | - .pointerTypes("TF_Graph") |
302 | | - .base("org.tensorflow.internal.c_api.AbstractTF_Graph")) |
303 | | - .put( |
304 | | - new Info("TF_Graph::graph") |
305 | | - .javaText("public native @MemberGetter @ByRef Graph graph();")) |
306 | | - .put( |
307 | | - new Info("TF_Graph::refiner") |
308 | | - .javaText("public native @MemberGetter @ByRef ShapeRefiner refiner();")) |
309 | | - .put( |
310 | | - new Info("TF_Function") |
311 | | - .pointerTypes("TF_Function") |
312 | | - .base("org.tensorflow.internal.c_api.AbstractTF_Function")) |
313 | | - .put( |
314 | | - new Info("TF_ImportGraphDefOptions") |
315 | | - .pointerTypes("TF_ImportGraphDefOptions") |
316 | | - .base("org.tensorflow.internal.c_api.AbstractTF_ImportGraphDefOptions")) |
317 | | - .put( |
318 | | - new Info( |
319 | | - "TF_Operation", |
320 | | - "TF_WhileParams", |
321 | | - "TFE_MonitoringCounterCell", |
322 | | - "TFE_MonitoringSamplerCell", |
323 | | - "TFE_MonitoringCounter0", |
324 | | - "TFE_MonitoringCounter1", |
325 | | - "TFE_MonitoringCounter2", |
326 | | - "TFE_MonitoringIntGaugeCell", |
327 | | - "TFE_MonitoringStringGaugeCell", |
328 | | - "TFE_MonitoringBoolGaugeCell", |
329 | | - "TFE_MonitoringIntGauge0", |
330 | | - "TFE_MonitoringIntGauge1", |
331 | | - "TFE_MonitoringIntGauge2", |
332 | | - "TFE_MonitoringStringGauge0", |
333 | | - "TFE_MonitoringStringGauge1", |
334 | | - "TFE_MonitoringStringGauge2", |
335 | | - "TFE_MonitoringBoolGauge0", |
336 | | - "TFE_MonitoringBoolGauge1", |
337 | | - "TFE_MonitoringBoolGauge2", |
338 | | - "TFE_MonitoringSampler0", |
339 | | - "TFE_MonitoringSampler1", |
340 | | - "TFE_MonitoringSampler2") |
341 | | - .purify()) |
342 | | - .put( |
343 | | - new Info("TF_Operation::node") |
344 | | - .javaText("public native @MemberGetter @ByRef Node node();")) |
345 | | - .put( |
346 | | - new Info("TFE_MonitoringCounterCell::cell") |
347 | | - .javaText("public native @MemberGetter @ByRef CounterCell cell();")) |
348 | | - .put( |
349 | | - new Info("TFE_MonitoringSamplerCell::cell") |
350 | | - .javaText("public native @MemberGetter @ByRef SamplerCell cell();")) |
351 | | - .put( |
352 | | - new Info("TFE_MonitoringIntGaugeCell::cell") |
353 | | - .javaText("public native @MemberGetter @ByRef IntGaugeCell cell();")) |
354 | | - .put( |
355 | | - new Info("TFE_MonitoringStringGaugeCell::cell") |
356 | | - .javaText("public native @MemberGetter @ByRef StringGaugeCell cell();")) |
357 | | - .put( |
358 | | - new Info("TFE_MonitoringBoolGaugeCell::cell") |
359 | | - .javaText("public native @MemberGetter @ByRef BoolGaugeCell cell();")) |
360 | | - .put( |
361 | | - new Info("TFE_Context") |
362 | | - .pointerTypes("TFE_Context") |
363 | | - .base("org.tensorflow.internal.c_api.AbstractTFE_Context")) |
364 | | - .put( |
365 | | - new Info("TFE_ContextOptions") |
366 | | - .pointerTypes("TFE_ContextOptions") |
367 | | - .base("org.tensorflow.internal.c_api.AbstractTFE_ContextOptions")) |
368 | | - .put( |
369 | | - new Info("TFE_Context::context") |
370 | | - .javaText("@MemberGetter public native @ByRef EagerContext context();")) |
371 | | - .put( |
372 | | - new Info("TFE_Op") |
373 | | - .pointerTypes("TFE_Op") |
374 | | - .base("org.tensorflow.internal.c_api.AbstractTFE_Op")) |
375 | | - .put( |
376 | | - new Info("TFE_Op::operation") |
377 | | - .javaText("@MemberGetter public native @ByRef EagerOperation operation();")) |
378 | | - .put( |
379 | | - new Info("TFE_TensorHandle") |
380 | | - .pointerTypes("TFE_TensorHandle") |
381 | | - .base("org.tensorflow.internal.c_api.AbstractTFE_TensorHandle")) |
382 | | - .put( |
383 | | - new Info("SP_Stream") |
384 | | - .cast() |
385 | | - .pointerTypes("Pointer")) |
386 | | - .put( |
387 | | - new Info( |
388 | | - "TF_ShapeInferenceContextDimValueKnown", |
389 | | - "TFE_NewTensorHandle(const tensorflow::Tensor&, TF_Status*)") |
390 | | - .skip()); |
| 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_Function").pointerTypes("TF_Function").base("org.tensorflow.internal.c_api.AbstractTF_Function")) |
| 284 | + .put(new Info("TF_ImportGraphDefOptions").pointerTypes("TF_ImportGraphDefOptions") |
| 285 | + .base("org.tensorflow.internal.c_api.AbstractTF_ImportGraphDefOptions")) |
| 286 | + .put(new Info("TF_Operation", "TF_WhileParams", "TFE_MonitoringCounterCell", "TFE_MonitoringSamplerCell", |
| 287 | + "TFE_MonitoringCounter0", "TFE_MonitoringCounter1", "TFE_MonitoringCounter2", |
| 288 | + "TFE_MonitoringIntGaugeCell", "TFE_MonitoringStringGaugeCell", "TFE_MonitoringBoolGaugeCell", |
| 289 | + "TFE_MonitoringIntGauge0", "TFE_MonitoringIntGauge1", "TFE_MonitoringIntGauge2", |
| 290 | + "TFE_MonitoringStringGauge0", "TFE_MonitoringStringGauge1", "TFE_MonitoringStringGauge2", |
| 291 | + "TFE_MonitoringBoolGauge0", "TFE_MonitoringBoolGauge1", "TFE_MonitoringBoolGauge2", |
| 292 | + "TFE_MonitoringSampler0", "TFE_MonitoringSampler1", "TFE_MonitoringSampler2").purify()) |
| 293 | + .put(new Info("TF_Operation::node").javaText("public native @MemberGetter @ByRef Node node();")) |
| 294 | + .put(new Info("TFE_MonitoringCounterCell::cell").javaText("public native @MemberGetter @ByRef CounterCell cell();")) |
| 295 | + .put(new Info("TFE_MonitoringSamplerCell::cell").javaText("public native @MemberGetter @ByRef SamplerCell cell();")) |
| 296 | + .put(new Info("TFE_MonitoringIntGaugeCell::cell").javaText("public native @MemberGetter @ByRef IntGaugeCell cell();")) |
| 297 | + .put(new Info("TFE_MonitoringStringGaugeCell::cell").javaText("public native @MemberGetter @ByRef StringGaugeCell cell();")) |
| 298 | + .put(new Info("TFE_MonitoringBoolGaugeCell::cell").javaText("public native @MemberGetter @ByRef BoolGaugeCell cell();")) |
| 299 | + .put(new Info("TFE_Context").pointerTypes("TFE_Context").base("org.tensorflow.internal.c_api.AbstractTFE_Context")) |
| 300 | + .put(new Info("TFE_ContextOptions").pointerTypes("TFE_ContextOptions").base("org.tensorflow.internal.c_api.AbstractTFE_ContextOptions")) |
| 301 | + .put(new Info("TFE_Context::context").javaText("@MemberGetter public native @ByRef EagerContext context();")) |
| 302 | + .put(new Info("TFE_Op").pointerTypes("TFE_Op").base("org.tensorflow.internal.c_api.AbstractTFE_Op")) |
| 303 | + .put(new Info("TFE_Op::operation").javaText("@MemberGetter public native @ByRef EagerOperation operation();")) |
| 304 | + .put(new Info("TFE_TensorHandle").pointerTypes("TFE_TensorHandle").base("org.tensorflow.internal.c_api.AbstractTFE_TensorHandle")) |
| 305 | + .put(new Info("SP_Stream").cast().pointerTypes("Pointer")) |
| 306 | + .put(new Info("TF_ShapeInferenceContextDimValueKnown", "TFE_NewTensorHandle(const tensorflow::Tensor&, TF_Status*)").skip()); |
391 | 307 | } |
392 | 308 | } |
0 commit comments