Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added and used Numerics.Vector{128|256}Count extension #2422

Merged
merged 1 commit into from
Mar 29, 2023

Conversation

gfoidl
Copy link
Contributor

@gfoidl gfoidl commented Mar 29, 2023

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following the existing coding patterns and practice as demonstrated in the repository. These follow strict Stylecop rules 👮.
  • I have provided test coverage for my change (where applicable)

Description

Instead of typing

nuint n = (uint)dest.Length / (uint)Vector256<float>.Count;

everytime, there's now a helper that shortens this to

nuint n = dest.Vector256Count<float>();

Cf. #2419 (comment)

@@ -62,7 +62,7 @@ public static T Deserialize<T>(string value)
ProcessStartInfo processStartInfo = new();
if (intrinsic.Key != HwIntrinsics.AllowAll)
{
processStartInfo.Environment[$"COMPlus_{intrinsic.Value}"] = "0";
processStartInfo.Environment[$"DOTNET_{intrinsic.Value}"] = "0";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

COMPlus prefix changed with .NET 6 to be DOTNET.
The COMPlus is still supported, but may get obsolete in future versions.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for that. One of those things we'd have only found out once all our tests break.

Copy link
Member

@JimBobSquarePants JimBobSquarePants left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love these kinds of changes. So much better! I'm assuming you want it merged before #2419 ?

@gfoidl
Copy link
Contributor Author

gfoidl commented Mar 29, 2023

Yes please merge before the other.
The other probably gets a merge conflict, which I'll resolve then.

@JimBobSquarePants JimBobSquarePants merged commit bab277c into SixLabors:main Mar 29, 2023
@gfoidl gfoidl deleted the vector-count-helper branch March 29, 2023 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants