1

I was looking for a C# library that supports minimal vector and matrix operations and found that System.Numerics just do exactly that by using SIMD. Just for curiosity, does 3rd party math library like MathNet.Numerics support SIMD? While looking into the implementation in github, I found that it only uses an array to bundle up some values. I excerpted this code below from DenseVectorStorage class implementation. I'm certain that they would utilize SIMD in some ways but I couldn't find any clues of using SIMD from the code.

namespace MathNet.Numerics.LinearAlgebra.Storage
{
    [Serializable]
    [DataContract(Namespace = "urn:MathNet/Numerics/LinearAlgebra")]
    public class DenseVectorStorage<T> : VectorStorage<T>
        where T : struct, IEquatable<T>, IFormattable
    {
        // [ruegg] public fields are OK here

        [DataMember(Order = 1)]
        public readonly T[] Data;

        internal DenseVectorStorage(int length)
            : base(length)
        {
            Data = new T[length];
        }

        ...
KimHajun
  • 148
  • 7
  • 2
    A search of their repo for SIMD suggests [they would like it to](https://github.com/mathnet/mathnet-numerics/issues/565) but that it currently does not – pinkfloydx33 Jan 02 '20 at 09:20
  • 2
    for some purposes you can use the built-in [System.Numerics vectors/matrices](https://learn.microsoft.com/en-us/dotnet/api/system.numerics?view=netframework-4.8) which are built with SIMD support – phuclv Jan 02 '20 at 09:58

0 Answers0