diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2017-11-13 11:41:38 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-11-13 11:53:36 -0800 |
commit | 0a79d4ab6ab961d7f36cbb3a14cfaff2152e70fd (patch) | |
tree | 07a87e026711ea484e0fdf740a78960d541ddce7 /tensorflow/core/framework/variant_op_registry.h | |
parent | 73bc96ffc009283058c9d55b494745631a931814 (diff) |
Moved tensorflow::StringPiece::Hasher out of tensorflow::StringPiece and renamed it tensorflow::StringPieceHasher. This allows tensorflow::StringPiece to be more easily replaced with absl::string_view (which does not contain a Hasher struct).
PiperOrigin-RevId: 175563786
Diffstat (limited to 'tensorflow/core/framework/variant_op_registry.h')
-rw-r--r-- | tensorflow/core/framework/variant_op_registry.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tensorflow/core/framework/variant_op_registry.h b/tensorflow/core/framework/variant_op_registry.h index 831dbd3dff..13f6908cae 100644 --- a/tensorflow/core/framework/variant_op_registry.h +++ b/tensorflow/core/framework/variant_op_registry.h @@ -145,9 +145,8 @@ class UnaryVariantOpRegistry { static std::unordered_set<string>* PersistentStringStorage(); private: - std::unordered_map<StringPiece, VariantShapeFn, StringPiece::Hasher> - shape_fns; - std::unordered_map<StringPiece, VariantDecodeFn, StringPiece::Hasher> + std::unordered_map<StringPiece, VariantShapeFn, StringPieceHasher> shape_fns; + std::unordered_map<StringPiece, VariantDecodeFn, StringPieceHasher> decode_fns; // Map std::pair<Direction, type_name> to function. @@ -159,7 +158,7 @@ class UnaryVariantOpRegistry { ret = Hash64Combine(ret, sp_hasher_(std::get<1>(x))); return ret; } - StringPiece::Hasher sp_hasher_; + StringPieceHasher sp_hasher_; }; std::unordered_map<std::pair<VariantDeviceCopyDirection, StringPiece>, @@ -177,7 +176,7 @@ class UnaryVariantOpRegistry { ret = Hash64Combine(ret, sp_hasher_(std::get<2>(x))); return ret; } - StringPiece::Hasher sp_hasher_; + StringPieceHasher sp_hasher_; }; std::unordered_map<std::tuple<VariantUnaryOp, StringPiece, StringPiece>, VariantUnaryOpFn, TupleHash> |