Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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. dotnet/corefx#34529 (comment) * PR Feedback * dotnet/corefx#34529 (comment) * dotnet/corefx#34529 (comment) * Rewritten to use raw-pointers instead of GC-tracked refs Cf. dotnet/corefx#34529 (comment) * Initialized the static fields directly (i.e. w/o cctor) Cf. dotnet/corefx#34529 (comment) * 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. dotnet/corefx#34529 (comment) * PR Feedback * dotnet/corefx#34529 (comment) * Debug.Fail instead throwing for the assertion Cf. dotnet/corefx#34529 (comment) * ROSpan for static data * ROS for lookup maps * In decode avoided stack spill and hoisted zero-vector outside the loops Cf. dotnet/corefx#34529 (comment) * Assert assumption about destLength Cf. dotnet/corefx#34529 (comment) * Added comments from original source and some changes to variable names Cf. dotnet/corefx#34529 (comment) and dotnet/corefx#34529 (comment) * Use TestZ instead of MoveMask in AVX2-path Cf. dotnet/corefx#34529 (comment) * Fixed too complicated mask2F creation Improved the version done in dotnet/corefx@c8b6cb3, so the static data isn't needed and code is more compact and readable. Commit migrated from dotnet/corefx@036e0a6
- Loading branch information