Skip to content
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

Update System.Numerics.Vector<T> documents #3334

Merged
merged 5 commits into from
Jan 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 92 additions & 25 deletions xml/System.Numerics/Vector`1.xml
Original file line number Diff line number Diff line change
@@ -49,11 +49,11 @@
<format type="text/markdown"><![CDATA[

## Remarks
<xref:System.Numerics.Vector%601> is an immutable structure that represents a single vector of a specified numeric type. The count of a <xref:System.Numerics.Vector%601> instance is fixed, but its upper limit is CPU-register dependent. It is intended to be used as a building block for vectorizing large algorithms.
<xref:System.Numerics.Vector%601> is an immutable structure that represents a single vector of a specified numeric type. The count of <xref:System.Numerics.Vector%601> instances is fixed, but its upper limit is CPU-register dependent. It is intended to be used as a building block for vectorizing large algorithms, and therefore cannot be used directly as an arbitrary length vector or tensor.

The <xref:System.Numerics.Vector%601> structure provides support for hardware acceleration.
The <xref:System.Numerics.Vector%601> structure provides support for hardware acceleration.

The following table shows which primitive numeric data type and operation combination uses intrinsic instructions for faster executions:
The term 'primitive numeric data type' in this document refers to numeric data types that are directly supported by the CPU and have instructions that can manipulate those data types. The following table shows which primitive numeric data type and operation combination uses intrinsic instructions for faster executions:

| Primitive type | `+` | `-` | `*` | `/` |
| --- | :---: | :---: | :---: | :---: |
@@ -72,6 +72,48 @@
</remarks>
</Docs>
<Members>
<MemberGroup MemberName=".ctor">
<AssemblyInfo>
<AssemblyName>System.Numerics.Vectors</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
<AssemblyVersion>4.1.3.0</AssemblyVersion>
<AssemblyVersion>4.1.4.0</AssemblyVersion>
<AssemblyVersion>4.1.5.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Creates an instance of <see cref="T:System.Numerics.Vector`1" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[

The type `T` can be any of the following numeric types:

| C# keywords | Framework Type |
| ----------- | -------------------- |
| `sbyte` | <xref:System.SByte> |
| `byte` | <xref:System.Byte> |
| `short` | <xref:System.Int16> |
| `ushort` | <xref:System.UInt16> |
| `int` | <xref:System.Int32> |
| `uint` | <xref:System.UInt32> |
| `long` | <xref:System.Int64> |
| `ulong` | <xref:System.UInt64> |
| `float` | <xref:System.Single> |
| `double` | <xref:System.Double> |

]]>
</format>
</remarks>
</Docs>
</MemberGroup>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public Vector (ReadOnlySpan&lt;byte&gt; values);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(valuetype System.ReadOnlySpan`1&lt;unsigned int8&gt; values) cil managed" />
@@ -92,9 +134,19 @@
<Parameter Name="values" Type="System.ReadOnlySpan&lt;System.Byte&gt;" Index="0" FrameworkAlternate="netcore-3.0;netcore-3.1" />
</Parameters>
<Docs>
<param name="values">A read-only span of bytes that contains the values to add to the vector. The span must contain at least <see cref="P:System.Numerics.Vector`1.Count" /> elements.</param>
<param name="values">A read-only span of bytes that contains the values to add to the vector. The span must contain at least <see cref="P:System.Numerics.Vector`1.Count" /> elements and only the first <see cref="P:System.Numerics.Vector`1.Count" /> elements are used.</param>
<summary>Constructs a vector from the given read-only span of bytes.</summary>
<remarks>To be added.</remarks>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks

Only the first <xref:System.Numerics.Vector%601.Count%2A> elements are added to the vector. The remainders are ignored.

]]></format>
</remarks>
<exception cref="T:System.IndexOutOfRangeException">
<paramref name="values" /> did not contain at least <see cref="P:System.Numerics.Vector`1.Count" /> elements.</exception>
</Docs>
</Member>
<Member MemberName=".ctor">
@@ -117,9 +169,19 @@
<Parameter Name="values" Type="System.ReadOnlySpan&lt;T&gt;" Index="0" FrameworkAlternate="netcore-3.0;netcore-3.1" />
</Parameters>
<Docs>
<param name="values">The values to add to the vector, as a read-only span of objects of type T. The span must contain at least <see cref="P:System.Numerics.Vector`1.Count" /> elements.</param>
<param name="values">The values to add to the vector, as a read-only span of objects of type T. The span must contain at least <see cref="P:System.Numerics.Vector`1.Count" /> elements and only the first <see cref="P:System.Numerics.Vector`1.Count" /> elements are used.</param>
<summary>Constructs a vector from the given <see cref="T:System.ReadOnlySpan`1" />.</summary>
<remarks>To be added.</remarks>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks

