mirror of
https://github.com/aaru-dps/Aaru.Checksums.git
synced 2025-12-16 19:24:29 +00:00
Move declaration closer to usage.
This commit is contained in:
@@ -153,9 +153,8 @@ public sealed class Adler32Context : IChecksum
|
||||
return;
|
||||
}
|
||||
|
||||
uint sum1 = preSum1;
|
||||
uint sum2 = preSum2;
|
||||
uint n;
|
||||
uint sum1 = preSum1;
|
||||
uint sum2 = preSum2;
|
||||
var dataOff = 0;
|
||||
|
||||
/* in case user likes doing a byte at a time, keep it fast */
|
||||
@@ -200,7 +199,7 @@ public sealed class Adler32Context : IChecksum
|
||||
while(len >= NMAX)
|
||||
{
|
||||
len -= NMAX;
|
||||
n = NMAX / 16; /* NMAX is divisible by 16 */
|
||||
uint n = NMAX / 16;
|
||||
|
||||
do
|
||||
{
|
||||
|
||||
@@ -105,7 +105,6 @@ static class Clmul
|
||||
|
||||
internal static uint Step(byte[] src, long len, uint initialCRC)
|
||||
{
|
||||
Vector128<uint> xmmT0, xmmT1, xmmT2;
|
||||
Vector128<uint> xmmInitial = Sse2.ConvertScalarToVector128UInt32(initialCRC);
|
||||
Vector128<uint> xmmCRC0 = Sse2.ConvertScalarToVector128UInt32(0x9db42487);
|
||||
Vector128<uint> xmmCRC1 = Vector128<uint>.Zero;
|
||||
@@ -121,18 +120,18 @@ static class Clmul
|
||||
|
||||
while((len -= 64) >= 0)
|
||||
{
|
||||
xmmT0 = Vector128.Create(BitConverter.ToUInt32(src, bufPos), BitConverter.ToUInt32(src, bufPos + 4),
|
||||
BitConverter.ToUInt32(src, bufPos + 8), BitConverter.ToUInt32(src, bufPos + 12));
|
||||
var xmmT0 = Vector128.Create(BitConverter.ToUInt32(src, bufPos), BitConverter.ToUInt32(src, bufPos + 4),
|
||||
BitConverter.ToUInt32(src, bufPos + 8), BitConverter.ToUInt32(src, bufPos + 12));
|
||||
|
||||
bufPos += 16;
|
||||
|
||||
xmmT1 = Vector128.Create(BitConverter.ToUInt32(src, bufPos), BitConverter.ToUInt32(src, bufPos + 4),
|
||||
BitConverter.ToUInt32(src, bufPos + 8), BitConverter.ToUInt32(src, bufPos + 12));
|
||||
var xmmT1 = Vector128.Create(BitConverter.ToUInt32(src, bufPos), BitConverter.ToUInt32(src, bufPos + 4),
|
||||
BitConverter.ToUInt32(src, bufPos + 8), BitConverter.ToUInt32(src, bufPos + 12));
|
||||
|
||||
bufPos += 16;
|
||||
|
||||
xmmT2 = Vector128.Create(BitConverter.ToUInt32(src, bufPos), BitConverter.ToUInt32(src, bufPos + 4),
|
||||
BitConverter.ToUInt32(src, bufPos + 8), BitConverter.ToUInt32(src, bufPos + 12));
|
||||
var xmmT2 = Vector128.Create(BitConverter.ToUInt32(src, bufPos), BitConverter.ToUInt32(src, bufPos + 4),
|
||||
BitConverter.ToUInt32(src, bufPos + 8), BitConverter.ToUInt32(src, bufPos + 12));
|
||||
|
||||
bufPos += 16;
|
||||
|
||||
|
||||
@@ -132,9 +132,8 @@ public sealed class Fletcher32Context : IChecksum
|
||||
return;
|
||||
}
|
||||
|
||||
uint sum1 = previousSum1;
|
||||
uint sum2 = previousSum2;
|
||||
uint n;
|
||||
uint sum1 = previousSum1;
|
||||
uint sum2 = previousSum2;
|
||||
var dataOff = 0;
|
||||
|
||||
/* in case user likes doing a byte at a time, keep it fast */
|
||||
@@ -179,7 +178,7 @@ public sealed class Fletcher32Context : IChecksum
|
||||
while(len >= NMAX)
|
||||
{
|
||||
len -= NMAX;
|
||||
n = NMAX / 16; /* NMAX is divisible by 16 */
|
||||
uint n = NMAX / 16;
|
||||
|
||||
do
|
||||
{
|
||||
@@ -479,9 +478,8 @@ public sealed class Fletcher16Context : IChecksum
|
||||
return;
|
||||
}
|
||||
|
||||
uint sum1 = previousSum1;
|
||||
uint sum2 = previousSum2;
|
||||
uint n;
|
||||
uint sum1 = previousSum1;
|
||||
uint sum2 = previousSum2;
|
||||
var dataOff = 0;
|
||||
|
||||
/* in case user likes doing a byte at a time, keep it fast */
|
||||
@@ -526,7 +524,7 @@ public sealed class Fletcher16Context : IChecksum
|
||||
while(len >= NMAX)
|
||||
{
|
||||
len -= NMAX;
|
||||
n = NMAX / 11; /* NMAX is divisible by 16 */
|
||||
uint n = NMAX / 11;
|
||||
|
||||
do
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user