Base64 encoding with simd-support (dotnet/corefx#34529)
* Optimized scalar code-path
* Fixed label names
* Implemented vectorized versions
* Added reference to source of algorithm
* Added back missing namespace
* Unsafe.Add instead of Unsafe.Subtract
Fixed build-failure (https://ci3.dot.net/job/dotnet_corefx/job/master/job/linux-musl-TGroup_netcoreapp+CGroup_Debug+AGroup_x64+TestOuter_false_prtest/8247/console)
Seems like the internal Unsafe doesn't have a Subtract method, so use Add instead.
* Added THIRD-PARTY-NOTICES
* PR Feedback
* THIRD-PARTY-NOTICES in repo-base instead instead in folder
Cf. https://github.com/dotnet/corefx/pull/34529#issuecomment-
453510246
* PR Feedback
* https://github.com/dotnet/corefx/pull/34529#discussion_r247200659
* https://github.com/dotnet/corefx/pull/34529#discussion_r247214904
* Rewritten to use raw-pointers instead of GC-tracked refs
Cf. https://github.com/dotnet/corefx/pull/34529#discussion_r247197669
* Initialized the static fields directly (i.e. w/o cctor)
Cf. https://github.com/dotnet/corefx/pull/34529#discussion_r247193419
* Added a test for decoding a (encoded) Guid
The case with decoding encoded 16 bytes was not covered by tests, so a wrong code got commited before, resulting
in DestinationTooSmall instead of the correct Done.
* EncodingMap / DecodingMap as byref instead of pointer
So got rid of the `rep stosd` in the prolog. Cf. https://github.com/dotnet/corefx/pull/34529#discussion_r248075157
* PR Feedback
* https://github.com/dotnet/corefx/pull/34529#discussion_r262165689
* Debug.Fail instead throwing for the assertion
Cf. https://github.com/dotnet/corefx/pull/34529#discussion_r263894301
* ROSpan for static data
* ROS for lookup maps
* In decode avoided stack spill and hoisted zero-vector outside the loops
Cf. https://github.com/dotnet/corefx/pull/34529#discussion_r287613894
* Assert assumption about destLength
Cf. https://github.com/dotnet/corefx/pull/34529#discussion_r287605561
* Added comments from original source and some changes to variable names
Cf. https://github.com/dotnet/corefx/pull/34529#discussion_r287606634 and https://github.com/dotnet/corefx/pull/34529#discussion_r287606714
* Use TestZ instead of MoveMask in AVX2-path
Cf. https://github.com/dotnet/corefx/pull/34529#discussion_r287825385
* Fixed too complicated mask2F creation
Improved the version done in dotnet/corefx@
c8b6cb3387ca856f52d246ad260172c8fe1d9dcd, so the static data isn't needed and code is more compact and readable.
Commit migrated from https://github.com/dotnet/corefx/commit/
036e0a64bd190e80f1685c3b267e495b03bb2962