1 /* Copyright 2017 The TensorFlow Authors. All Rights Reserved. 2 Licensed under the Apache License, Version 2.0 (the "License"); 3 you may not use this file except in compliance with the License. 4 You may obtain a copy of the License at 5 6 http://www.apache.org/licenses/LICENSE-2.0 7 8 Unless required by applicable law or agreed to in writing, software 9 distributed under the License is distributed on an "AS IS" BASIS, 10 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 See the License for the specific language governing permissions and 12 limitations under the License. 13 ==============================================================================*/ 14 #ifndef _TENSORFLOW_CORE_KERNELS_ADJUST_SATURATION_OP_H 15 #define _TENSORFLOW_CORE_KERNELS_ADJUST_SATURATION_OP_H 16 17 #if GOOGLE_CUDA 18 #define EIGEN_USE_GPU 19 20 #include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor" 21 22 #include "tensorflow/core/framework/types.h" 23 24 namespace tensorflow { 25 26 typedef Eigen::GpuDevice GPUDevice; 27 28 namespace functor { 29 30 struct AdjustSaturationGPU { 31 void operator()(GPUDevice* device, const int64 number_of_elements, 32 const float* const input, const float* const scale, 33 float* const output); 34 }; 35 36 } // namespace functor 37 } // namespace tensorflow 38 39 #endif // GOOGLE_CUDA 40 #endif // _TENSORFLOW_CORE_KERNELS_ADJUST_SATURATION_OP_H 41