Only the first <xref:System.Numerics.Vector%601.Count%2A> elements are added to the vector. The remainders are ignored.

]]></format>
</remarks>
<exception cref="T:System.IndexOutOfRangeException">
<paramref name="values" /> did not contain at least <see cref="P:System.Numerics.Vector`1.Count" /> elements.</exception>
</Docs>
</Member>
<Member MemberName=".ctor">
@@ -145,9 +207,19 @@
<Parameter Name="values" Type="System.Span&lt;T&gt;" Index="0" FrameworkAlternate="netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1;netcore-3.1" />
</Parameters>
<Docs>
<param name="values">The values to add to the vector, as a span of objects of type T. The span must contain at least <see cref="P:System.Numerics.Vector`1.Count" /> elements.</param>
<param name="values">The values to add to the vector, as a span of objects of type T. The span must contain at least <see cref="P:System.Numerics.Vector`1.Count" /> elements and only the first <see cref="P:System.Numerics.Vector`1.Count" /> elements are used.</param>
<summary>Constructs a vector from the given <see cref="T:System.Span`1" />.</summary>
<remarks>To be added.</remarks>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks

Only the first <xref:System.Numerics.Vector%601.Count%2A> elements are added to the vector. The remainders are ignored.

]]></format>
</remarks>
<exception cref="T:System.IndexOutOfRangeException">
<paramref name="values" /> did not contain at least <see cref="P:System.Numerics.Vector`1.Count" /> elements.</exception>
</Docs>
</Member>
<Member MemberName=".ctor">
@@ -181,14 +253,7 @@
<Docs>
<param name="value">The numeric type that defines the type of the components in the vector.</param>
<summary>Creates a vector whose components are of a specified type.</summary>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
`value` can be any primitive numeric type (that is, a numeric type whose <xref:System.Type.IsPrimitive%2A?displayProperty=nameWithType> property returns `true`.

]]></format>
</remarks>
<remarks>To be added. </remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
@@ -220,13 +285,14 @@
<Parameter Name="values" Type="T[]" />
</Parameters>
<Docs>
<param name="values">A numeric array.</param>
<param name="values">The values to add to the vector, as an array of objects of type T. The array must contain at least <see cref="P:System.Numerics.Vector`1.Count" /> elements and only the first <see cref="P:System.Numerics.Vector`1.Count" /> elements are used.</param>
<summary>Creates a vector from a specified array.</summary>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
`values` must contain at least <xref:System.Numerics.Vector%601.Count%2A> elements.

Only the first <xref:System.Numerics.Vector%601.Count%2A> elements are added to the vector. The remainders are ignored.

]]></format>
</remarks>
@@ -264,16 +330,17 @@
<Parameter Name="index" Type="System.Int32" />
</Parameters>
<Docs>
<param name="values">A numeric array.</param>
<param name="values">The values to add to the vector, as an array of objects of type T. The array must contain at least <see cref="P:System.Numerics.Vector`1.Count" /> elements from the specified index and only the first <see cref="P:System.Numerics.Vector`1.Count" /> elements are used.</param>
<param name="index">The starting index position from which to create the vector.</param>
<summary>Creates a vector from a specified array starting at a specified index position.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
<format type="text/markdown"><![CDATA[

## Remarks
The array must contain at least <xref:System.Numerics.Vector%601.Count%2A?displayProperty=nameWithType> elements from the specified index.

]]></format>

Only the first <xref:System.Numerics.Vector%601.Count%2A> elements are added to the vector. The remainders are ignored.

]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="values" /> is <see langword="null" />.</exception>