From 1d6a21fd0870aa25dc701cdd94089a2999bb9fd0 Mon Sep 17 00:00:00 2001 From: Moshe David Date: Mon, 14 Sep 2020 19:01:59 +0300 Subject: [PATCH] [TensorRT] Add slightly faster hash computation for `vector` (#5142) * w * w Co-authored-by: modav --- .../core/providers/tensorrt/tensorrt_execution_provider.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onnxruntime/core/providers/tensorrt/tensorrt_execution_provider.cc b/onnxruntime/core/providers/tensorrt/tensorrt_execution_provider.cc index 0e922f7c34..91582a7077 100644 --- a/onnxruntime/core/providers/tensorrt/tensorrt_execution_provider.cc +++ b/onnxruntime/core/providers/tensorrt/tensorrt_execution_provider.cc @@ -48,7 +48,7 @@ std::string GetEnginePath(const ::std::string& root, const std::string& name) { std::string GetVecHash(const ::std::vector& vec) { std::size_t ret = vec.size(); - for (auto& i : vec) { + for (auto i : vec) { ret ^= i + 0x9e3779b9 + (ret << 6) + (ret >> 2); } return std::to_string(ret);