diff --git a/include/neighbor.h b/include/neighbor.h index 9b1c54eac..c1e15762b 100644 --- a/include/neighbor.h +++ b/include/neighbor.h @@ -127,7 +127,8 @@ class NeighborVector : public NeighborVectorBase class NeighborExtendColorVector : public NeighborVectorBase { public: - const static uint32_t s_vector_size_limited = 1000000; + const static uint32_t s_vector_size_limited = 50 * 64; + const static uint32_t s_map_size_reserve = 100; NeighborExtendColorVector(const std::vector& location_to_seller) : _location_to_seller(location_to_seller) @@ -148,7 +149,7 @@ class NeighborExtendColorVector : public NeighborVectorBase else { auto color_to_info = std::make_unique(); - color_to_info->reserve(uniqueSellerCount); + color_to_info->reserve(s_map_size_reserve); _color_to_info = std::move(color_to_info); } } @@ -315,7 +316,7 @@ class NeighborExtendColorVector : public NeighborVectorBase { std::cout << "unique seller " << uniqueSellerCount << "ColorInfoMap created" << std::endl; auto color_to_info = std::make_unique(); - color_to_info->reserve(uniqueSellerCount); + color_to_info->reserve(s_map_size_reserve); _color_to_info = std::move(color_to_info); } }