Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

pgovind
Copy link

@pgovind pgovind commented Jul 17, 2020

This is ready for review now.

NOTE: There is a bug here somewhere, but I can't seem to find it, so I'd appreciate another pair of eyes in this code. When I try to test this on WSL2, I get an error saying "Can't find file xunit.console.deps.json" when that file does in fact exist. The real error is that the xunit infra itself calls into the method being modified here and something goes wrong (maybe marshalling the path from string to native also uses this code? I'm not sure). AFAICT the changes are right.

@jkotas jkotas added the NO-REVIEW Experimental/testing PR, do NOT review it label Jul 17, 2020
@pgovind pgovind force-pushed the NarrowUtf16ToAscii branch from 506c3b7 to e6621fa Compare July 20, 2020 23:34
@pgovind pgovind force-pushed the NarrowUtf16ToAscii branch from 3e8be4a to abc8ead Compare July 23, 2020 02:35
@pgovind pgovind added area-System.Runtime.Intrinsics and removed NO-REVIEW Experimental/testing PR, do NOT review it labels Jul 23, 2020
@pgovind pgovind requested a review from echesakov July 23, 2020 18:32
@ghost
Copy link

ghost commented Jul 23, 2020

Tagging subscribers to this area: @tannergooding
See info in area-owners.md if you want to be subscribed.

@pgovind pgovind requested a review from kunalspathak July 23, 2020 18:32
Copy link
Contributor

Choose a reason for hiding this comment

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

If I understand the original Sse2 algorithm right - this is testing if any of the characters in utf16VectorFirst is outside of [0, 0x7f] value range, right?

I don't think the algorithm on Arm64 should copy exactly, what Sse2 does.

I believe the following should be enough

AdvSimd.MaxPairwise(utf16VectorFirst.AsUInt16(), utf16VectorFirst.AsUInt16()).AsUInt64().ToScalar() & 0xFF80FF80FF80FF80UL != 0

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree.

Copy link
Contributor

Choose a reason for hiding this comment

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

minor: add a comment // unaligned load

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree.

@jeffhandley
Copy link
Member

@pgovind I'm going to close this PR since this work is on hold. When we get back around to this work, we can create a fresh PR.

@ghost ghost locked as resolved and limited conversation to collaborators Feb 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants