aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/kernels/split_lib.h
diff options
context:
space:
mode:
authorGravatar Josh Levenberg <josh11b@tensorflow.org>2016-02-23 13:53:22 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-02-24 15:31:20 -0800
commit2408e359cc9e51bedf561fc62c0a40e337fa63b9 (patch)
tree09bdde4aa893a7466a2258099804ee59ca049412 /tensorflow/core/kernels/split_lib.h
parente7c6ffde2e212c2b6998fbb162ba60c5f5026573 (diff)
Give tensorflow/core/kernels/ its own BUILD file.
Change: 115379524
Diffstat (limited to 'tensorflow/core/kernels/split_lib.h')
-rw-r--r--tensorflow/core/kernels/split_lib.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/tensorflow/core/kernels/split_lib.h b/tensorflow/core/kernels/split_lib.h
new file mode 100644
index 0000000000..fdef47ad79
--- /dev/null
+++ b/tensorflow/core/kernels/split_lib.h
@@ -0,0 +1,46 @@
+/* Copyright 2015 Google Inc. All Rights Reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+==============================================================================*/
+
+#ifndef TENSORFLOW_KERNELS_SPLIT_LIB_H_
+#define TENSORFLOW_KERNELS_SPLIT_LIB_H_
+// Functor definition for SplitOp, must be compilable by nvcc.
+
+#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
+#include "tensorflow/core/framework/tensor_types.h"
+
+namespace tensorflow {
+namespace functor {
+
+template <typename Device, typename T>
+struct Split {
+ void operator()(const Device& d, typename TTypes<T, 3>::Tensor output,
+ typename TTypes<T, 3>::ConstTensor input,
+ const Eigen::DSizes<Eigen::DenseIndex, 3>& slice_indices,
+ const Eigen::DSizes<Eigen::DenseIndex, 3>& slice_sizes);
+};
+
+template <typename T>
+struct Split<Eigen::ThreadPoolDevice, T> {
+ void operator()(const Eigen::ThreadPoolDevice& d,
+ typename TTypes<T, 3>::Tensor output,
+ typename TTypes<T, 3>::ConstTensor input,
+ const Eigen::DSizes<Eigen::DenseIndex, 3>& slice_indices,
+ const Eigen::DSizes<Eigen::DenseIndex, 3>& slice_sizes);
+};
+
+} // namespace functor
+} // namespace tensorflow
+
+#endif // TENSORFLOW_KERNELS_SPLIT_LIB_H_