Tensor<T>.AsTensorSpan 方法

定义

重载

AsTensorSpan()

将此 Tensor<T> 转换为指向相同后盾内存的 TensorSpan<T>。/>

AsTensorSpan(ReadOnlySpan<NIndex>)

将此 Tensor<T> 转换为指向基于提供的起始索引的相同后盾内存的 TensorSpan<T>。/>

AsTensorSpan(ReadOnlySpan<NRange>)

将此 Tensor<T> 转换为一个 TensorSpan<T>,该 TensorSpan<T> 基于提供的范围指向相同的支持内存。/>

AsTensorSpan(ReadOnlySpan<IntPtr>)

将此 Tensor<T> 转换为指向基于提供的起始位置的同一支持内存的 TensorSpan<T>。/>

AsTensorSpan()

Source:
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>)

Source:
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>)

Source:
Tensor.cs

将此 Tensor<T> 转换为一个 TensorSpan<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>)

Source:
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>

实现

适用于