IndexOutOfRangeException in System.Numerics.Vector Initialization

Viewed 502

Microsoft released a Vector library that is supposed to allow for SIMD instructions in .NET (see https://instil.co/2016/03/21/parallelism-on-a-single-core-simd-with-c/).

However, this thing seems to crash with the most basic call to their constructor:

System.Numerics.Vector<byte> vec
    = new System.Numerics.Vector<byte>(new byte[] { 4, 3, 2, 1, 6, 4, 2, 4 });

This throws a System.IndexOutOfRangeException: 'Index was outside the bounds of the array.' What am I missing here? This works fine if I replace all occurences of byte with int.

0 Answers
Related