Quantcast
Channel: Category Name
Viewing all articles
Browse latest Browse all 5971

Update to SIMD Support

$
0
0

A month ago we announced support for SIMD. Today, we're announcing an update to "RyuJIT" and our NuGet package that exposes the SIMD programming model.

Updates to the Microsoft.Bcl.Simd NuGet package

More types for Vector

We've expanded the support of the Vector types:

  • We now support int, long, float, double as well as byte, sbyte, ushort and short.
  • Support for uint, ulong is still coming.

Support for mutable vector types

We've also changed our stance on immutability. In the previous release all types were immutable. The primary reason was that we wanted to discourage element-wise initialization for Vector. For consistency we originally decided to apply immutability to the fixed size vector types (Vector2f, Vector3f and Vector3f).

Based on your feedback we decided to change this. Now it looks as follows:

  • Vector is still immutable as we believe that's the right design due to the way this type works.
  • Vector2f, Vector3f and Vector4f are now mutable. This is primarily done to match the shape of existing vector types, especially from the graphics domain.

This means you can now write code like this:

// Still possible:
Vector3f v = new Vector3f(1f, 2f, 3f);

// Now also possible:
Vector3f w = new Vector3f();
w.X = 1f;
w.Y = 2f;
w.Z = 3f;

Better support for arrays

Vector has support for moving data from and to arrays:

// Array of 2 * Vector.Length values
int[] values = CreateValues();

// Multiply the first N values with the second
// N values (N, being Vector.Length).
Vector x = new Vector(values, 0);
Vector y = new Vector(values, Vector.Length);
Vector z = x * y;

// Store the result at the location of x
z.CopyTo(values, 0);

With this update, Vector.CopyTo() is now a JIT intrinsic and will result in a store from the SIMD register right into memory.

Updates to the JIT "RyuJIT"

We've added support for "RyuJIT" for non-Windows 8 machines. If you install the new .NET Framework 4.5.2, you can use "RyuJIT" on Windows Vista, Windows 7, Windows Server 2008, and Windows Server 2012.

You should also take a look at this post on the CLR code gen blog. Kevin Frei is our JIT dev lead and quite an active blogger. This way, you can get the information right from the horse's mouth so to speak.

You can download the updated RyuJIT here.

Summary

We've just released an update for SIMD support, which includes an update to "RyuJIT" as well the Microsoft.Bcl.Simd NuGet package. Also, if you install .NET Framework 4.5.2 you can now use the new JIT on non-Windows 8 machines.

Please download & play with the bits - we'd love to hear your feedback! For bugs, please send us a mail to ryujit(at)microsoft.com.


Viewing all articles
Browse latest Browse all 5971

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>