#if GOOGLE_CUDA #define EIGEN_USE_GPU #include "tensorflow/core/platform/port.h" #include "tensorflow/core/kernels/transpose_op_functor.h" namespace tensorflow { namespace functor { template struct TransposeFunctor { void operator()(const Eigen::GpuDevice& d, typename TTypes::Tensor out, typename TTypes::ConstTensor in, const int* perm) { Transpose(d, out, in, perm); } }; #define DEFINE(T, N) template struct TransposeFunctor; #define DEFINE_DIM(T) \ DEFINE(T, 1); \ DEFINE(T, 2); \ DEFINE(T, 3); \ DEFINE(T, 4); \ DEFINE(T, 5); \ DEFINE(T, 6); \ DEFINE(T, 7); \ DEFINE(T, 8); DEFINE_DIM(uint8); DEFINE_DIM(int8); DEFINE_DIM(int16); DEFINE_DIM(int32); DEFINE_DIM(int64); DEFINE_DIM(float); DEFINE_DIM(double); #undef DEFINE_DIM #undef DEFINE } // end namespace functor } // end namespace tensorflow #endif // GOOGLE_CUDA