aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/literal_util.cc
diff options
context:
space:
mode:
authorGravatar Sanjoy Das <sanjoy@google.com>2018-02-28 11:07:10 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-02-28 11:11:26 -0800
commit39a43c4f1d73b0210795d2003b127d3ffa284e98 (patch)
treeafcd8b44aa94a459325b34f6c11d0b4ec4e6fee3 /tensorflow/compiler/xla/literal_util.cc
parent12d8142dc1bb914fa3ff0a9029e9b6b71e36b9f5 (diff)
Introduce a ShapeUtil::ForEachIndexWithStatus, change index type to ArraySlice
This is not used yet, but I need it in a later CL. I don't specifically need the argument to be an ArraySlice, but it seemed cleaner than taking a const ref to a vector. No functional change intended. PiperOrigin-RevId: 187352376
Diffstat (limited to 'tensorflow/compiler/xla/literal_util.cc')
-rw-r--r--tensorflow/compiler/xla/literal_util.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/compiler/xla/literal_util.cc b/tensorflow/compiler/xla/literal_util.cc
index 823da43b5a..3962a9b316 100644
--- a/tensorflow/compiler/xla/literal_util.cc
+++ b/tensorflow/compiler/xla/literal_util.cc
@@ -223,7 +223,7 @@ Status Literal::CopySliceFromInternal(
Literal::StrideConfig stride_config(src_literal.shape(), shape(),
copy_size);
- auto copy_proc = [&](const std::vector<int64>& indexes) {
+ auto copy_proc = [&](tensorflow::gtl::ArraySlice<int64> indexes) {
// Map from multi-dimensional index, to source index.
std::transform(indexes.begin(), indexes.end(), src_base.begin(),
src_indexes.begin(), std::plus<int64>());