DLTcollab / sse2neon

A translator from Intel SSE intrinsics to Arm/Aarch64 NEON implementation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lack of `_mm_mfence`

iamqk opened this issue · comments

commented

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.

commented

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.