Sdílet prostřednictvím


Tensor.AsReadOnlyTensorSpan<T>(T[], ReadOnlySpan<IntPtr>) Metoda

Definice

Rozšiřující metoda pro snadnější vytvoření TensorSpan z pole.

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static System::Numerics::Tensors::ReadOnlyTensorSpan<T> AsReadOnlyTensorSpan(cli::array <T> ^ array, ReadOnlySpan<IntPtr> lengths);
public static System.Numerics.Tensors.ReadOnlyTensorSpan<T> AsReadOnlyTensorSpan<T> (this T[]? array, scoped ReadOnlySpan<IntPtr> lengths);
static member AsReadOnlyTensorSpan : 'T[] * ReadOnlySpan<nativeint> -> System.Numerics.Tensors.ReadOnlyTensorSpan<'T>
<Extension()>
Public Function AsReadOnlyTensorSpan(Of T) (array As T(), lengths As ReadOnlySpan(Of IntPtr)) As ReadOnlyTensorSpan(Of T)

Parametry typu

T

Typ prvků v poli

Parametry

array
T[]

Array s daty

lengths

ReadOnlySpan<IntPtr>

ReadOnlySpan<nativeint>

Obrazec pro TensorSpan<T>

Návraty

Platí pro