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 #if !GOOGLE_CUDA && !TENSORFLOW_USE_ROCM 17 #error This file must only be included when building with Cuda or ROCm support 18 #endif 19 20 #ifndef TENSORFLOW_CORE_KERNELS_POOLING_OPS_3D_GPU_H_ 21 #define TENSORFLOW_CORE_KERNELS_POOLING_OPS_3D_GPU_H_ 22 23 #define EIGEN_USE_GPU 24 25 #include "tensorflow/core/framework/tensor_types.h" 26 #include "tensorflow/core/platform/types.h" 27 #include "tensorflow/core/util/tensor_format.h" 28 29 namespace tensorflow { 30 31 namespace functor { 32 template <typename T> 33 struct MaxPool3dGradBackward { 34 bool operator()(TensorFormat data_format, const T* bottom_data, 35 const T* output_data, const int batch, const int pooled_plane, 36 const int pooled_height, const int pooled_width, 37 const int channels, const int plane, const int height, 38 const int width, const int kernel_p, const int kernel_h, 39 const int kernel_w, const int stride_p, const int stride_h, 40 const int stride_w, const int pad_p, const int pad_t, 41 const int pad_l, const T* top_diff, T* bottom_diff, 42 const Eigen::GpuDevice& d); 43 }; 44 } // namespace functor 45 46 } // namespace tensorflow 47 48 #endif // TENSORFLOW_CORE_KERNELS_POOLING_OPS_3D_GPU_H_ 49