Vector128.GetElement<T>(Vector128<T>, Int32) 方法

定义

获取指定索引处的元素。

public:
generic <typename T>
 where T : value class[System::Runtime::CompilerServices::Extension]
 static T GetElement(System::Runtime::Intrinsics::Vector128<T> vector, int index);
public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static T GetElement(System::Runtime::Intrinsics::Vector128<T> vector, int index);
public static T GetElement<T> (this System.Runtime.Intrinsics.Vector128<T> vector, int index) where T : struct;
public static T GetElement<T> (this System.Runtime.Intrinsics.Vector128<T> vector, int index);
static member GetElement : System.Runtime.Intrinsics.Vector128<'T (requires 'T : struct)> * int -> 'T (requires 'T : struct)
static member GetElement : System.Runtime.Intrinsics.Vector128<'T> * int -> 'T
<Extension()>
Public Function GetElement(Of T As Structure) (vector As Vector128(Of T), index As Integer) As T
<Extension()>
Public Function GetElement(Of T) (vector As Vector128(Of T), index As Integer) As T

类型参数

T

输入向量的类型。

参数

vector
Vector128<T>

要从中获取元素的向量。

index
Int32

要获取的元素的索引。

返回

T

index 处的元素的值。

例外

不支持 vector 类型 (T)。

index 小于零或者大于元素个数。

适用于