Skip to content

Commit

Permalink
Address review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
DeepakRajendrakumaran committed Jun 21, 2023
1 parent 1f3a533 commit 2f6889a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@ internal static uint FlipBit(uint value, int index)
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal static ulong FlipBit(ulong value, int index)
{
return value ^ (1UL << index);
return value ^ (1ul << index);
}
}
}
13 changes: 0 additions & 13 deletions src/libraries/System.Private.CoreLib/src/System/SpanHelpers.T.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3792,19 +3792,6 @@ public static int CountValueType<T>(ref T current, T value, int length) where T

return count;
}
// TODO : Verify this makes sense
/*if (remaining > Vector256<T>.Count / 2)
{
Vector256<T> targetVector256 = Vector256.Create(value);
uint mask = Vector256.Equals(Vector256.LoadUnsafe(ref oneVectorAwayFromEnd), targetVector256).ExtractMostSignificantBits();
// The mask contains some elements that may be double-checked, so shift them away in order to get the correct pop-count.
uint overlaps = (uint)Vector256<T>.Count - remaining;
mask >>= (int)overlaps;
count += BitOperations.PopCount(mask);
return count;
}*/
}
else if (Vector256.IsHardwareAccelerated && length >= Vector256<T>.Count)
{
Expand Down

0 comments on commit 2f6889a

Please sign in to comment.