From 845d5341c704849b7f803aab6694ae718cf5ab5f Mon Sep 17 00:00:00 2001 From: joaquintides Date: Fri, 20 Jan 2023 13:01:48 +0100 Subject: [PATCH] used acquire/release memory model --- cfoa.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cfoa.hpp b/cfoa.hpp index 2e021791..c2ce8d1d 100644 --- a/cfoa.hpp +++ b/cfoa.hpp @@ -218,7 +218,7 @@ struct group15 inline void set(std::size_t pos,std::size_t hash) { BOOST_ASSERT(pos(m)); return _mm_movemask_epi8(_mm_cmpeq_epi8(w,_mm_set1_epi32(match_word(hash))))&0x7FFF; @@ -1962,7 +1963,7 @@ private: do{ auto n=unchecked_countr_zero(mask); if( - pg->at(n)!=0&& + pg->at(n).load(std::memory_order_acquire )!=0&& BOOST_LIKELY(bool(pred()(x,key_from(p[n]))))){ f(p[n]); return true;