mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-29 19:07:15 +02:00
used regular method for group resetting in clear
This commit is contained in:
@ -269,7 +269,7 @@ private:
|
||||
return at(N);
|
||||
}
|
||||
|
||||
alignas(16) __m128i m;
|
||||
alignas(16) __m128i m=_mm_setzero_si128();
|
||||
};
|
||||
|
||||
#elif defined(BOOST_UNORDERED_LITTLE_ENDIAN_NEON)
|
||||
@ -412,7 +412,7 @@ private:
|
||||
return at(N);
|
||||
}
|
||||
|
||||
alignas(16) int8x16_t m;
|
||||
alignas(16) int8x16_t m=vdupq_n_s8(0);
|
||||
};
|
||||
|
||||
#else /* non-SIMD */
|
||||
@ -577,7 +577,7 @@ private:
|
||||
return y&0x7FFF;
|
||||
}
|
||||
|
||||
alignas(16) boost::uint64_t m[2];
|
||||
alignas(16) boost::uint64_t m[2]={0,0};
|
||||
};
|
||||
|
||||
#endif
|
||||
@ -1361,9 +1361,6 @@ public:
|
||||
|
||||
void clear()noexcept
|
||||
{
|
||||
alignas(group_type) static constexpr unsigned char
|
||||
zero[sizeof(group_type)]={0,};
|
||||
|
||||
auto p=arrays.elements;
|
||||
if(p){
|
||||
for(auto pg=arrays.groups,last=pg+arrays.groups_size_mask+1;
|
||||
@ -1374,7 +1371,7 @@ public:
|
||||
mask&=mask-1;
|
||||
}
|
||||
/* we wipe the entire metadata to reset the overflow byte as well */
|
||||
*pg=*reinterpret_cast<const group_type*>(zero);
|
||||
*pg=group_type();
|
||||
}
|
||||
arrays.groups[arrays.groups_size_mask].set_sentinel();
|
||||
size_=0;
|
||||
|
Reference in New Issue
Block a user