mirror of
https://github.com/aaru-dps/Aaru.Checksums.git
synced 2025-12-16 19:24:29 +00:00
Implement Fletcher-32 using SSSE3 instructions.
This commit is contained in:
@@ -40,6 +40,7 @@ using System.Text;
|
||||
using Aaru.Checksums.Fletcher32;
|
||||
using Aaru.CommonTypes.Interfaces;
|
||||
using Aaru.Helpers;
|
||||
using Ssse3 = System.Runtime.Intrinsics.X86.Ssse3;
|
||||
|
||||
namespace Aaru.Checksums;
|
||||
|
||||
@@ -134,6 +135,13 @@ public sealed class Fletcher32Context : IChecksum
|
||||
return;
|
||||
}
|
||||
|
||||
if(Ssse3.IsSupported)
|
||||
{
|
||||
Fletcher32.Ssse3.Step(ref previousSum1, ref previousSum2, data, len);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if(AdvSimd.IsSupported)
|
||||
{
|
||||
Neon.Step(ref previousSum1, ref previousSum2, data, len);
|
||||
|
||||
Reference in New Issue
Block a user