• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Copyright 2016 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 #ifndef TENSORFLOW_CORE_KERNELS_TILE_OPS_CPU_IMPL_H_
16 #define TENSORFLOW_CORE_KERNELS_TILE_OPS_CPU_IMPL_H_
17 
18 #define EIGEN_USE_THREADS
19 
20 #include "tensorflow/core/framework/register_types.h"
21 #include "tensorflow/core/kernels/tile_ops_impl.h"
22 
23 namespace tensorflow {
24 
25 namespace functor {
26 
27 typedef Eigen::ThreadPoolDevice CPUDevice;
28 
29 // Register functors used for TileGradientOp.
30 #define DEFINE_DIM(T, NDIM)                     \
31   template struct TileGrad<CPUDevice, T, NDIM>; \
32   template struct ReduceAndReshape<CPUDevice, T, NDIM, 1>;
33 #define DEFINE_TYPE(T) DEFINE_DIM(T, CPU_PROVIDED_IXDIM)
34 
35 TF_CALL_float(DEFINE_TYPE);
36 TF_CALL_bfloat16(DEFINE_TYPE);
37 TF_CALL_double(DEFINE_TYPE);
38 TF_CALL_int16(DEFINE_TYPE);
39 TF_CALL_int32(DEFINE_TYPE);
40 TF_CALL_int64(DEFINE_TYPE);
41 TF_CALL_half(DEFINE_TYPE);
42 TF_CALL_complex64(DEFINE_TYPE);
43 TF_CALL_complex128(DEFINE_TYPE);
44 
45 #undef DEFINE_DIM
46 #undef DEFINE_TYPE
47 
48 
49 }  // end namespace functor
50 }  // end namespace tensorflow
51 
52 #endif  // TENSORFLOW_CORE_KERNELS_TILE_OPS_CPU_IMPL_H_
53