1/* Copyright 2016 The TensorFlow Authors. All Rights Reserved.
2
3Licensed under the Apache License, Version 2.0 (the "License");
4you may not use this file except in compliance with the License.
5You may obtain a copy of the License at
6
7 http://www.apache.org/licenses/LICENSE-2.0
8
9Unless required by applicable law or agreed to in writing, software
10distributed under the License is distributed on an "AS IS" BASIS,
11WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12See the License for the specific language governing permissions and
13limitations 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
23namespace tensorflow {
24
25namespace functor {
26
27typedef 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
35TF_CALL_float(DEFINE_TYPE);
36TF_CALL_bfloat16(DEFINE_TYPE);
37TF_CALL_double(DEFINE_TYPE);
38TF_CALL_int16(DEFINE_TYPE);
39TF_CALL_int32(DEFINE_TYPE);
40TF_CALL_int64(DEFINE_TYPE);
41TF_CALL_half(DEFINE_TYPE);
42TF_CALL_complex64(DEFINE_TYPE);
43TF_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