Vector256.WithElement<T>(Vector256<T>, Int32, T) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
建立一個新 Vector256<T> Entry,將指定索引的元素設定為指定值,其餘元素則設定為與給定向量中的相同值。
public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
static System::Runtime::Intrinsics::Vector256<T> WithElement(System::Runtime::Intrinsics::Vector256<T> vector, int index, T value);
public:
generic <typename T>
where T : value class[System::Runtime::CompilerServices::Extension]
static System::Runtime::Intrinsics::Vector256<T> WithElement(System::Runtime::Intrinsics::Vector256<T> vector, int index, T value);
public static System.Runtime.Intrinsics.Vector256<T> WithElement<T>(this System.Runtime.Intrinsics.Vector256<T> vector, int index, T value);
public static System.Runtime.Intrinsics.Vector256<T> WithElement<T>(this System.Runtime.Intrinsics.Vector256<T> vector, int index, T value) where T : struct;
static member WithElement : System.Runtime.Intrinsics.Vector256<'T> * int * 'T -> System.Runtime.Intrinsics.Vector256<'T>
static member WithElement : System.Runtime.Intrinsics.Vector256<'T (requires 'T : struct)> * int * 'T -> System.Runtime.Intrinsics.Vector256<'T (requires 'T : struct)> (requires 'T : struct)
<Extension()>
Public Function WithElement(Of T) (vector As Vector256(Of T), index As Integer, value As T) As Vector256(Of T)
<Extension()>
Public Function WithElement(Of T As Structure) (vector As Vector256(Of T), index As Integer, value As T) As Vector256(Of T)
類型參數
- T
輸入向量的類型。
參數
- vector
- Vector256<T>
取剩餘元素的向量。
- index
- Int32
元素的索引。
- value
- T
要設定元素的值。
傳回
一個向量,元素 index 值設為 , value 其餘元素值與 中 vector相同。
例外狀況
不支援()的vectorT類型。
index 小於零或大於元素數。