Skip to content

Commit 096d4bb

Browse files
authored
Merge branch 'master' into feature/new-bithelper-apis
2 parents 9e39c8d + 5bf4265 commit 096d4bb

File tree

173 files changed

+6137
-542
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

173 files changed

+6137
-542
lines changed

Microsoft.Toolkit.HighPerformance/Box{T}.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public static Box<T> GetFrom(object obj)
8787
/// <param name="obj">The input <see cref="object"/> instance, representing a boxed <typeparamref name="T"/> value.</param>
8888
/// <returns>A <see cref="Box{T}"/> reference pointing to <paramref name="obj"/>.</returns>
8989
/// <remarks>
90-
/// This method doesn't check the actual type of <paramref name="obj"/>, so it is responsability of the caller
90+
/// This method doesn't check the actual type of <paramref name="obj"/>, so it is responsibility of the caller
9191
/// to ensure it actually represents a boxed <typeparamref name="T"/> value and not some other instance.
9292
/// </remarks>
9393
[Pure]

Microsoft.Toolkit.HighPerformance/Extensions/ArrayExtensions.2D.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public static ref T DangerousGetReference<T>(this T[,] array)
6161
/// <remarks>
6262
/// This method doesn't do any bounds checks, therefore it is responsibility of the caller to ensure the <paramref name="i"/>
6363
/// and <paramref name="j"/> parameters are valid. Furthermore, this extension will ignore the lower bounds for the input
64-
/// array, and will just assume that the input index is 0-based. It is responsability of the caller to adjust the input
64+
/// array, and will just assume that the input index is 0-based. It is responsibility of the caller to adjust the input
6565
/// indices to account for the actual lower bounds, if the input array has either axis not starting at 0.
6666
/// </remarks>
6767
[Pure]
@@ -234,7 +234,7 @@ public static Array2DColumnEnumerable<T> GetColumn<T>(this T[,] array, int colum
234234

235235
#if SPAN_RUNTIME_SUPPORT
236236
/// <summary>
237-
/// Cretes a new <see cref="Span{T}"/> over an input 2D <typeparamref name="T"/> array.
237+
/// Creates a new <see cref="Span{T}"/> over an input 2D <typeparamref name="T"/> array.
238238
/// </summary>
239239
/// <typeparam name="T">The type of elements in the input 2D <typeparamref name="T"/> array instance.</typeparam>
240240
/// <param name="array">The input 2D <typeparamref name="T"/> array instance.</param>

Microsoft.Toolkit.HighPerformance/Extensions/MemoryExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public static class MemoryExtensions
2222
/// <returns>A <see cref="Stream"/> wrapping the data within <paramref name="memory"/>.</returns>
2323
/// <remarks>
2424
/// Since this method only receives a <see cref="Memory{T}"/> instance, which does not track
25-
/// the lifetime of its underlying buffer, it is responsability of the caller to manage that.
25+
/// the lifetime of its underlying buffer, it is responsibility of the caller to manage that.
2626
/// In particular, the caller must ensure that the target buffer is not disposed as long
2727
/// as the returned <see cref="Stream"/> is in use, to avoid unexpected issues.
2828
/// </remarks>

Microsoft.Toolkit.HighPerformance/Extensions/ObjectExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public static class ObjectExtensions
2424
/// The <see cref="IntPtr"/> value representing the offset to the target field from the start of the object data
2525
/// for the parameter <paramref name="obj"/>. The offset is in relation to the first usable byte after the method table.
2626
/// </returns>
27-
/// <remarks>The input parameters are not validated, and it's responsability of the caller to ensure that
27+
/// <remarks>The input parameters are not validated, and it's responsibility of the caller to ensure that
2828
/// the <paramref name="data"/> reference is actually pointing to a memory location within <paramref name="obj"/>.
2929
/// </remarks>
3030
[Pure]
@@ -46,7 +46,7 @@ public static IntPtr DangerousGetObjectDataByteOffset<T>(this object obj, ref T
4646
/// <param name="offset">The input byte offset for the <typeparamref name="T"/> reference to retrieve.</param>
4747
/// <returns>A <typeparamref name="T"/> reference at a specified offset within <paramref name="obj"/>.</returns>
4848
/// <remarks>
49-
/// None of the input arguments is validated, and it is responsability of the caller to ensure they are valid.
49+
/// None of the input arguments is validated, and it is responsibility of the caller to ensure they are valid.
5050
/// In particular, using an invalid offset might cause the retrieved reference to be misaligned with the
5151
/// desired data, which would break the type system. Or, if the offset causes the retrieved reference to point
5252
/// to a memory location outside of the input <see cref="object"/> instance, that might lead to runtime crashes.

Microsoft.Toolkit.HighPerformance/Extensions/ReadOnlyMemoryExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public static class ReadOnlyMemoryExtensions
2222
/// <returns>A <see cref="Stream"/> wrapping the data within <paramref name="memory"/>.</returns>
2323
/// <remarks>
2424
/// Since this method only receives a <see cref="Memory{T}"/> instance, which does not track
25-
/// the lifetime of its underlying buffer, it is responsability of the caller to manage that.
25+
/// the lifetime of its underlying buffer, it is responsibility of the caller to manage that.
2626
/// In particular, the caller must ensure that the target buffer is not disposed as long
2727
/// as the returned <see cref="Stream"/> is in use, to avoid unexpected issues.
2828
/// </remarks>

Microsoft.Toolkit.HighPerformance/Extensions/ReadOnlySpanExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ public static ReadOnlySpanTokenizer<T> Tokenize<T>(this ReadOnlySpan<T> span, T
279279
/// even long sequences of values. For the reference implementation, see: <see href="http://www.cse.yorku.ca/~oz/hash.html"/>.
280280
/// For details on the used constants, see the details provided in this StackOverflow answer (as well as the accepted one):
281281
/// <see href="https://stackoverflow.com/questions/10696223/reason-for-5381-number-in-djb-hash-function/13809282#13809282"/>.
282-
/// Additionally, a comparison between some common hashing algoriths can be found in the reply to this StackExchange question:
282+
/// Additionally, a comparison between some common hashing algorithms can be found in the reply to this StackExchange question:
283283
/// <see href="https://softwareengineering.stackexchange.com/questions/49550/which-hashing-algorithm-is-best-for-uniqueness-and-speed"/>.
284284
/// Note that the exact implementation is slightly different in this method when it is not called on a sequence of <see cref="byte"/>
285285
/// values: in this case the <see cref="object.GetHashCode"/> method will be invoked for each <typeparamref name="T"/> value in

Microsoft.Toolkit.HighPerformance/Microsoft.Toolkit.HighPerformance.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@
7878

7979
<!-- NETCORE_RUNTIME: to avoid issues with APIs that assume a specific memory layout, we define a
8080
.NET Core runtime constant to indicate the either .NET Core 2.1 or .NET Core 3.1. These are
81-
runtimes with the same overall memory layout for objects (in particular: strings, SZ arrays
81+
runtimes with the same overall memory layout for objects (in particular: strings, SZ arrays,
8282
and 2D arrays). We can use this constant to make sure that APIs that are exclusively available
83-
for .NET Standard targets do not make any assumtpion of any internals of the runtime being
83+
for .NET Standard targets do not make any assumption of any internals of the runtime being
8484
actually used by the consumers. -->
8585
<DefineConstants>NETSTANDARD2_1_OR_GREATER;SPAN_RUNTIME_SUPPORT;NETCORE_RUNTIME</DefineConstants>
8686
</PropertyGroup>

Microsoft.Toolkit.HighPerformance/ReadOnlyRef{T}.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public static implicit operator ReadOnlyRef<T>(Ref<T> reference)
7070
/// </summary>
7171
/// <param name="owner">The owner <see cref="object"/> to create a portable reference for.</param>
7272
/// <param name="offset">The target offset within <paramref name="owner"/> for the target reference.</param>
73-
/// <remarks>The <paramref name="offset"/> parameter is not validated, and it's responsability of the caller to ensure it's valid.</remarks>
73+
/// <remarks>The <paramref name="offset"/> parameter is not validated, and it's responsibility of the caller to ensure it's valid.</remarks>
7474
[MethodImpl(MethodImplOptions.AggressiveInlining)]
7575
private ReadOnlyRef(object owner, IntPtr offset)
7676
{
@@ -83,7 +83,7 @@ private ReadOnlyRef(object owner, IntPtr offset)
8383
/// </summary>
8484
/// <param name="owner">The owner <see cref="object"/> to create a portable reference for.</param>
8585
/// <param name="value">The target reference to point to (it must be within <paramref name="owner"/>).</param>
86-
/// <remarks>The <paramref name="value"/> parameter is not validated, and it's responsability of the caller to ensure it's valid.</remarks>
86+
/// <remarks>The <paramref name="value"/> parameter is not validated, and it's responsibility of the caller to ensure it's valid.</remarks>
8787
[MethodImpl(MethodImplOptions.AggressiveInlining)]
8888
public ReadOnlyRef(object owner, in T value)
8989
{

Microsoft.Toolkit.HighPerformance/Ref{T}.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public ref T Value
6262
/// </summary>
6363
/// <param name="owner">The owner <see cref="object"/> to create a portable reference for.</param>
6464
/// <param name="value">The target reference to point to (it must be within <paramref name="owner"/>).</param>
65-
/// <remarks>The <paramref name="value"/> parameter is not validated, and it's responsability of the caller to ensure it's valid.</remarks>
65+
/// <remarks>The <paramref name="value"/> parameter is not validated, and it's responsibility of the caller to ensure it's valid.</remarks>
6666
[MethodImpl(MethodImplOptions.AggressiveInlining)]
6767
public Ref(object owner, ref T value)
6868
{

0 commit comments

Comments
 (0)