From 91b114a7870b62764f0a493c520c5fab1d89f6a7 Mon Sep 17 00:00:00 2001 From: qiaolongfei Date: Mon, 30 Jul 2018 11:39:48 +0800 Subject: [PATCH] change map to unordered_map --- paddle/fluid/operators/split_ids_op.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/operators/split_ids_op.h b/paddle/fluid/operators/split_ids_op.h index 86a3eaa5c4..d6caf626cb 100644 --- a/paddle/fluid/operators/split_ids_op.h +++ b/paddle/fluid/operators/split_ids_op.h @@ -14,7 +14,7 @@ limitations under the License. */ #pragma once -#include +#include #include #include "paddle/fluid/framework/op_registry.h" #include "paddle/fluid/operators/math/selected_rows_functor.h" @@ -69,7 +69,7 @@ class SplitIdsOpKernel : public framework::OpKernel { auto outs = ctx.MultiOutput("Out"); const size_t shard_num = outs.size(); // get rows for outputs - std::map id_to_index; + std::unordered_map id_to_index; for (size_t i = 0; i < ids_rows.size(); ++i) { id_to_index[ids_rows[i]] = i; size_t shard_id = static_cast(ids_rows[i]) % shard_num; -- GitLab