Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ public interface IReadOnlyTensor
/// <param name="indexes">The index of the element for which to get.</param>
/// <returns>The element that exists at <paramref name="indexes" />.</returns>
/// <exception cref="ArgumentOutOfRangeException">
/// Thrown when one of the following conditions is met:
/// * <paramref name="indexes" /> does not contain <see cref="Rank" /> elements
/// * <paramref name="indexes" /> contains an element that is negative or greater than or equal to the corresponding dimension length
/// One of the following conditions is met:
/// * <paramref name="indexes" /> does not contain <see cref="Rank" /> elements.
/// * <paramref name="indexes" /> contains an element that is negative or greater than or equal to the corresponding dimension length.
/// </exception>
object? this[params scoped ReadOnlySpan<nint> indexes] { get; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ public interface IReadOnlyTensor<TSelf, T> : IReadOnlyTensor, IEnumerable<T>
/// <param name="indexes">The index of the element for which to get a reference.</param>
/// <returns>A reference to the element that exists at <paramref name="indexes" />.</returns>
/// <exception cref="ArgumentOutOfRangeException">
/// Thrown when one of the following conditions is met:
/// * <paramref name="indexes" /> does not contain <see cref="IReadOnlyTensor.Rank" /> elements
/// * <paramref name="indexes" /> contains an element that is negative or greater than or equal to the corresponding dimension length
/// One of the following conditions is met:
/// * <paramref name="indexes" /> does not contain <see cref="IReadOnlyTensor.Rank" /> elements.
/// * <paramref name="indexes" /> contains an element that is negative or greater than or equal to the corresponding dimension length.
/// </exception>
new ref readonly T this[params scoped ReadOnlySpan<nint> indexes] { get; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ public interface ITensor : IReadOnlyTensor
/// <param name="indexes">The index of the element for which to get.</param>
/// <returns>The element that exists at <paramref name="indexes" />.</returns>
/// <exception cref="ArgumentOutOfRangeException">
/// Thrown when one of the following conditions is met:
/// * <paramref name="indexes" /> does not contain <see cref="IReadOnlyTensor.Rank" /> elements
/// * <paramref name="indexes" /> contains an element that is negative or greater than or equal to the corresponding dimension length
/// One of the following conditions is met:
/// * <paramref name="indexes" /> does not contain <see cref="IReadOnlyTensor.Rank" /> elements.
/// * <paramref name="indexes" /> contains an element that is negative or greater than or equal to the corresponding dimension length.
/// </exception>
new object? this[params scoped ReadOnlySpan<nint> indexes] { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ public ReadOnlyTensorSpan(T[]? array)
/// <param name="lengths">The lengths of the dimensions. If an empty span is provided, the created tensor will have a single dimension that is the same length as <paramref name="array" />.</param>
/// <remarks>Returns default when <paramref name="array"/> is null.</remarks>
/// <exception cref="ArgumentOutOfRangeException">
/// Thrown when one of the following conditions is met:
/// * <paramref name="array" /> is null and <paramref name="lengths" /> is not empty
/// * <paramref name="lengths" /> is not empty and contains an element that is either zero or negative
/// * <paramref name="lengths" /> is not empty and has a flattened length greater than <paramref name="array" />.Length
/// One of the following conditions is met:
/// * <paramref name="array" /> is null and <paramref name="lengths" /> is not empty.
/// * <paramref name="lengths" /> is not empty and contains an element that is either zero or negative.
/// * <paramref name="lengths" /> is not empty and has a flattened length greater than <paramref name="array" />.Length.
/// </exception>
public ReadOnlyTensorSpan(T[]? array, scoped ReadOnlySpan<nint> lengths)
{
Expand All @@ -67,13 +67,13 @@ public ReadOnlyTensorSpan(T[]? array, scoped ReadOnlySpan<nint> lengths)
/// <param name="strides">The strides of each dimension. If an empty span is provided, then strides will be automatically calculated from <paramref name="lengths" />.</param>
/// <remarks>Returns default when <paramref name="array"/> is null.</remarks>
/// <exception cref="ArgumentOutOfRangeException">
/// Thrown when one of the following conditions is met:
/// * <paramref name="array" /> is null and <paramref name="lengths" /> or <paramref name="strides" /> is not empty
/// * <paramref name="lengths" /> is not empty and contains an element that is either zero or negative
/// * <paramref name="lengths" /> is not empty and has a flattened length greater than <paramref name="array" />.Length
/// * <paramref name="strides" /> is not empty and has a length different from <paramref name="lengths"/>
/// * <paramref name="strides" /> is not empty and contains an element that is negative
/// * <paramref name="strides" /> is not empty and contains an element that is zero in a non leading position
/// One of the following conditions is met:
/// * <paramref name="array" /> is null and <paramref name="lengths" /> or <paramref name="strides" /> is not empty.
/// * <paramref name="lengths" /> is not empty and contains an element that is either zero or negative.
/// * <paramref name="lengths" /> is not empty and has a flattened length greater than <paramref name="array" />.Length.
/// * <paramref name="strides" /> is not empty and has a length different from <paramref name="lengths"/>.
/// * <paramref name="strides" /> is not empty and contains an element that is negative.
/// * <paramref name="strides" /> is not empty and contains an element that is zero in a non leading position.
/// </exception>
public ReadOnlyTensorSpan(T[]? array, scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides)
{
Expand All @@ -90,14 +90,14 @@ public ReadOnlyTensorSpan(T[]? array, scoped ReadOnlySpan<nint> lengths, scoped
/// <param name="strides">The strides of each dimension. If an empty span is provided, then strides will be automatically calculated from <paramref name="lengths" />.</param>
/// <remarks>Returns default when <paramref name="array"/> is null.</remarks>
/// <exception cref="ArgumentOutOfRangeException">
/// Thrown when one of the following conditions is met:
/// * <paramref name="array" /> is null and <paramref name="lengths" /> or <paramref name="strides" /> is not empty
/// * <paramref name="start" /> is not in range of <paramref name="array" />
/// * <paramref name="lengths" /> is not empty and contains an element that is either zero or negative
/// * <paramref name="lengths" /> is not empty and has a flattened length greater than <paramref name="array" />.Length
/// * <paramref name="strides" /> is not empty and has a length different from <paramref name="lengths"/>
/// * <paramref name="strides" /> is not empty and contains an element that is negative
/// * <paramref name="strides" /> is not empty and contains an element that is zero in a non leading position
/// One of the following conditions is met:
/// * <paramref name="array" /> is null and <paramref name="lengths" /> or <paramref name="strides" /> is not empty.
/// * <paramref name="start" /> is not in range of <paramref name="array" />.
/// * <paramref name="lengths" /> is not empty and contains an element that is either zero or negative.
/// * <paramref name="lengths" /> is not empty and has a flattened length greater than <paramref name="array" />.Length.
/// * <paramref name="strides" /> is not empty and has a length different from <paramref name="lengths"/>.
/// * <paramref name="strides" /> is not empty and contains an element that is negative.
/// * <paramref name="strides" /> is not empty and contains an element that is zero in a non leading position.
/// </exception>
public ReadOnlyTensorSpan(T[]? array, int start, scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides)
{
Expand All @@ -121,9 +121,9 @@ public ReadOnlyTensorSpan(ReadOnlySpan<T> span)
/// <param name="span">The target span.</param>
/// <param name="lengths">The lengths of the dimensions. If an empty span is provided, the created tensor span will have a single dimension that is the same length as <paramref name="span" />.</param>
/// <exception cref="ArgumentOutOfRangeException">
/// Thrown when one of the following conditions is met:
/// * <paramref name="lengths" /> is not empty and contains an element that is either zero or negative
/// * <paramref name="lengths" /> is not empty and has a flattened length greater than <paramref name="span" />.Length
/// One of the following conditions is met:
/// * <paramref name="lengths" /> is not empty and contains an element that is either zero or negative.
/// * <paramref name="lengths" /> is not empty and has a flattened length greater than <paramref name="span" />.Length.
/// </exception>
public ReadOnlyTensorSpan(ReadOnlySpan<T> span, scoped ReadOnlySpan<nint> lengths)
{
Expand All @@ -137,12 +137,12 @@ public ReadOnlyTensorSpan(ReadOnlySpan<T> span, scoped ReadOnlySpan<nint> length
/// <param name="lengths">The lengths of the dimensions. If an empty span is provided, the created tensor span will have a single dimension that is the same length as <paramref name="span" />.</param>
/// <param name="strides">The strides of each dimension. If an empty span is provided, then strides will be automatically calculated from <paramref name="lengths" />.</param>
/// <exception cref="ArgumentOutOfRangeException">
/// Thrown when one of the following conditions is met:
/// * <paramref name="lengths" /> is not empty and contains an element that is either zero or negative
/// * <paramref name="lengths" /> is not empty and has a flattened length greater than <paramref name="span" />.Length
/// * <paramref name="strides" /> is not empty and has a length different from <paramref name="lengths"/>
/// * <paramref name="strides" /> is not empty and contains an element that is negative
/// * <paramref name="strides" /> is not empty and contains an element that is zero in a non leading position
/// One of the following conditions is met:
/// * <paramref name="lengths" /> is not empty and contains an element that is either zero or negative.
/// * <paramref name="lengths" /> is not empty and has a flattened length greater than <paramref name="span" />.Length.
/// * <paramref name="strides" /> is not empty and has a length different from <paramref name="lengths"/>.
/// * <paramref name="strides" /> is not empty and contains an element that is negative.
/// * <paramref name="strides" /> is not empty and contains an element that is zero in a non leading position.
/// </exception>
public ReadOnlyTensorSpan(ReadOnlySpan<T> span, scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides)
{
Expand Down Expand Up @@ -175,14 +175,14 @@ public ReadOnlyTensorSpan(Array? array)
/// <para></para>
/// </remarks>
/// <exception cref="ArgumentOutOfRangeException">
/// Thrown when one of the following conditions is met:
/// * <paramref name="array" /> is null and <paramref name="lengths" /> or <paramref name="strides" /> is not empty
/// * <paramref name="start" /> is not in range of <paramref name="array" />
/// * <paramref name="lengths" /> is not empty and contains an element that is either zero or negative
/// * <paramref name="lengths" /> is not empty and has a flattened length greater than <paramref name="array" />.Length
/// * <paramref name="strides" /> is not empty and has a length different from <paramref name="lengths"/>
/// * <paramref name="strides" /> is not empty and contains an element that is negative
/// * <paramref name="strides" /> is not empty and contains an element that is zero in a non leading position
/// One of the following conditions is met:
/// * <paramref name="array" /> is null and <paramref name="lengths" /> or <paramref name="strides" /> is not empty.
/// * <paramref name="start" /> is not in range of <paramref name="array" />.
/// * <paramref name="lengths" /> is not empty and contains an element that is either zero or negative.
/// * <paramref name="lengths" /> is not empty and has a flattened length greater than <paramref name="array" />.Length.
/// * <paramref name="strides" /> is not empty and has a length different from <paramref name="lengths"/>.
/// * <paramref name="strides" /> is not empty and contains an element that is negative.
/// * <paramref name="strides" /> is not empty and contains an element that is zero in a non leading position.
/// </exception>
public ReadOnlyTensorSpan(Array? array, scoped ReadOnlySpan<int> start, scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides)
{
Expand Down Expand Up @@ -211,11 +211,11 @@ public unsafe ReadOnlyTensorSpan(T* data, nint dataLength)
/// <param name="lengths">The lengths of the dimensions. If an empty span is provided, the created tensor span will have a single dimension that is the same length as <paramref name="dataLength" />.</param>
/// <remarks>Returns default when <paramref name="data" /> is null.</remarks>
/// <exception cref="ArgumentOutOfRangeException">
/// Thrown when one of the following conditions is met:
/// * <paramref name="data" /> is <c>null</c> and <paramref name="dataLength" /> is not zero
/// * <paramref name="data" /> is null and <paramref name="lengths" />
/// * <paramref name="lengths" /> is not empty and contains an element that is either zero or negative
/// * <paramref name="lengths" /> is not empty and has a flattened length greater than <paramref name="dataLength" />
/// One of the following conditions is met:
/// * <paramref name="data" /> is <c>null</c> and <paramref name="dataLength" /> is not zero.
/// * <paramref name="data" /> is null and <paramref name="lengths" />.
/// * <paramref name="lengths" /> is not empty and contains an element that is either zero or negative.
/// * <paramref name="lengths" /> is not empty and has a flattened length greater than <paramref name="dataLength" />.
/// </exception>
[CLSCompliant(false)]
public unsafe ReadOnlyTensorSpan(T* data, nint dataLength, scoped ReadOnlySpan<nint> lengths)
Expand All @@ -231,14 +231,14 @@ public unsafe ReadOnlyTensorSpan(T* data, nint dataLength, scoped ReadOnlySpan<n
/// <param name="strides">The strides of each dimension. If an empty span is provided, then strides will be automatically calculated from <paramref name="lengths" />.</param>
/// <remarks>Returns default when <paramref name="data" /> is null.</remarks>
/// <exception cref="ArgumentOutOfRangeException">
/// Thrown when one of the following conditions is met:
/// * <paramref name="data" /> is <c>null</c> and <paramref name="dataLength" /> is not zero
/// * <paramref name="data" /> is null and <paramref name="lengths" /> or <paramref name="strides" /> is not empty
/// * <paramref name="lengths" /> is not empty and contains an element that is either zero or negative
/// * <paramref name="lengths" /> is not empty and has a flattened length greater than <paramref name="dataLength" />
/// * <paramref name="strides" /> is not empty and has a length different from <paramref name="lengths"/>
/// * <paramref name="strides" /> is not empty and contains an element that is negative
/// * <paramref name="strides" /> is not empty and contains an element that is zero in a non leading position
/// One of the following conditions is met:
/// * <paramref name="data" /> is <c>null</c> and <paramref name="dataLength" /> is not zero.
/// * <paramref name="data" /> is null and <paramref name="lengths" /> or <paramref name="strides" /> is not empty.
/// * <paramref name="lengths" /> is not empty and contains an element that is either zero or negative.
/// * <paramref name="lengths" /> is not empty and has a flattened length greater than <paramref name="dataLength" />.
/// * <paramref name="strides" /> is not empty and has a length different from <paramref name="lengths"/>.
/// * <paramref name="strides" /> is not empty and contains an element that is negative.
/// * <paramref name="strides" /> is not empty and contains an element that is zero in a non leading position.
/// </exception>
[CLSCompliant(false)]
public unsafe ReadOnlyTensorSpan(T* data, nint dataLength, scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides)
Expand Down
Loading
Loading