Update Matrix4x4 paths to use the new xplat intrinsics#130192
Open
tannergooding wants to merge 5 commits into
Open
Update Matrix4x4 paths to use the new xplat intrinsics#130192tannergooding wants to merge 5 commits into
tannergooding wants to merge 5 commits into
Conversation
Contributor
|
Tagging subscribers to this area: @dotnet/area-system-numerics |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors Matrix4x4.Impl math kernels to use the newer cross-platform Vector128 APIs (and adds a Wasm SIMD path), replacing the prior ISA-specific and scalar fallback implementations.
Changes:
- Reworked
Invertto useVector128xplat primitives (concat/zip/unzip/shuffle +Shuffle2) instead of the SSE-only path plus scalar fallback. - Simplified
Transposeto useVector128.ZipLower/ZipUpper. - Updated
GetDeterminantto use aVector128-based implementation and introduced aShuffle2helper with SSE/Arm64/Wasm SIMD support.
Show a summary per file
| File | Description |
|---|---|
| src/libraries/System.Private.CoreLib/src/System/Numerics/Matrix4x4.Impl.cs | Migrates inversion/transpose/determinant paths to xplat Vector128 intrinsics and adds a shared Shuffle2 helper (including Wasm PackedSimd). |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 3
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Member
Author
This was referenced Jul 4, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This just updates the existing code paths. I plan on updating a few other code paths to start using intrinsics in general in a separate PR, as well as a more general simplification to mitigate some of the inlining required for this code.
CC. @a74nh