aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/cc/framework
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-06-02 13:22:15 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-06-02 13:25:44 -0700
commitf4b8d21b8e41636b6e61f0a1de753430108d2ee7 (patch)
tree107a27b633dfe9ac6a519da49f90dd7f186af7e0 /tensorflow/cc/framework
parent4905c0eae45fc509d21dd0b18b15d406e2d94bf8 (diff)
Change function parameters to references to avoid copying, or otherwise move from function parameters when moving reduces the amount of copying.
PiperOrigin-RevId: 157867333
Diffstat (limited to 'tensorflow/cc/framework')
-rw-r--r--tensorflow/cc/framework/testutil.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/tensorflow/cc/framework/testutil.cc b/tensorflow/cc/framework/testutil.cc
index b0746913a1..ca78f31db5 100644
--- a/tensorflow/cc/framework/testutil.cc
+++ b/tensorflow/cc/framework/testutil.cc
@@ -15,6 +15,8 @@ limitations under the License.
#include "tensorflow/cc/framework/testutil.h"
+#include <utility>
+
#include "tensorflow/cc/client/client_session.h"
#include "tensorflow/core/framework/tensor_testutil.h"
#include "tensorflow/core/graph/default_device.h"
@@ -30,7 +32,7 @@ void GetTensors(const Scope& scope, OutputList tensors,
void GetTensor(const Scope& scope, Output tensor, Tensor* out) {
std::vector<Tensor> outputs;
- GetTensors(scope, {tensor}, &outputs);
+ GetTensors(scope, {std::move(tensor)}, &outputs);
*out = outputs[0];
}