语言

Vector128<T> 结构

定义

表示一个指定数值类型的 128 位向量,该矢量适用于并行算法的低级别优化。

generic <typename T>
public value class Vector128 : IEquatable<System::Runtime::Intrinsics::Vector128<T>>
generic <typename T>
 where T : value classpublic value class Vector128 : IEquatable<System::Runtime::Intrinsics::Vector128<T>>
public readonly struct Vector128<T> : IEquatable<System.Runtime.Intrinsics.Vector128<T>>
public readonly struct Vector128<T> : IEquatable<System.Runtime.Intrinsics.Vector128<T>> where T : struct
type Vector128<'T> = struct
type Vector128<'T (requires 'T : struct)> = struct
Public Structure Vector128(Of T)
Implements IEquatable(Of Vector128(Of T))

类型参数

T

向量中的元素的类型。

继承
Vector128<T>
实现

属性

名称 说明
AllBitsSet

获取所有位都设置为 1 的新 Vector128<T> 位。

Count

获取在一个Vector128<T>中的数目T。

Indices

获取一个新 Vector128<T> 元素,并将元素设置为其索引。

IsSupported

获取一个值,该值指示是否 T 受支持。

Item[Int32]

获取指定索引处的元素。

One

获取初始化为一个元素的所有元素的新 Vector128<T> 元素。

Zero

获取初始化为零的所有元素的新 Vector128<T> 元素。

方法

名称 说明
Equals(Object)

确定指定的对象是否等于当前实例。

Equals(Vector128<T>)

确定指定的 Vector128<T> 实例是否等于当前实例。

GetHashCode()

获取实例的哈希代码。

ToString()

将当前实例转换为等效的字符串表示形式。

运算符

名称 说明
Addition(Vector128<T>, Vector128<T>)

添加两个向量来计算其总和。

BitwiseAnd(Vector128<T>, Vector128<T>)

计算两个向量的按位和两个向量。

BitwiseOr(Vector128<T>, Vector128<T>)

计算两个向量的按位或两个向量。

Division(Vector128<T>, T)

将矢量除以标量以计算每个元素商。

Division(Vector128<T>, Vector128<T>)

将两个向量除以计算其商。

Equality(Vector128<T>, Vector128<T>)

比较两个向量以确定所有元素是否相等。

ExclusiveOr(Vector128<T>, Vector128<T>)

计算两个向量的独占或两个向量。

Inequality(Vector128<T>, Vector128<T>)

比较两个向量,以确定任何元素是否不相等。

LeftShift(Vector128<T>, Int32)

将向量的每个元素左移指定量。

Multiply(T, Vector128<T>)

将矢量乘以标量来计算其产品。

Multiply(Vector128<T>, T)

将矢量乘以标量来计算其产品。

Multiply(Vector128<T>, Vector128<T>)

将两个向量相乘以计算其元素乘积。

OnesComplement(Vector128<T>)

计算矢量的补数。

RightShift(Vector128<T>, Int32)

按指定量向量向右移动 (signed) 的每个元素。

Subtraction(Vector128<T>, Vector128<T>)

减去两个矢量以计算其差异。

UnaryNegation(Vector128<T>)

计算向量的一元求反。

UnaryPlus(Vector128<T>)

返回给定向量不变。

UnsignedRightShift(Vector128<T>, Int32)

按指定量向量向右移动(无符号)的每个元素。

扩展属性

名称 说明
E

表示一个指定数值类型的 128 位向量,该矢量适用于并行算法的低级别优化。

Epsilon

表示一个指定数值类型的 128 位向量,该矢量适用于并行算法的低级别优化。

NaN

表示一个指定数值类型的 128 位向量,该矢量适用于并行算法的低级别优化。

NegativeInfinity

表示一个指定数值类型的 128 位向量,该矢量适用于并行算法的低级别优化。

NegativeOne

表示一个指定数值类型的 128 位向量,该矢量适用于并行算法的低级别优化。

NegativeZero

表示一个指定数值类型的 128 位向量,该矢量适用于并行算法的低级别优化。

Pi

表示一个指定数值类型的 128 位向量,该矢量适用于并行算法的低级别优化。

PositiveInfinity

表示一个指定数值类型的 128 位向量,该矢量适用于并行算法的低级别优化。

SignSequence

