Lack of `_mm_mfence`
iamqk opened this issue · comments
The header only has _mm_sfence
.
We can implement _mm_mfence
with C11 Atomics.
void _mm_mfence (void)
{
__atomic_thread_fence(__ATOMIC_SEQ_CST);
}
Of course, we have to check GCC versions for atomics support.
Thx a lot.
PS: _mm_sfence should be _mm_mfence?
Thx a lot. PS: _mm_sfence should be _mm_mfence?
Corrected. They are semantically similar. I got confused earlier.