Edit

Share via


TensorMarshal Class

Definition

Provides methods to interoperate with Tensor<T>, TensorSpan<T>, and ReadOnlyTensorSpan<T>.

public ref class TensorMarshal abstract sealed
public static class TensorMarshal
type TensorMarshal = class
Public Class TensorMarshal
Inheritance
TensorMarshal

Methods

CreateReadOnlyTensorSpan<T>(T, IntPtr, ReadOnlySpan<IntPtr>, ReadOnlySpan<IntPtr>, Boolean)

Creates a new readonly tensor span over a portion of a regular managed object.

CreateTensorSpan<T>(T, IntPtr, ReadOnlySpan<IntPtr>, ReadOnlySpan<IntPtr>, Boolean)

Creates a new tensor span over a portion of a regular managed object.

GetReference<T>(ReadOnlyTensorSpan<T>)

Returns a reference to the element of the readonly tensor span at index 0.

GetReference<T>(TensorSpan<T>)

Returns a reference to the element of the tensor span at index 0.

Applies to