Newer
Older
Example code for the blog at https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/using-sve-in-csharp
This is a collection of small vectorisable routines.
Each routine is provided in scalar, AArch64 Neon and AArch64 SVE variants, for both C++ and C#.
These routines are designed to show generic vectorisation techniques. As such, each specific routine may not be optimal - performance may be improved by unrolling the loop, rearranging instruction order and optimizing for specific micro architectures by considering instruction latencies, cycle counts, and the number of vector pipelines.
The C# code is written inside a BenchmarkDotNet harness.
$ dotnet add package BenchmarkDotNet
$ ./buildCSharp.sh
The C# code is written inside a simple harness using gettimeofday.