aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/graph/node_builder.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/core/graph/node_builder.cc')
-rw-r--r--tensorflow/core/graph/node_builder.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/tensorflow/core/graph/node_builder.cc b/tensorflow/core/graph/node_builder.cc
index 8de02cc2ca..df59950a16 100644
--- a/tensorflow/core/graph/node_builder.cc
+++ b/tensorflow/core/graph/node_builder.cc
@@ -28,17 +28,17 @@ NodeBuilder::NodeOut::NodeOut(Node* n, int i) // NOLINT(runtime/explicit)
index(i),
dt(SafeGetOutput(node, i, &error)) {}
-NodeBuilder::NodeOut::NodeOut(const string& name, int i, DataType t)
- : node(nullptr), error(false), name(name), index(i), dt(t) {}
+NodeBuilder::NodeOut::NodeOut(StringPiece n, int i, DataType t)
+ : node(nullptr), error(false), name(n.ToString()), index(i), dt(t) {}
NodeBuilder::NodeOut::NodeOut()
: node(nullptr), error(true), index(0), dt(DT_FLOAT) {}
-NodeBuilder::NodeBuilder(const string& name, const string& op_name,
+NodeBuilder::NodeBuilder(StringPiece name, StringPiece op_name,
const OpRegistryInterface* op_registry)
: def_builder_(name, op_name, op_registry) {}
-NodeBuilder::NodeBuilder(const string& name, const OpDef* op_def)
+NodeBuilder::NodeBuilder(StringPiece name, const OpDef* op_def)
: def_builder_(name, op_def) {}
NodeBuilder& NodeBuilder::Input(Node* src_node, int src_index) {
@@ -90,7 +90,7 @@ NodeBuilder& NodeBuilder::ControlInputs(gtl::ArraySlice<Node*> src_nodes) {
return *this;
}
-NodeBuilder& NodeBuilder::Device(const string& device_spec) {
+NodeBuilder& NodeBuilder::Device(StringPiece device_spec) {
def_builder_.Device(device_spec);
return *this;
}