@@ -4459,6 +4459,183 @@ public static native void TFE_ContextExportRunMetadata(TFE_Context ctx,
44594459// #endif // TENSORFLOW_CC_FRAMEWORK_SCOPE_H_
44604460
44614461
4462+ // Parsed from tensorflow/cc/framework/grad_op_registry.h
4463+
4464+ /* Copyright 2016 The TensorFlow Authors. All Rights Reserved.
4465+
4466+ Licensed under the Apache License, Version 2.0 (the "License");
4467+ you may not use this file except in compliance with the License.
4468+ You may obtain a copy of the License at
4469+
4470+ http://www.apache.org/licenses/LICENSE-2.0
4471+
4472+ Unless required by applicable law or agreed to in writing, software
4473+ distributed under the License is distributed on an "AS IS" BASIS,
4474+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4475+ See the License for the specific language governing permissions and
4476+ limitations under the License.
4477+ ==============================================================================*/
4478+
4479+ // #ifndef TENSORFLOW_CC_FRAMEWORK_GRAD_OP_REGISTRY_H_
4480+ // #define TENSORFLOW_CC_FRAMEWORK_GRAD_OP_REGISTRY_H_
4481+
4482+ // #include <unordered_map>
4483+
4484+ // #include "tensorflow/cc/framework/ops.h"
4485+ // #include "tensorflow/cc/framework/scope.h"
4486+ // Targeting ../GradFunc.java
4487+
4488+
4489+ // Targeting ../GradOpRegistry.java
4490+
4491+
4492+
4493+ // namespace ops
4494+
4495+ // Macros used to define gradient functions for ops.
4496+ // #define REGISTER_GRADIENT_OP(name, fn)
4497+ // REGISTER_GRADIENT_OP_UNIQ_HELPER(__COUNTER__, name, fn)
4498+
4499+ // #define REGISTER_NO_GRADIENT_OP(name)
4500+ // REGISTER_GRADIENT_OP_UNIQ_HELPER(__COUNTER__, name, nullptr)
4501+
4502+ // #define REGISTER_GRADIENT_OP_UNIQ_HELPER(ctr, name, fn)
4503+ // REGISTER_GRADIENT_OP_UNIQ(ctr, name, fn)
4504+
4505+ // #define REGISTER_GRADIENT_OP_UNIQ(ctr, name, fn)
4506+ // static bool unused_ret_val_##ctr =
4507+ // ::tensorflow::ops::GradOpRegistry::Global()->Register(name, fn)
4508+
4509+ // namespace tensorflow
4510+
4511+ // #endif // TENSORFLOW_CC_FRAMEWORK_GRAD_OP_REGISTRY_H_
4512+
4513+
4514+ // Parsed from tensorflow/core/platform/status.h
4515+
4516+ /* Copyright 2015 The TensorFlow Authors. All Rights Reserved.
4517+
4518+ Licensed under the Apache License, Version 2.0 (the "License");
4519+ you may not use this file except in compliance with the License.
4520+ You may obtain a copy of the License at
4521+
4522+ http://www.apache.org/licenses/LICENSE-2.0
4523+
4524+ Unless required by applicable law or agreed to in writing, software
4525+ distributed under the License is distributed on an "AS IS" BASIS,
4526+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4527+ See the License for the specific language governing permissions and
4528+ limitations under the License.
4529+ ==============================================================================*/
4530+
4531+ // #ifndef TENSORFLOW_CORE_PLATFORM_STATUS_H_
4532+ // #define TENSORFLOW_CORE_PLATFORM_STATUS_H_
4533+
4534+ // #include <functional>
4535+ // #include <iosfwd>
4536+ // #include <memory>
4537+ // #include <string>
4538+
4539+ // #include "tensorflow/core/platform/logging.h"
4540+ // #include "tensorflow/core/platform/macros.h"
4541+ // #include "tensorflow/core/platform/stringpiece.h"
4542+ // #include "tensorflow/core/platform/types.h"
4543+ // #include "tensorflow/core/protobuf/error_codes.pb.h"
4544+
4545+ // A struct representing a frame in a stack trace.
4546+
4547+ // #if defined(__clang__)
4548+ // Only clang supports warn_unused_result as a type annotation.
4549+ // Targeting ../NativeStatus.java
4550+
4551+
4552+
4553+ // Helper class to manage multiple child status values.
4554+
4555+
4556+
4557+
4558+
4559+ // #ifndef SWIG
4560+
4561+
4562+
4563+ // #endif // SWIG
4564+
4565+
4566+
4567+
4568+
4569+ /** \ingroup core */
4570+ @ Namespace ("tensorflow" ) public static native @ Cast ("std::ostream*" ) @ ByRef @ Name ("operator <<" ) Pointer shiftLeft (@ Cast ("std::ostream*" ) @ ByRef Pointer os , @ Const @ ByRef NativeStatus x );
4571+
4572+ @ Namespace ("tensorflow" ) public static native @ StdString BytePointer TfCheckOpHelperOutOfLine (
4573+ @ Const @ ByRef NativeStatus v , @ Cast ("const char*" ) BytePointer msg );
4574+ @ Namespace ("tensorflow" ) public static native @ StdString BytePointer TfCheckOpHelperOutOfLine (
4575+ @ Const @ ByRef NativeStatus v , String msg );
4576+
4577+ @ Namespace ("tensorflow" ) public static native @ StdString BytePointer TfCheckOpHelper (@ ByVal NativeStatus v ,
4578+ @ Cast ("const char*" ) BytePointer msg );
4579+ @ Namespace ("tensorflow" ) public static native @ StdString BytePointer TfCheckOpHelper (@ ByVal NativeStatus v ,
4580+ String msg );
4581+
4582+ // #define TF_DO_CHECK_OK(val, level)
4583+ // while (auto _result = ::tensorflow::TfCheckOpHelper(val, #val))
4584+ // LOG(level) << *(_result)
4585+
4586+ // #define TF_CHECK_OK(val) TF_DO_CHECK_OK(val, FATAL)
4587+ // #define TF_QCHECK_OK(val) TF_DO_CHECK_OK(val, QFATAL)
4588+
4589+ // DEBUG only version of TF_CHECK_OK. Compiler still parses 'val' even in opt
4590+ // mode.
4591+ // #ifndef NDEBUG
4592+ // #define TF_DCHECK_OK(val) TF_CHECK_OK(val)
4593+ // #else
4594+ // #define TF_DCHECK_OK(val)
4595+ // while (false && (::tensorflow::Status::OK() == (val))) LOG(FATAL)
4596+ // #endif
4597+
4598+ // namespace tensorflow
4599+
4600+ // #endif // TENSORFLOW_CORE_PLATFORM_STATUS_H_
4601+
4602+
4603+ // Parsed from tensorflow/c/tf_status_helper.h
4604+
4605+ /* Copyright 2016 The TensorFlow Authors. All Rights Reserved.
4606+
4607+ Licensed under the Apache License, Version 2.0 (the "License");
4608+ you may not use this file except in compliance with the License.
4609+ You may obtain a copy of the License at
4610+
4611+ http://www.apache.org/licenses/LICENSE-2.0
4612+
4613+ Unless required by applicable law or agreed to in writing, software
4614+ distributed under the License is distributed on an "AS IS" BASIS,
4615+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4616+ See the License for the specific language governing permissions and
4617+ limitations under the License.
4618+ ==============================================================================*/
4619+
4620+ // #ifndef TENSORFLOW_C_TF_STATUS_HELPER_H_
4621+ // #define TENSORFLOW_C_TF_STATUS_HELPER_H_
4622+
4623+ // #include "tensorflow/c/tf_status.h"
4624+ // #include "tensorflow/core/platform/status.h"
4625+
4626+ // Set the attribute of "tf_status" from the attributes of "status".
4627+ @ Namespace ("tensorflow" ) public static native void Set_TF_Status_from_Status (TF_Status tf_status ,
4628+ @ Const @ ByRef NativeStatus status );
4629+
4630+ // Returns a "status" from "tf_status".
4631+ @ Namespace ("tensorflow" ) public static native @ ByVal NativeStatus StatusFromTF_Status (@ Const TF_Status tf_status );
4632+ // namespace internal
4633+
4634+ // namespace tensorflow
4635+
4636+ // #endif // TENSORFLOW_C_TF_STATUS_HELPER_H_
4637+
4638+
44624639// Targeting ../TF_Graph.java
44634640
44644641
0 commit comments