1 /* Copyright 2021 The TensorFlow Authors. All Rights Reserved. 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 6 7 http://www.apache.org/licenses/LICENSE-2.0 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 16 // This file is MACHINE GENERATED! Do not edit. 17 18 #ifndef TENSORFLOW_C_EXPERIMENTAL_OPS_MATH_OPS_H_ 19 #define TENSORFLOW_C_EXPERIMENTAL_OPS_MATH_OPS_H_ 20 21 #include "tensorflow/c/eager/abstract_context.h" 22 #include "tensorflow/c/eager/abstract_tensor_handle.h" 23 24 namespace tensorflow { 25 namespace ops { 26 27 // Returns x * y element-wise. 28 Status Mul(AbstractContext* ctx, AbstractTensorHandle* const x, 29 AbstractTensorHandle* const y, AbstractTensorHandle** z, 30 const char* name = nullptr, const char* raw_device_name = nullptr); 31 32 // Returns the complex conjugate of a complex number. 33 Status Conj(AbstractContext* ctx, AbstractTensorHandle* const input, 34 AbstractTensorHandle** output, const char* name = nullptr, 35 const char* raw_device_name = nullptr); 36 37 // Returns x + y element-wise. 38 Status AddV2(AbstractContext* ctx, AbstractTensorHandle* const x, 39 AbstractTensorHandle* const y, AbstractTensorHandle** z, 40 const char* name = nullptr, const char* raw_device_name = nullptr); 41 42 // Multiply the matrix "a" by the matrix "b". 43 Status MatMul(AbstractContext* ctx, AbstractTensorHandle* const a, 44 AbstractTensorHandle* const b, AbstractTensorHandle** product, 45 bool transpose_a = false, bool transpose_b = false, 46 const char* name = nullptr, 47 const char* raw_device_name = nullptr); 48 49 // Computes numerical negative value element-wise. 50 Status Neg(AbstractContext* ctx, AbstractTensorHandle* const x, 51 AbstractTensorHandle** y, const char* name = nullptr, 52 const char* raw_device_name = nullptr); 53 54 // Computes the sum of elements across dimensions of a tensor. 55 Status Sum(AbstractContext* ctx, AbstractTensorHandle* const input, 56 AbstractTensorHandle* const reduction_indices, 57 AbstractTensorHandle** output, bool keep_dims = false, 58 const char* name = nullptr, const char* raw_device_name = nullptr); 59 60 // Returns x - y element-wise. 61 Status Sub(AbstractContext* ctx, AbstractTensorHandle* const x, 62 AbstractTensorHandle* const y, AbstractTensorHandle** z, 63 const char* name = nullptr, const char* raw_device_name = nullptr); 64 65 // Returns x / y element-wise. 66 Status Div(AbstractContext* ctx, AbstractTensorHandle* const x, 67 AbstractTensorHandle* const y, AbstractTensorHandle** z, 68 const char* name = nullptr, const char* raw_device_name = nullptr); 69 70 // Returns 0 if the denominator is zero. 71 Status DivNoNan(AbstractContext* ctx, AbstractTensorHandle* const x, 72 AbstractTensorHandle* const y, AbstractTensorHandle** z, 73 const char* name = nullptr, 74 const char* raw_device_name = nullptr); 75 76 // Computes exponential of x element-wise. \\(y = e^x\\). 77 Status Exp(AbstractContext* ctx, AbstractTensorHandle* const x, 78 AbstractTensorHandle** y, const char* name = nullptr, 79 const char* raw_device_name = nullptr); 80 81 // Computes square root of x element-wise. 82 Status Sqrt(AbstractContext* ctx, AbstractTensorHandle* const x, 83 AbstractTensorHandle** y, const char* name = nullptr, 84 const char* raw_device_name = nullptr); 85 86 // Computes the gradient for the sqrt of `x` wrt its input. 87 Status SqrtGrad(AbstractContext* ctx, AbstractTensorHandle* const y, 88 AbstractTensorHandle* const dy, AbstractTensorHandle** z, 89 const char* name = nullptr, 90 const char* raw_device_name = nullptr); 91 92 // Computes natural logarithm of (1 + x) element-wise. 93 Status Log1p(AbstractContext* ctx, AbstractTensorHandle* const x, 94 AbstractTensorHandle** y, const char* name = nullptr, 95 const char* raw_device_name = nullptr); 96 97 } // namespace ops 98 } // namespace tensorflow 99 100 #endif // TENSORFLOW_C_EXPERIMENTAL_OPS_MATH_OPS_H_ 101