diff --git a/onnxruntime/core/providers/cpu/ml/tree_ensemble_aggregator.h b/onnxruntime/core/providers/cpu/ml/tree_ensemble_aggregator.h index 2960724f2f..aba9a798cf 100644 --- a/onnxruntime/core/providers/cpu/ml/tree_ensemble_aggregator.h +++ b/onnxruntime/core/providers/cpu/ml/tree_ensemble_aggregator.h @@ -23,9 +23,7 @@ struct TreeNodeElementId { } struct hash_fn { std::size_t operator()(const TreeNodeElementId& key) const { - std::size_t h1 = std::hash()(key.tree_id); - std::size_t h2 = std::hash()(key.node_id); - return h1 ^ h2; + return static_cast(static_cast(key.tree_id) << 32 | static_cast(key.node_id)); } }; };