diff options
author | 2018-09-28 17:04:06 -0700 | |
---|---|---|
committer | 2018-09-28 17:07:26 -0700 | |
commit | 3c01aa2b00ee4c3fda412b23da39fd0894c04cf7 (patch) | |
tree | 90785846d488ffd2ccf316bb1f09ef1854990713 /tensorflow/core/framework/op.h | |
parent | 43e4905a8e554291656bcf65eb7d17d6019df9f8 (diff) |
Bunch of micro move optimizations
PiperOrigin-RevId: 215018984
Diffstat (limited to 'tensorflow/core/framework/op.h')
-rw-r--r-- | tensorflow/core/framework/op.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tensorflow/core/framework/op.h b/tensorflow/core/framework/op.h index 25f8de8dcc..81ed5f95f0 100644 --- a/tensorflow/core/framework/op.h +++ b/tensorflow/core/framework/op.h @@ -209,16 +209,16 @@ template <> class OpDefBuilderWrapper<true> { public: OpDefBuilderWrapper(const char name[]) : builder_(name) {} - OpDefBuilderWrapper<true>& Attr(StringPiece spec) { - builder_.Attr(spec); + OpDefBuilderWrapper<true>& Attr(string spec) { + builder_.Attr(std::move(spec)); return *this; } - OpDefBuilderWrapper<true>& Input(StringPiece spec) { - builder_.Input(spec); + OpDefBuilderWrapper<true>& Input(string spec) { + builder_.Input(std::move(spec)); return *this; } - OpDefBuilderWrapper<true>& Output(StringPiece spec) { - builder_.Output(spec); + OpDefBuilderWrapper<true>& Output(string spec) { + builder_.Output(std::move(spec)); return *this; } OpDefBuilderWrapper<true>& SetIsCommutative() { @@ -237,12 +237,12 @@ class OpDefBuilderWrapper<true> { builder_.SetAllowsUninitializedInput(); return *this; } - OpDefBuilderWrapper<true>& Deprecated(int version, StringPiece explanation) { - builder_.Deprecated(version, explanation); + OpDefBuilderWrapper<true>& Deprecated(int version, string explanation) { + builder_.Deprecated(version, std::move(explanation)); return *this; } - OpDefBuilderWrapper<true>& Doc(StringPiece text) { - builder_.Doc(text); + OpDefBuilderWrapper<true>& Doc(string text) { + builder_.Doc(std::move(text)); return *this; } OpDefBuilderWrapper<true>& SetShapeFn( |