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

Hardware Intrinsics: Add uint overload for Sse41.MultiplyLow #10675

Closed
Zhentar opened this issue Jul 13, 2018 · 5 comments
Closed

Hardware Intrinsics: Add uint overload for Sse41.MultiplyLow #10675

Zhentar opened this issue Jul 13, 2018 · 5 comments

Comments

@Zhentar
Copy link

Zhentar commented Jul 13, 2018

var buffMult = Sse.StaticCast<int,uint>(Sse41.MultiplyLow(
                            Sse.StaticCast<uint, int>(buffVals),
                            Sse.StaticCast<uint, int>(prime32_2)));

Works, but it's pretty ugly.

(for the benefit of those, who like me from two days ago, have minds happily free of two's complement arithmetic, the low half of a multiply is the same for both signed and unsigned values. So while Intel documents the underlying PMULLD as signed, it is actually sign agnostic)

I suspect that there is a matching Avx2.MultiplyLow for which this is equally applicable.

@tannergooding
Copy link
Member

CC. @fiigii, @CarolEidt, @eerhardt

@fiigii
Copy link
Contributor

fiigii commented Jul 13, 2018

@Zhentar Thanks for the proposal and I agree. MultiplyLow only takes the lower 32-bit of the result, so the sign does not matter.

@tannergooding I am also considering to add all the integer overloads for Avx2.BlendVariable that is very common to use.

@tannergooding
Copy link
Member

@fiigii, We'll want to make sure we have an issue tracking it and that it goes to API review (I am working on ensuring another one is setup soon to cover the issues/requrests that have cropped up).

@fiigii
Copy link
Contributor

fiigii commented Jul 13, 2018

I see. Let me open an issue for Avx2.BlendVariable.

@fiigii
Copy link
Contributor

fiigii commented Dec 6, 2018

Please close this issue.

@msftgits msftgits transferred this issue from dotnet/coreclr Jan 31, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants