diff --git a/ConflictSet.cpp b/ConflictSet.cpp index f0e4ccf..5ff2a75 100644 --- a/ConflictSet.cpp +++ b/ConflictSet.cpp @@ -2925,17 +2925,11 @@ horizontalMaxUpTo16(InternalVersionT *vs, InternalVersionT z, int len) { uint32_t zero; memcpy(&zero, &z, sizeof(zero)); auto zeroVec = _mm512_set1_epi32(zero); - auto actual = InternalVersionT( + auto max = InternalVersionT( zero + _mm512_reduce_max_epi32(_mm512_sub_epi32( _mm512_mask_loadu_epi32(zeroVec, _mm512_int2mask((1 << len) - 1), vs), zeroVec))); - // Hope it gets vectorized - InternalVersionT max = vs[0]; - for (int i = 1; i < len; ++i) { - max = std::max(vs[i], max); - } - assert(actual == max); return max; #endif }