mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-20 19:12:24 +00:00
[TensorRT] Add slightly faster hash computation for vector<int> (#5142)
* w * w Co-authored-by: modav <modav@microsoft.com>
This commit is contained in:
parent
0c7e9fb52a
commit
1d6a21fd08
1 changed files with 1 additions and 1 deletions
|
|
@ -48,7 +48,7 @@ std::string GetEnginePath(const ::std::string& root, const std::string& name) {
|
|||
|
||||
std::string GetVecHash(const ::std::vector<int>& 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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue