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