ReadOnlyTensorSpan<T>.Item[ReadOnlySpan Property

Definition

Overloads

Item[ReadOnlySpan<NIndex>]

Returns a reference to specified element of the ReadOnlyTensorSpan.

Item[ReadOnlySpan<NRange>]

Returns a slice of the ReadOnlyTensorSpan.

Item[ReadOnlySpan<IntPtr>]

Returns a reference to specified element of the ReadOnlyTensorSpan.

Item[ReadOnlySpan<NIndex>]

Source:
ReadOnlyTensorSpan.cs
Source:
ReadOnlyTensorSpan.cs

Returns a reference to specified element of the ReadOnlyTensorSpan.

C#
public ref readonly T this[scoped ReadOnlySpan<System.Buffers.NIndex> indexes] { get; }

Parameters

indexes
ReadOnlySpan<NIndex>

Property Value

T

Exceptions

Any index is less than 0 or any index is greater than or equal to FlattenedLength.

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)

Item[ReadOnlySpan<NRange>]

Source:
ReadOnlyTensorSpan.cs
Source:
ReadOnlyTensorSpan.cs

Returns a slice of the ReadOnlyTensorSpan.

C#
public System.Numerics.Tensors.ReadOnlyTensorSpan<T> this[scoped ReadOnlySpan<System.Buffers.NRange> ranges] { get; }

Parameters

Property Value

Exceptions

Any index is less than 0 or any index is greater than or equal to FlattenedLength.

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)

Item[ReadOnlySpan<IntPtr>]

Source:
ReadOnlyTensorSpan.cs
Source:
ReadOnlyTensorSpan.cs

Returns a reference to specified element of the ReadOnlyTensorSpan.

C#
public ref readonly T this[scoped ReadOnlySpan<IntPtr> indexes] { get; }

Parameters

indexes

ReadOnlySpan<IntPtr>

Property Value

T

Exceptions

Any index is less than 0 or any index is greater than or equal to FlattenedLength.

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)