Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ private static bool CanBeVectorized(ReadOnlySpan<byte> source) =>
// Computation for Generic Polynomials Using PCLMULQDQ Instruction" in December, 2009.
// https://github.com/intel/isa-l/blob/33a2d9484595c2d6516c920ce39a694c144ddf69/crc/crc32_ieee_by4.asm
// https://github.com/SixLabors/ImageSharp/blob/f4f689ce67ecbcc35cebddba5aacb603e6d1068a/src/ImageSharp/Formats/Png/Zlib/Crc32.cs#L80
//
// Marking this as noinline so the JIT doesn't try and inline this and end up not inlining some of the calls it makes.
//
[MethodImpl(MethodImplOptions.NoInlining)]
private static uint UpdateVectorized(uint crc, ReadOnlySpan<byte> source)
{
Debug.Assert(CanBeVectorized(source), "source cannot be vectorized.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ private static Vector128<ulong> LoadFromSource(ref byte source, nuint elementOff
// "Fast CRC Computation for Generic Polynomials Using PCLMULQDQ Instruction" in December, 2009 and the
// Intel reference implementation.
// https://github.com/intel/isa-l/blob/33a2d9484595c2d6516c920ce39a694c144ddf69/crc/crc64_ecma_norm_by8.asm
//
// Marking this as noinline so the JIT doesn't try and inline this and end up not inlining some of the calls it makes.
//
[MethodImpl(MethodImplOptions.NoInlining)]
private static ulong UpdateVectorized(ulong crc, ReadOnlySpan<byte> source)
{
Debug.Assert(CanBeVectorized(source), "source cannot be vectorized.");
Expand Down