aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/lite/op_resolver.h
diff options
context:
space:
mode:
authorGravatar Yu-Cheng Ling <ycling@google.com>2018-05-31 15:50:55 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-05-31 15:53:48 -0700
commit6ca9a881ebd9bd3c7d4432dbddd779dafc8f936b (patch)
tree56c17e8259737e59c3e8d73884b67b7e95f6a2a2 /tensorflow/contrib/lite/op_resolver.h
parent28f8cf5cf2281682f70f4674192f9f31d68c5ee1 (diff)
Refactoring: Extract CombineHashes function into a shared module
PiperOrigin-RevId: 198793295
Diffstat (limited to 'tensorflow/contrib/lite/op_resolver.h')
-rw-r--r--tensorflow/contrib/lite/op_resolver.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/contrib/lite/op_resolver.h b/tensorflow/contrib/lite/op_resolver.h
index 38a2706942..9d7e3f2085 100644
--- a/tensorflow/contrib/lite/op_resolver.h
+++ b/tensorflow/contrib/lite/op_resolver.h
@@ -18,6 +18,7 @@ limitations under the License.
#include <unordered_map>
#include "tensorflow/contrib/lite/context.h"
#include "tensorflow/contrib/lite/schema/schema_generated.h"
+#include "tensorflow/contrib/lite/util.h"
namespace tflite {
@@ -55,8 +56,7 @@ struct OperatorKeyHasher {
size_t operator()(const T& x) const {
size_t a = ValueHasher<typename T::first_type>()(x.first);
size_t b = ValueHasher<typename T::second_type>()(x.second);
- // Hash combinator used by TensorFlow core.
- return a ^ (b + 0x9e3779b97f4a7800ULL + (a << 10) + (a >> 4));
+ return CombineHashes({a, b});
}
};
} // namespace op_resolver_hasher