aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/framework/tensor_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/core/framework/tensor_util.h')
-rw-r--r--tensorflow/core/framework/tensor_util.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/tensorflow/core/framework/tensor_util.h b/tensorflow/core/framework/tensor_util.h
new file mode 100644
index 0000000000..a8dde1d0ca
--- /dev/null
+++ b/tensorflow/core/framework/tensor_util.h
@@ -0,0 +1,21 @@
+#ifndef TENSORFLOW_FRAMEWORK_TENSOR_UTIL_H_
+#define TENSORFLOW_FRAMEWORK_TENSOR_UTIL_H_
+
+#include "tensorflow/core/public/tensor.h"
+
+namespace tensorflow {
+namespace tensor {
+
+// DeepCopy returns a tensor whose contents are a deep copy of the
+// contents of 'other'. This function is intended only for
+// convenience, not speed.
+//
+// REQUIRES: 'other' must point to data stored in CPU memory.
+// REQUIRES: 'other' must be a Tensor of a copy-able type if
+// 'other' is not appropriately memory-aligned.
+Tensor DeepCopy(const Tensor& other);
+
+} // namespace tensor
+} // namespace tensorflow
+
+#endif // TENSORFLOW_FRAMEWORK_TENSOR_UTIL_H_