-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Simplified namespaces in HighPerformance package #3687
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
Simplified namespaces in HighPerformance package #3687
Conversation
Thanks Sergio0694 for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌 |
FYI @Sergio0694 CI failing |
@michael-hawker Whoops, forgot to update the expected strings in the unit tests 😄 |
@@ -58,7 +65,8 @@ public static unsafe int ToInt(this bool flag) | |||
[MethodImpl(MethodImplOptions.AggressiveInlining)] | |||
public static unsafe int ToBitwiseMask32(this bool flag) | |||
{ | |||
byte rangeFlag = *(byte*)&flag; | |||
bool copy = flag; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious as to the change here? Just for my own understanding. 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NVM missed the comment above. Should this be a compile optimization issue to file against .NET? @Sergio0694
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a known issue - they have explicit workarounds for this inside the runtime as well. For now we just need to remember to do this and work around it, thankfully the solution is easy enough, it's just not as clean as doing this directly. Will ask if there's any news on this though, we were just about talking about this a few days ago in the C# server 😄
Hello @michael-hawker! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
6af4b04
to
00677f2
Compare
Following changes from CommunityToolkit/WindowsCommunityToolkit#3687
Related to #3422
PR Type
What kind of change does this PR introduce?
Overview
Following the suggestion from @mrlacey for non-breaking changes, this PR moves the new
Span2D<T>
andMemory2D<T>
types introduced in version 7.0 to the rootMicrosoft.Toolkit.HighPerformance
namespace (instead of.Memory
). This is simpler to use for consumers, it makes sense given that the root namespace already contains some other "primitive" types, and it's also more consistent to how theSpan<T>
andMemory<T>
types are included in theSystem.Memory
package, but are still located in the rootSystem
namespace.This PR also includes some minor codegen improvements to some other extensions, while I was at it 😄
PR Checklist
Please check if your PR fulfills the following requirements:
Pull Request has been submitted to the documentation repository instructions. Link:Sample in sample app has been added / updated (for bug fixes / features)Icon has been created (if new sample) following the Thumbnail Style Guide and templates