共用方式為


Tensor<T>.AsTensorSpan 方法

定義

多載

AsTensorSpan()

將此 Tensor<T> 轉換成指向相同備份記憶體的 TensorSpan<T>。/>

AsTensorSpan(ReadOnlySpan<NIndex>)

根據提供的開始索引,將此 Tensor<T> 轉換成指向相同備份記憶體的 TensorSpan<T>。/>

AsTensorSpan(ReadOnlySpan<NRange>)

根據提供的範圍,將此 Tensor<T> 轉換成指向相同備份記憶體的 TensorSpan<T>。/>

AsTensorSpan(ReadOnlySpan<IntPtr>)

將此 Tensor<T> 轉換成 TensorSpan<T>,以根據提供的開始位置指向相同的備份記憶體。/>

AsTensorSpan()

來源:
Tensor.cs
來源:
Tensor.cs

將此 Tensor<T> 轉換成指向相同備份記憶體的 TensorSpan<T>。/>

public:
 virtual System::Numerics::Tensors::TensorSpan<T> AsTensorSpan();
public System.Numerics.Tensors.TensorSpan<T> AsTensorSpan ();
abstract member AsTensorSpan : unit -> System.Numerics.Tensors.TensorSpan<'T>
override this.AsTensorSpan : unit -> System.Numerics.Tensors.TensorSpan<'T>
Public Function AsTensorSpan () As TensorSpan(Of T)

傳回

TensorSpan<T>

實作

適用於

AsTensorSpan(ReadOnlySpan<NIndex>)

來源:
Tensor.cs
來源:
Tensor.cs

根據提供的開始索引,將此 Tensor<T> 轉換成指向相同備份記憶體的 TensorSpan<T>。/>

public:
 virtual System::Numerics::Tensors::TensorSpan<T> AsTensorSpan(ReadOnlySpan<System::Buffers::NIndex> startIndex);
public System.Numerics.Tensors.TensorSpan<T> AsTensorSpan (scoped ReadOnlySpan<System.Buffers.NIndex> startIndex);
abstract member AsTensorSpan : ReadOnlySpan<System.Buffers.NIndex> -> System.Numerics.Tensors.TensorSpan<'T>
override this.AsTensorSpan : ReadOnlySpan<System.Buffers.NIndex> -> System.Numerics.Tensors.TensorSpan<'T>
Public Function AsTensorSpan (startIndex As ReadOnlySpan(Of NIndex)) As TensorSpan(Of T)

參數

startIndex
ReadOnlySpan<NIndex>

您想要在 TensorSpan<T>的範圍。

傳回

根據提供的範圍 TensorSpan<T>

實作

適用於

AsTensorSpan(ReadOnlySpan<NRange>)

來源:
Tensor.cs
來源:
Tensor.cs

根據提供的範圍,將此 Tensor<T> 轉換成指向相同備份記憶體的 TensorSpan<T>。/>

public:
 virtual System::Numerics::Tensors::TensorSpan<T> AsTensorSpan(ReadOnlySpan<System::Buffers::NRange> start);
public System.Numerics.Tensors.TensorSpan<T> AsTensorSpan (scoped ReadOnlySpan<System.Buffers.NRange> start);
abstract member AsTensorSpan : ReadOnlySpan<System.Buffers.NRange> -> System.Numerics.Tensors.TensorSpan<'T>
override this.AsTensorSpan : ReadOnlySpan<System.Buffers.NRange> -> System.Numerics.Tensors.TensorSpan<'T>
Public Function AsTensorSpan (start As ReadOnlySpan(Of NRange)) As TensorSpan(Of T)

參數

start
ReadOnlySpan<NRange>

您想要在 TensorSpan<T>的範圍。

傳回

根據提供的範圍 TensorSpan<T>

實作

適用於

AsTensorSpan(ReadOnlySpan<IntPtr>)

來源:
Tensor.cs
來源:
Tensor.cs

將此 Tensor<T> 轉換成 TensorSpan<T>,以根據提供的開始位置指向相同的備份記憶體。/>

public:
 virtual System::Numerics::Tensors::TensorSpan<T> AsTensorSpan(ReadOnlySpan<IntPtr> start);
public System.Numerics.Tensors.TensorSpan<T> AsTensorSpan (scoped ReadOnlySpan<IntPtr> start);
abstract member AsTensorSpan : ReadOnlySpan<nativeint> -> System.Numerics.Tensors.TensorSpan<'T>
override this.AsTensorSpan : ReadOnlySpan<nativeint> -> System.Numerics.Tensors.TensorSpan<'T>
Public Function AsTensorSpan (start As ReadOnlySpan(Of IntPtr)) As TensorSpan(Of T)

參數

start

ReadOnlySpan<IntPtr>

ReadOnlySpan<nativeint>

您想要在 TensorSpan<T>中的開始位置。

傳回

根據提供的範圍 TensorSpan<T>

實作

適用於