From b67aaf355864e48524da627b7d4c964e9d08e732 Mon Sep 17 00:00:00 2001 From: joaquintides Date: Mon, 22 Jan 2024 09:50:23 +0100 Subject: [PATCH] cacheline-aligned garbage vectors --- include/boost/unordered/detail/foa/concurrent_table.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/boost/unordered/detail/foa/concurrent_table.hpp b/include/boost/unordered/detail/foa/concurrent_table.hpp index be528152..5985d6e2 100644 --- a/include/boost/unordered/detail/foa/concurrent_table.hpp +++ b/include/boost/unordered/detail/foa/concurrent_table.hpp @@ -570,7 +570,7 @@ public: } std::cout - <<"version: 2024/01/21 18:40; " + <<"version: 2024/01/22 09:50; " <<"lf: "<<(double)size()/capacity()<<"; " <<"capacity: "<p.compare_exchange_weak(pv,nullptr)){ + if(p->p.compare_exchange_strong(pv,nullptr)){ pg->reset(n); retire_element(pv,!pg->is_not_overflowed(hash)); res=1; @@ -2006,7 +2006,7 @@ private: std::atomic epoch=available_; std::atomic p={}; }; - struct garbage_vector + struct alignas(64) garbage_vector { static constexpr std::size_t N=256; static constexpr std::size_t min_for_epoch_bump=16;