Skip to content

Investigate moving the types in System.Numerics.Vectors to use Hardware Intrinsics #956

Closed
@tannergooding

Description

@tannergooding

Today, hardware acceleration of certain types in the System.Numerics.Vectors project is achieved via [Intrinsic] attributes and corresponding runtime support. There are a few downsides to this approach:

  • Minor tweaks to the backing implementation require shipping a new runtime
  • It is not obvious that the code has a hardware accelerated path (outside reading documentation)
  • Many of the types (such as the Matrix types) are not directly hardware accelerated

In netcoreapp30, the new Hardware Intrinsics feature is supposed to ship. This feature also allows hardware acceleration but at a much more fine-grained level (APIs typically have a 1-to-1 mapping with underlying instructions).

We should investigate moving the types in System.Numerics.Vectors to use hardware intrinsics as this has multiple potential benefits:

  • The hardware acceleration is still tied to the runtime, but minor tweaks can be made without having to ship a new runtime
  • The code having a hardware accelerated path becomes obvious as does the code that will be generated for a given platform/cpu
  • It will become much easier to add hardware acceleration support to types currently missing it (such as Matrix4x4)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions