• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Copyright 2015 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 #include "tensorflow/core/kernels/cwise_ops_common.h"
17 
18 namespace tensorflow {
19 REGISTER5(UnaryOp, CPU, "Inv", functor::inverse, float, Eigen::half, double,
20           complex64, complex128);
21 #if GOOGLE_CUDA
22 REGISTER4(UnaryOp, GPU, "Inv", functor::inverse, float, Eigen::half, double,
23           int64);
24 #endif
25 
26 REGISTER5(SimpleBinaryOp, CPU, "InvGrad", functor::inverse_grad, float,
27           Eigen::half, double, complex64, complex128);
28 #if GOOGLE_CUDA
29 REGISTER3(SimpleBinaryOp, GPU, "InvGrad", functor::inverse_grad, float,
30           Eigen::half, double);
31 #endif
32 
33 REGISTER5(UnaryOp, CPU, "Reciprocal", functor::inverse, float, Eigen::half,
34           double, complex64, complex128);
35 #if GOOGLE_CUDA
36 REGISTER4(UnaryOp, GPU, "Reciprocal", functor::inverse, float, Eigen::half,
37           double, int64);
38 #endif
39 #ifdef TENSORFLOW_USE_SYCL
40 REGISTER(UnaryOp, SYCL, "Reciprocal", functor::inverse, float);
41 #endif  // TENSORFLOW_USE_SYCL
42 
43 REGISTER5(SimpleBinaryOp, CPU, "ReciprocalGrad", functor::inverse_grad, float,
44           Eigen::half, double, complex64, complex128);
45 #if GOOGLE_CUDA
46 REGISTER3(SimpleBinaryOp, GPU, "ReciprocalGrad", functor::inverse_grad, float,
47           Eigen::half, double);
48 #endif
49 #ifdef TENSORFLOW_USE_SYCL
50 REGISTER(SimpleBinaryOp, SYCL, "ReciprocalGrad", functor::inverse_grad, float);
51 #endif  // TENSORFLOW_USE_SYCL
52 }  // namespace tensorflow
53