Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
System.Numerics.Vector<T> now always throws a NotSupportedException for unsupported type parameters.
Change description
Previously, members of Vector<T> would not always throw a NotSupportedException when T was an unsupported type. The exception wasn't always thrown because of code paths that supported hardware acceleration. For example, Vector<bool> + Vector<bool> returned default instead of throwing an exception on platforms that have no hardware acceleration, such as Arm32. For unsupported types, Vector<T> members exhibited inconsistent behavior across different platforms and hardware configurations.
Starting in .NET 5, Vector<T> members always throw a NotSupportedException on all hardware configurations when T is not a supported type.
Unsupported types
The supported types for the type parameter of Vector<T> are:
bytesbyteshortushortintuintlongulongfloatdouble
The supported types have not changed, however, they may change in the future.
Version introduced
5.0
Recommended action
Don't use an unsupported type for the type parameter of Vector<T>.
Affected APIs
- System.Numerics.Vector<T> and all its members