mirror of
https://github.com/aaru-dps/AaruBenchmark.git
synced 2025-12-16 19:24:36 +00:00
Implement Fletcher-32 using SSSE3 instructions.
This commit is contained in:
@@ -36,6 +36,7 @@ using System;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Intrinsics.Arm;
|
||||
using System.Runtime.Intrinsics.X86;
|
||||
using System.Text;
|
||||
using Aaru.CommonTypes.Interfaces;
|
||||
using Aaru.Helpers;
|
||||
@@ -133,6 +134,13 @@ public sealed class Fletcher32Context : IChecksum
|
||||
return;
|
||||
}
|
||||
|
||||
if(Ssse3.IsSupported)
|
||||
{
|
||||
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