You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HighwayHash can easily be adapted to SSSE3 with only a few changes:
Remove the min, max, and stream functions in vector128.h. We don't use them.
Change V128<uint64_t>::operator== to this:
// There are no greater-than comparison instructions for unsigned T.
HH_INLINE V128 operator==(const V128& other) const {
#ifdef __SSE4_1__
returnV128(_mm_cmpeq_epi64(v_, other.v_));
#else// Do a 32-bit equality comparison, then AND the high bits and the low bits. If the// vectors are equal, the result will be// 0xFFFFFFFFFFFFFFFF & 0xFFFFFFFFFFFFFFFF == 0xFFFFFFFFFFFFFFFF// and if not, it will be// 0xFFFFFFFF00000000 & 0x00000000FFFFFFFF = 0x0000000000000000
__m128i cmp = _mm_cmpeq_epi32(v_, other.v_);
returnV128(_mm_and_si128(cmp, _mm_shuffle_epi32(cmp, _MM_SHUFFLE(2, 3, 0, 1))));
#endif
}
Change the _mm_insert_epi32 in HHStateSSE41::UpdateRemainder to this:
@easyaspi314
These look like reasonable workarounds, we could rely on #if inside the same file, but generally we are targeting SSE4.1 as a minimum baseline (Penryn was launched in 2008). Can you help me understand if/why SSSE3 support is required?
simdhwyhash, which is an implementation of the HighwayHash algorithm that uses the Google Highway library, supports some additional SIMD targets such as SSE2, SSSE3, AVX3 (AVX512F+AVX512CD+AVX512VL+AVX512BW+AVX512DQ), RVV, SVE, and Z14.
HighwayHash can easily be adapted to SSSE3 with only a few changes:
V128<uint64_t>::operator==
to this:_mm_insert_epi32
inHHStateSSE41::UpdateRemainder
to this:_mm_insert_epi32
inHHStateSSE41::XorByShift128Left12
to this:Done.
If we add it, the only issue I see is what do we name it, and what do we do with the SSE41 target?
The text was updated successfully, but these errors were encountered: