Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a contiguous region of arbitrary memory. Unlike arrays, it can point to either managed or native memory, or to memory allocated on the stack. It is type-safe and memory-safe.
generic <typename T>
public value class ReadOnlyTensorSpan
[System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5001", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public readonly ref struct ReadOnlyTensorSpan<T>
[<System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5001", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
type ReadOnlyTensorSpan<'T> = struct
Public Structure ReadOnlyTensorSpan(Of T)
The type of the elements within the tensor span.
Read |
Creates a new tensor span over the portion of the target array beginning at the specified start index and using the specified lengths and strides. |
Read |
Creates a new tensor span over the entirety of the target array. |
Read |
Creates a new tensor span over the target span using the specified lengths and strides. |
Read |
Creates a new tensor span over the target span using the specified lengths. |
Read |
Creates a new tensor span over the entirety of the target span. |
Read |
Creates a new tensor over the portion of the target array beginning at the specified start index and using the specified lengths and strides. |
Read |
Creates a new tensor over the portion of the target array beginning at the specified start index and using the specified lengths and strides. |
Read |
Creates a new tensor over the portion of the target array using the specified lengths. |
Read |
Creates a new tensor over the entirety of the target array. |
Read |
Creates a new tensor span over the target unmanaged buffer using the specified lengths and strides. |
Read |
Creates a new tensor span over the target unmanaged buffer using the specified lengths. |
Read |
Creates a new tensor span over the target unmanaged buffer. |
Empty |
Returns a 0-length read-only span whose base is the null pointer. |
Flattened |
Gets the number of items in the span. |
Has |
Determines if the current tensor has any dimension where |
Is |
Determines if the current tensor is dense. |
Is |
Gets a value indicating whether this TensorSpan<T> is empty. |
Item[Read |
Returns a reference to specified element of the ReadOnlyTensorSpan. |
Item[Read |
Returns a reference to specified element of the ReadOnlyTensorSpan. |
Item[Read |
Returns a slice of the ReadOnlyTensorSpan. |
Lengths |
Gets the length of each dimension in this TensorSpan<T>. |
Rank |
Gets the rank, or number of dimensions, of this TensorSpan<T>. |
Strides |
Gets the strides of this TensorSpan<T>. |
Cast |
Casts a tensor span of |
Copy |
Copies the contents of the tensor into a destination tensor span. |
Equals(Object) |
Obsolete.
Calls to this method are not supported. |
Flatten |
Flattens the contents of this span into the provided Span<T>. |
Get |
Returns a span that can be used to access the flattened elements for a given dimension. |
Get |
Gets an enumerator for the readonly tensor span. |
Get |
Obsolete.
Calls to this method are not supported. |
Get |
Returns a reference to the 0th element of the ReadOnlyTensorSpan. If the ReadOnlyTensorSpan is empty, returns null reference. |
Slice(Read |
Forms a slice out of the current tensor that begins at a specified index. |
Slice(Read |
Returns a reference to specified element of the TensorSpan. |
Slice(Read |
Forms a slice out of the given span. |
To |
Returns the string representation of the tensor span. |
Try |
Attempts to copy the contents of this tensor into a destination tensor span and returns a value to indicate whether or not the operation succeeded. |
Try |
Flattens the contents of this span into the provided Span<T>. |
Equality(Read |
Returns a value that indicates whether two tensor spans are equal. |
Implicit(T[] to Read |
|
Inequality(Read |
Returns a value that indicates whether two tensor spans are not equal. |
Broadcast |
Broadcast the data from |
Reshape<T>(Read |
Reshapes the |
Sequence |
Determines whether two sequences are equal by comparing the elements using IEquatable{T}.Equals(T). |
Squeeze<T>(Read |
Removes all dimensions of length one from the |
Squeeze |
Removes axis of length one from the |
To |
Creates a String representation of the ReadOnlyTensorSpan<T>."/> |
Try |
Broadcast the data from |
Unsqueeze<T>(Read |
Insert a new dimension of length 1 that will appear at the dimension position. |
Product | Versions |
---|---|
.NET | 8 (package-provided), 9 (package-provided), 10 (package-provided) |
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in