未验证 提交 f5c67acf 编写于 作者: D Drew Kersnar 提交者: GitHub

Fix triple slash documentation for System.Runtime.Intrinsics (#76687)

* Add missing type param documentation for Vector64.Create<T>

* Add summaries to the Vector types

* Fix typeparamref

* Address PR feedback
上级 7bd30600
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
namespace System.Numerics namespace System.Numerics
{ {
/// <summary>Provides a collection of static convenience methods for creating, manipulating, combining, and converting generic vectors.</summary> /// <summary>Provides a collection of static methods for creating, manipulating, and otherwise operating on generic vectors.</summary>
[Intrinsic] [Intrinsic]
public static unsafe partial class Vector public static unsafe partial class Vector
{ {
......
...@@ -23,11 +23,8 @@ namespace System.Numerics ...@@ -23,11 +23,8 @@ namespace System.Numerics
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/// <summary> /// <summary>Represents a single vector of a specified numeric type that is suitable for low-level optimization of parallel algorithms.</summary>
/// A structure that represents a single Vector. The count of this Vector is fixed but CPU register dependent. /// <typeparam name="T">The type of the elements in the vector. <typeparamref name="T" /> can be any primitive numeric type.</typeparam>
/// This struct only supports numerical types. This type is intended to be used as a building block for vectorizing
/// large algorithms. This type is immutable, individual elements cannot be modified.
/// </summary>
[Intrinsic] [Intrinsic]
[DebuggerDisplay("{DisplayString,nq}")] [DebuggerDisplay("{DisplayString,nq}")]
[DebuggerTypeProxy(typeof(VectorDebugView<>))] [DebuggerTypeProxy(typeof(VectorDebugView<>))]
......
...@@ -28,6 +28,7 @@ namespace System.Runtime.Intrinsics ...@@ -28,6 +28,7 @@ namespace System.Runtime.Intrinsics
// value instead, thus reducing the number of locals and helping prevent us from hitting // value instead, thus reducing the number of locals and helping prevent us from hitting
// the internal inlining limits of the JIT. // the internal inlining limits of the JIT.
/// <summary>Provides a collection of static methods for creating, manipulating, and otherwise operating on 128-bit vectors.</summary>
public static class Vector128 public static class Vector128
{ {
internal const int Size = 16; internal const int Size = 16;
......
...@@ -22,6 +22,9 @@ namespace System.Runtime.Intrinsics ...@@ -22,6 +22,9 @@ namespace System.Runtime.Intrinsics
// This ensures we get good codegen for the "fast-path" and allows the JIT to // This ensures we get good codegen for the "fast-path" and allows the JIT to
// determine inline profitability of the other paths as it would normally. // determine inline profitability of the other paths as it would normally.
/// <summary>Represents a 128-bit vector of a specified numeric type that is suitable for low-level optimization of parallel algorithms.</summary>
/// <typeparam name="T">The type of the elements in the vector.</typeparam>
[Intrinsic] [Intrinsic]
[DebuggerDisplay("{DisplayString,nq}")] [DebuggerDisplay("{DisplayString,nq}")]
[DebuggerTypeProxy(typeof(Vector128DebugView<>))] [DebuggerTypeProxy(typeof(Vector128DebugView<>))]
......
...@@ -27,6 +27,7 @@ namespace System.Runtime.Intrinsics ...@@ -27,6 +27,7 @@ namespace System.Runtime.Intrinsics
// value instead, thus reducing the number of locals and helping prevent us from hitting // value instead, thus reducing the number of locals and helping prevent us from hitting
// the internal inlining limits of the JIT. // the internal inlining limits of the JIT.
/// <summary>Provides a collection of static methods for creating, manipulating, and otherwise operating on 256-bit vectors.</summary>
public static unsafe class Vector256 public static unsafe class Vector256
{ {
internal const int Size = 32; internal const int Size = 32;
......
...@@ -17,11 +17,13 @@ namespace System.Runtime.Intrinsics ...@@ -17,11 +17,13 @@ namespace System.Runtime.Intrinsics
// that most of the code-paths will be optimized away as "dead code". // that most of the code-paths will be optimized away as "dead code".
// //
// We then manually inline cases (such as certain intrinsic code-paths) that // We then manually inline cases (such as certain intrinsic code-paths) that
// will generate code small enough to make the AgressiveInlining profitable. The // will generate code small enough to make the AggressiveInlining profitable. The
// other cases (such as the software fallback) are placed in their own method. // other cases (such as the software fallback) are placed in their own method.
// This ensures we get good codegen for the "fast-path" and allows the JIT to // This ensures we get good codegen for the "fast-path" and allows the JIT to
// determine inline profitability of the other paths as it would normally. // determine inline profitability of the other paths as it would normally.
/// <summary>Represents a 256-bit vector of a specified numeric type that is suitable for low-level optimization of parallel algorithms.</summary>
/// <typeparam name="T">The type of the elements in the vector.</typeparam>
[Intrinsic] [Intrinsic]
[DebuggerDisplay("{DisplayString,nq}")] [DebuggerDisplay("{DisplayString,nq}")]
[DebuggerTypeProxy(typeof(Vector256DebugView<>))] [DebuggerTypeProxy(typeof(Vector256DebugView<>))]
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
namespace System.Runtime.Intrinsics namespace System.Runtime.Intrinsics
{ {
/// <summary>Provides a collection of static methods for creating, manipulating, and otherwise operating on 64-bit vectors.</summary>
public static class Vector64 public static class Vector64
{ {
internal const int Size = 8; internal const int Size = 8;
...@@ -525,6 +526,7 @@ public static void CopyTo<T>(this Vector64<T> vector, Span<T> destination) ...@@ -525,6 +526,7 @@ public static void CopyTo<T>(this Vector64<T> vector, Span<T> destination)
} }
/// <summary>Creates a new <see cref="Vector64{T}" /> instance with all elements initialized to the specified value.</summary> /// <summary>Creates a new <see cref="Vector64{T}" /> instance with all elements initialized to the specified value.</summary>
/// <typeparam name="T">The type of the elements in the vector.</typeparam>
/// <param name="value">The value that all elements will be initialized to.</param> /// <param name="value">The value that all elements will be initialized to.</param>
/// <returns>A new <see cref="Vector64{T}" /> with all elements initialized to <paramref name="value" />.</returns> /// <returns>A new <see cref="Vector64{T}" /> with all elements initialized to <paramref name="value" />.</returns>
[Intrinsic] [Intrinsic]
......
...@@ -22,6 +22,8 @@ namespace System.Runtime.Intrinsics ...@@ -22,6 +22,8 @@ namespace System.Runtime.Intrinsics
// This ensures we get good codegen for the "fast-path" and allows the JIT to // This ensures we get good codegen for the "fast-path" and allows the JIT to
// determine inline profitability of the other paths as it would normally. // determine inline profitability of the other paths as it would normally.
/// <summary>Represents a 64-bit vector of a specified numeric type that is suitable for low-level optimization of parallel algorithms.</summary>
/// <typeparam name="T">The type of the elements in the vector.</typeparam>
[Intrinsic] [Intrinsic]
[DebuggerDisplay("{DisplayString,nq}")] [DebuggerDisplay("{DisplayString,nq}")]
[DebuggerTypeProxy(typeof(Vector64DebugView<>))] [DebuggerTypeProxy(typeof(Vector64DebugView<>))]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册