Using System.Numerics.Vector for Graphics Programming
We’ve just released a major update to the SIMD vector types we’ve blogged about earlier (first announcement, second update).
We’ve now made the vector library a lot more more useful for typical graphics operations. We added matrix types, a plane type, and a quaternion type. We’ve also added many methods that are often used on fixed size vectors, such as
We also completed our SIMD support for primitive types by adding support for
Getting the new bits
In order to try out the update, you’ll need the following components:
- RyuJIT CPT 5 and checkout the announcement
- System.Numerics.Vectors NuGet package
Changes in this release
The first thing you’ll notice is that we renamed the package from
System.Numerics.Vectors. We intend to ship more .NET components on NuGet so we felt that we need to use a better naming convention that allows people to find our packages.
We decided to simply match our namespace and assembly naming convention. However, in case your project already references
Microsoft.Bcl.Simd, you can simply upgrade. In that case your project will automatically add a reference to
System.Numerics.Vectors and show a
README file that tells you to remove the now superfluous reference to
Here is the list of API changes we performed:
- We’ve added support for
Vector<ulong>. We now support all integral types, including unsigned
- Added new types
- Made fixed size vector types more useful by adding a bunch of methods:
Vector4fby removing the
- Moved all static methods from
Vector<T>to the non-generic
We’ve also updated the SIMD samples to be compatible with the new version.
Today, we’ve released RyuJIT CTP 5 and a much improved System.Numerics.Vectors NuGet package which adds support for more graphics related APIs.
Please provide feedback as we’re trying to lock down the API design. You can simply leave a comment here or send us an email via the contact form.