表示一个指定数值类型的 128 位向量,该矢量适用于并行算法的低级别优化。

Tau

表示一个指定数值类型的 128 位向量,该矢量适用于并行算法的低级别优化。

扩展方法

名称 说明
As<T,U>(Vector128<T>)

将类型的 Vector128<T> 类型 TFrom 重新解释为新 Vector128<T> 类型 TTo。

AsByte<T>(Vector128<T>)

重新解释 Vector128<T> 为新 Vector128 类型 Byte。

AsDouble<T>(Vector128<T>)

重新解释 Vector128<T> 为新 Vector128 类型 Double。

AsInt16<T>(Vector128<T>)

重新解释 Vector128<T> 为新 Vector128 类型 Int16。

AsInt32<T>(Vector128<T>)

重新解释 Vector128<T> 为新 Vector128 类型 Int32。

AsInt64<T>(Vector128<T>)

重新解释 Vector128<T> 为新 Vector128 类型 Int64。

AsNInt<T>(Vector128<T>)

重新解释 Vector128<T> 为新的 Vector128<T>。

AsNUInt<T>(Vector128<T>)

重新解释 Vector128<T> 为新的 Vector128<T>。

AsSByte<T>(Vector128<T>)

重新解释 Vector128<T> 为新 Vector128 类型 SByte。

AsSingle<T>(Vector128<T>)

重新解释 Vector128<T> 为新 Vector128 类型 Single。

AsUInt16<T>(Vector128<T>)

重新解释 Vector128<T> 为新 Vector128 类型 UInt16。

AsUInt32<T>(Vector128<T>)

重新解释 Vector128<T> 为新 Vector128 类型 UInt32。

AsUInt64<T>(Vector128<T>)

重新解释 Vector128<T> 为新 Vector128 类型 UInt64。

AsVector<T>(Vector128<T>)

重新解释 Vector128<T> 为新的 Vector<T>。

CopyTo<T>(Vector128<T>, Span<T>)

将 a Vector128<T> 复制到给定范围。

CopyTo<T>(Vector128<T>, T[], Int32)

从指定索引处开始,将 a Vector128<T> 复制到给定数组。

CopyTo<T>(Vector128<T>, T[])

将 a Vector128<T> 复制到给定数组。

ExtractMostSignificantBits<T>(Vector128<T>)

从向量中的每个元素中提取最重要的位。

GetElement<T>(Vector128<T>, Int32)

获取指定索引处的元素。

GetLower<T>(Vector128<T>)

获取低 64 位作为新 Vector64<T>值的值。

GetUpper<T>(Vector128<T>)

获取高 64 位作为新 Vector64<T>值的值。

Store<T>(Vector128<T>, T*)

将向量存储在给定的目标处。

StoreAligned<T>(Vector128<T>, T*)

将矢量存储在给定的对齐目标处。

StoreAlignedNonTemporal<T>(Vector128<T>, T*)

将矢量存储在给定的对齐目标处。

StoreUnsafe<T>(Vector128<T>, T, UIntPtr)

将向量存储在给定的目标处。

StoreUnsafe<T>(Vector128<T>, T)

将向量存储在给定的目标处。

ToScalar<T>(Vector128<T>)

将给定向量转换为包含第一个元素值的标量。

ToVector256<T>(Vector128<T>)

将给定向量转换为 Vector256<T> 新向量,将较低的 128 位设置为给定向量的值,并将高 128 位初始化为零。

ToVector256Unsafe<T>(Vector128<T>)

将给定向量转换为 Vector256<T> 新向量,将较低的 128 位设置为给定向量的值,而高 128 位则未初始化。

TryCopyTo<T>(Vector128<T>, Span<T>)

尝试将 a Vector<T> 复制到给定范围。

WithElement<T>(Vector128<T>, Int32, T)

Vector128<T>使用指定索引处的元素设置为指定值,其余元素设置为与给定向量中的元素相同的值。

WithLower<T>(Vector128<T>, Vector64<T>)

创建一个新 Vector128<T> 值,将较低的 64 位设置为指定值,并将高 64 位设置为与给定向量中的值相同的值。

WithUpper<T>(Vector128<T>, Vector64<T>)

创建一个新 Vector128<T> 值,将高 64 位设置为指定值,将较低的 64 位设置为与给定向量中的值相同的值。

适用于