General cleanup and refactor.

This commit is contained in:
2022-03-07 07:36:42 +00:00
parent db8c5c6a53
commit 19c7f3d4ff
22 changed files with 1076 additions and 1544 deletions

View File

@@ -45,18 +45,18 @@
// Copyright 2017 The Chromium Authors. All rights reserved.
// ****************************************************************************/
namespace Aaru.Checksums.CRC32;
using System;
using System.Runtime.Intrinsics.Arm;
namespace Aaru.Checksums.CRC32;
internal static class ArmSimd
static class ArmSimd
{
internal static uint Step64(byte[] buf, long len, uint crc)
{
uint c = crc;
int bufPos = 0;
var bufPos = 0;
while(len >= 64)
{
@@ -87,9 +87,7 @@ internal static class ArmSimd
}
while(len-- > 0)
{
c = Crc32.ComputeCrc32(c, buf[bufPos++]);
}
return c;
}
@@ -98,7 +96,7 @@ internal static class ArmSimd
{
uint c = crc;
int bufPos = 0;
var bufPos = 0;
while(len >= 32)
{
@@ -129,9 +127,7 @@ internal static class ArmSimd
}
while(len-- > 0)
{
c = Crc32.ComputeCrc32(c, buf[bufPos++]);
}
return c;
}