1
0
mirror of https://github.com/chylex/.NET-Community-Toolkit.git synced 2024-11-24 16:42:45 +01:00
Commit Graph

1970 Commits

Author SHA1 Message Date
Sergio Pedri
f2e6e2ab66 Updated .NET 5 compiler directives 2020-11-05 18:59:37 +01:00
Sergio Pedri
dfdba3e04f Added ListExtensions.AsSpan on .NET 5 2020-11-05 18:56:56 +01:00
Sergio Pedri
2037fe105f Initial .NET 5 support to HighPerformance package 2020-11-05 18:56:56 +01:00
Sergio Pedri
c66aa002ce Fixed a typo and bug 2020-11-05 18:42:14 +01:00
Sergio Pedri
0361226d0c Removed AggressiveOptimization attributes 2020-11-05 18:42:14 +01:00
Sergio Pedri
0113599bea Added unrolled vectorized Count loop
Gives up to a ~21% performance boost on .NET 5
2020-11-05 18:42:14 +01:00
Sergio Pedri
d0f2e36e86 Removed unnecessary type checks 2020-11-05 18:42:14 +01:00
Michael Hawker MSFT (XAML Llama)
0d5f18d5a4 Merge pull request #3353 from Sergio0694/feature/array3d-apis
2D System.Memory-like primitives (Span2D<T>, Memory2D<T>)
2020-11-05 09:21:36 -08:00
Sergio Pedri
5210e94171 Fixed StyleCop warnings in HighPerformance tests 2020-11-05 01:34:44 +01:00
Sergio Pedri
7f83395aec Updated package description with new types 2020-11-05 00:41:10 +01:00
Sergio Pedri
bdff55a2e0 Fixed XML docs for internal helpers 2020-11-04 19:31:18 +01:00
Sergio Pedri
5a54d027c1 Fixed some typos 2020-11-03 23:42:04 +01:00
Sergio Pedri
1145a4e3e9 Added more tests for invalid Memory2D<T> constructors 2020-11-03 23:40:27 +01:00
Sergio Pedri
57d77bd34a Improved some unit tests 2020-11-03 23:20:52 +01:00
Sergio Pedri
ae5ba7e358 Added tests for off-by-one Get[Row|Column] for 2D arrays 2020-11-03 23:08:57 +01:00
Michael Hawker MSFT (XAML Llama)
e821cf9cfa Merge branch 'master' into feature/array3d-apis 2020-11-03 09:44:28 -08:00
Sergio Pedri
166a23cc9e Minor code tweaks for clarity 2020-11-01 16:39:46 +01:00
Sergio Pedri
f870cbf8a8 Minor code refactoring 2020-11-01 01:13:10 +01:00
Sergio Pedri
131509b805 Fixed bug in ReadOnlyRefEnumerable<T> implicit cast 2020-10-31 20:04:44 +01:00
Sergio Pedri
2eca42f6db Fixed bugs in unit tests 2020-10-31 19:10:44 +01:00
Sergio Pedri
55a8be0e20 Added comments to unit tests 2020-10-31 18:24:30 +01:00
Sergio Pedri
9d841afb80 Removed unnecessary covariance array checks 2020-10-31 17:13:30 +01:00
Sergio Pedri
470306e89b Improved unit test coverage for RefEnumerable<T> 2020-10-31 13:53:10 +01:00
Sergio Pedri
bf7e7943f8 Tweaked some using directives 2020-10-31 13:17:45 +01:00
Sergio Pedri
1a9e532b93 Fixed a build error in the unit tests 2020-10-31 11:46:01 +01:00
Sergio Pedri
67cc61b643 Added RefEnumerable<T>.CopyTo(RefEnumerable) APIs 2020-10-30 23:53:13 +01:00
Sergio Pedri
a8d55db95e Removed unnecessary EditorBrowsable attributes 2020-10-30 23:17:18 +01:00
Sergio Pedri
d7c2f0e2d1 Added implicit ReadOnlyRefEnumerable operator 2020-10-30 23:15:18 +01:00
Sergio Pedri
9bb521dc05 Minor code tweaks 2020-10-30 23:08:27 +01:00
Sergio Pedri
3c91227b9d Added RefEnumerableHelper.CopyTo 2-step overload 2020-10-30 22:45:15 +01:00
Sergio Pedri
f783fdc530 Code refactoring using the new helper 2020-10-30 20:23:02 +01:00
Sergio Pedri
7fca4d998d Added internal RefEnumerableHelper type 2020-10-30 20:18:08 +01:00
Sergio Pedri
efdd7d8d66 Added [ReadOnly]Span.[Try]CopyTo RefEnumerable APIs 2020-10-30 18:24:01 +01:00
Sergio Pedri
426af3f579 Bug fixes, added RefEnumerable<T>.[Try]CopyFrom 2020-10-30 18:16:46 +01:00
Sergio Pedri
3ae52d4ecf Added comments to unit tests 2020-10-30 17:53:57 +01:00
Sergio Pedri
346317c85c Added comments to unit tests 2020-10-30 15:53:39 +01:00
Sergio Pedri
f2f8869243 Added comments to unit tests 2020-10-30 13:50:43 +01:00
Sergio Pedri
2534345690 Minor performance improvement 2020-10-30 13:33:21 +01:00
Sergio Pedri
58a519634b AAdded comments to unit tests 2020-10-30 13:24:46 +01:00
Sergio Pedri
0c51bf650e Added comments to unit tests 2020-10-30 12:55:49 +01:00
Sergio Pedri
8c34ddc37c Added comments to DangerousGetReference tests 2020-10-29 22:22:07 +01:00
Sergio Pedri
0594df660d Added generic parameterless throw helper APIs 2020-10-29 18:42:44 +01:00
Sergio Pedri
ee5af50568 Added non-generic parameterless throw helper APIs 2020-10-29 18:42:17 +01:00
Sergio Pedri
9e1f4ebe5f Added more comments, minor code refactoring 2020-10-28 14:52:03 +01:00
msftbot[bot]
453feb11a4 Deprecated 2D array extensions from Microsoft.Toolkit (#3444)
## Part of #3062, related to #3435 
<!-- Add the relevant issue number after the "#" mentioned above (for ex: Fixes #1234) which will automatically close the issue once the PR is merged. -->

<!-- Add a brief overview here of the feature/bug & fix. -->

## PR Type
What kind of change does this PR introduce?
<!-- Please uncomment one or more that apply to this PR. -->

- Optimization
- Deprecation
<!-- - Bugfix -->
<!-- - Feature -->
<!-- - Code style update (formatting) -->
<!-- - Refactoring (no functional changes, no api changes) -->
<!-- - Build or CI related changes -->
<!-- - Documentation content changes -->
<!-- - Sample app changes -->
<!-- - Other... Please describe: -->


## What is the current behavior?
<!-- Please describe the current behavior that you are modifying, or link to a relevant issue. -->
The `Microsoft.Toolkit` package has a number of extensions for 2D arrays that are inefficient (they're both a bit slow and causing unnecessary memory allocations) and replaced by equivalent APIs in the `Microsoft.Toolkit.HighPerformance` package.

30452cf0bb/Microsoft.Toolkit/Extensions/ArrayExtensions.cs (L27)

30452cf0bb/Microsoft.Toolkit/Extensions/ArrayExtensions.cs (L48)

30452cf0bb/Microsoft.Toolkit/Extensions/ArrayExtensions.cs (L68)

## What is the new behavior?
<!-- Describe how was this issue resolved or changed? -->
This PR makes these APIs obsolete, and also includes a number of small optimizations to existing code that was added during the refactoring to remove dependencies on these APIs, so that it'll be possible to remove them in the future with no issues.

## PR Checklist

Please check if your PR fulfills the following requirements:

- [X] Tested code with current [supported SDKs](../readme.md#supported)
- [ ] Pull Request has been submitted to the documentation repository [instructions](..\contributing.md#docs). Link: <!-- docs PR 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](https://github.com/windows-toolkit/WindowsCommunityToolkit-design-assets)~~
- [X] Tests for the changes have been added (for bug fixes / features) (if applicable)
- [X] Header has been added to all new source files (run *build/UpdateHeaders.bat*)
- [X] Contains **NO** breaking changes
2020-10-27 18:30:16 +00:00
Michael Hawker MSFT (XAML Llama)
79df6e4dc9 Merge branch 'master' into feature/array-extensions-deprecation 2020-10-27 10:48:38 -07:00
Sergio Pedri
e002ba0923 Merge branch 'master' into feature/mvvm-toolkit-preview4 2020-10-26 19:17:36 +01:00
msftbot[bot]
dc2e32a6ab Fixed MemoryStream seek to end validation (#3543)
<!-- 🚨 Please Do Not skip any instructions and information mentioned below as they are all required and essential to evaluate and test the PR. By fulfilling all the required information you will be able to reduce the volume of questions and most likely help merge the PR faster 🚨 -->

## Fixes https://github.com/windows-toolkit/WindowsCommunityToolkit/issues/3536
<!-- Add the relevant issue number after the "#" mentioned above (for ex: Fixes #1234) which will automatically close the issue once the PR is merged. -->

<!-- Add a brief overview here of the feature/bug & fix. -->

## PR Type
What kind of change does this PR introduce?
<!-- Please uncomment one or more that apply to this PR. -->

- Bugfix
<!-- - Feature -->
<!-- - Code style update (formatting) -->
<!-- - Refactoring (no functional changes, no api changes) -->
<!-- - Build or CI related changes -->
<!-- - Documentation content changes -->
<!-- - Sample app changes -->
<!-- - Other... Please describe: -->


## What is the current behavior?
<!-- Please describe the current behavior that you are modifying, or link to a relevant issue. -->
Seeking to the end of a `Stream` from a `Memory<T>` or other types in the `HighPerformance` package throws an exception.

## What is the new behavior?
<!-- Describe how was this issue resolved or changed? -->
Seeking to the end of the stream is now allowed. This is consistent to other `Stream` types in the BCL.

## PR Checklist

Please check if your PR fulfills the following requirements:

- [X] Tested code with current [supported SDKs](../readme.md#supported)
- [ ] ~~Pull Request has been submitted to the documentation repository [instructions](..\contributing.md#docs). Link: <!-- docs PR 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](https://github.com/windows-toolkit/WindowsCommunityToolkit-design-assets)~~
- [X] Tests for the changes have been added (for bug fixes / features) (if applicable)
- [X] Header has been added to all new source files (run *build/UpdateHeaders.bat*)
- [X] Contains **NO** breaking changes
2020-10-26 17:20:48 +00:00
Sergio Pedri
174ccbe0d7 15% speedup in Span2D<T>.DangerousGetReferenceAt 2020-10-26 16:20:07 +01:00
Sergio Pedri
02bd8e4f6b Added missing overflow check, improved docs 2020-10-26 13:52:30 +01:00