aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/cc/framework
diff options
context:
space:
mode:
authorGravatar Peter Hawkins <phawkins@google.com>2017-05-09 09:14:16 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-05-10 16:29:47 -0700
commit1d0b8c007b8bc7f77dd63c74f02d87185071f038 (patch)
treeb72df4064224d66c62bb4a126efb06fa214fa439 /tensorflow/cc/framework
parentb9845c6d0d5dc601fb3b58206a7070aa8937af4f (diff)
Remove unnecessary copies of value parameters.
PiperOrigin-RevId: 155511618
Diffstat (limited to 'tensorflow/cc/framework')
-rw-r--r--tensorflow/cc/framework/cc_op_gen.cc2
-rw-r--r--tensorflow/cc/framework/cc_ops_test.cc3
2 files changed, 3 insertions, 2 deletions
diff --git a/tensorflow/cc/framework/cc_op_gen.cc b/tensorflow/cc/framework/cc_op_gen.cc
index b7e9948e9d..799492a4eb 100644
--- a/tensorflow/cc/framework/cc_op_gen.cc
+++ b/tensorflow/cc/framework/cc_op_gen.cc
@@ -198,7 +198,7 @@ string PrintTensorProto(const TensorProto& proto) {
").AsTensorProto()");
}
-string PrintAttrValue(string op, const AttrValue& attr_value) {
+string PrintAttrValue(const string& op, const AttrValue& attr_value) {
switch (attr_value.value_case()) {
case AttrValue::kS:
return PrintString(attr_value.s());
diff --git a/tensorflow/cc/framework/cc_ops_test.cc b/tensorflow/cc/framework/cc_ops_test.cc
index 6dc0d84c16..92c97d107d 100644
--- a/tensorflow/cc/framework/cc_ops_test.cc
+++ b/tensorflow/cc/framework/cc_ops_test.cc
@@ -32,7 +32,8 @@ Output Linear(const Scope& scope, Input x, Input w, Input b) {
return BiasAdd(cop_scopes.last, m, b);
}
-void GetColocationConstraints(Output tensor, std::vector<string>* constraints) {
+void GetColocationConstraints(const Output& tensor,
+ std::vector<string>* constraints) {
constraints->clear();
TF_EXPECT_OK(
GetNodeAttr(tensor.op().node()->def(), kColocationAttrName, constraints));