Tensor.SetSlice 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
SetSlice<T>(Tensor<T>, ReadOnlyTensorSpan<T>, ReadOnlySpan<NRange>) |
使用给定 |
SetSlice<T>(TensorSpan<T>, ReadOnlyTensorSpan<T>, ReadOnlySpan<NRange>) |
使用给定 |
SetSlice<T>(Tensor<T>, ReadOnlyTensorSpan<T>, ReadOnlySpan<NRange>)
- Source:
- TensorExtensions.cs
使用给定 ranges
提供的 values
设置给定 tensor
的切片
public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
static System::Numerics::Tensors::Tensor<T> ^ SetSlice(System::Numerics::Tensors::Tensor<T> ^ tensor, System::Numerics::Tensors::ReadOnlyTensorSpan<T> % values, ReadOnlySpan<System::Buffers::NRange> ranges);
public static System.Numerics.Tensors.Tensor<T> SetSlice<T> (this System.Numerics.Tensors.Tensor<T> tensor, in System.Numerics.Tensors.ReadOnlyTensorSpan<T> values, scoped ReadOnlySpan<System.Buffers.NRange> ranges);
static member SetSlice : System.Numerics.Tensors.Tensor<'T> * ReadOnlyTensorSpan * ReadOnlySpan<System.Buffers.NRange> -> System.Numerics.Tensors.Tensor<'T>
<Extension()>
Public Function SetSlice(Of T) (tensor As Tensor(Of T), ByRef values As ReadOnlyTensorSpan(Of T), ranges As ReadOnlySpan(Of NRange)) As Tensor(Of T)
类型参数
- T
参数
- values
- ReadOnlyTensorSpan<T>
要在 tensor
中设置的值。
- ranges
- ReadOnlySpan<NRange>
要设置的范围。
返回
适用于
SetSlice<T>(TensorSpan<T>, ReadOnlyTensorSpan<T>, ReadOnlySpan<NRange>)
- Source:
- TensorExtensions.cs
使用给定 ranges
提供的 values
设置给定 tensor
的切片
public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
static System::Numerics::Tensors::TensorSpan<T> ^ SetSlice(System::Numerics::Tensors::TensorSpan<T> % tensor, System::Numerics::Tensors::ReadOnlyTensorSpan<T> % values, ReadOnlySpan<System::Buffers::NRange> ranges);
public static ref readonly System.Numerics.Tensors.TensorSpan<T> SetSlice<T> (this in System.Numerics.Tensors.TensorSpan<T> tensor, scoped in System.Numerics.Tensors.ReadOnlyTensorSpan<T> values, scoped ReadOnlySpan<System.Buffers.NRange> ranges);
static member SetSlice : TensorSpan * ReadOnlyTensorSpan * ReadOnlySpan<System.Buffers.NRange> -> TensorSpan
<Extension()>
Public Function SetSlice(Of T) (ByRef tensor As TensorSpan(Of T), ByRef values As ReadOnlyTensorSpan(Of T), ranges As ReadOnlySpan(Of NRange)) As TensorSpan(Of T)
类型参数
- T
参数
- tensor
- TensorSpan<T>
输入 Tensor<T>。
- values
- ReadOnlyTensorSpan<T>
要在 tensor
中设置的值。
- ranges
- ReadOnlySpan<NRange>
要设置的范围。