Vector128 Class

Definition

Provides a collection of static methods for creating, manipulating, and otherwise operating on 128-bit vectors.

public ref class Vector128 abstract sealed
public static class Vector128
type Vector128 = class
Public Module Vector128
Inheritance
Vector128

Properties

IsHardwareAccelerated

Gets a value that indicates whether 128-bit vector operations are subject to hardware acceleration through JIT intrinsic support.

Methods

Abs<T>(Vector128<T>)

Computes the absolute value of each element in a vector.

Add<T>(Vector128<T>, Vector128<T>)

Adds two vectors to compute their sum.

AndNot<T>(Vector128<T>, Vector128<T>)

Computes the bitwise-and of a given vector and the ones complement of another vector.

As<TFrom,TTo>(Vector128<TFrom>)

Reinterprets a Vector128<T> of type TFrom as a new Vector128<T> of type TTo.

AsByte<T>(Vector128<T>)

Reinterprets a Vector128<T> as a new Vector128 of type Byte.

AsDouble<T>(Vector128<T>)

Reinterprets a Vector128<T> as a new Vector128 of type Double.

AsInt16<T>(Vector128<T>)

Reinterprets a Vector128<T> as a new Vector128 of type Int16.

AsInt32<T>(Vector128<T>)

Reinterprets a Vector128<T> as a new Vector128 of type Int32.

AsInt64<T>(Vector128<T>)

Reinterprets a Vector128<T> as a new Vector128 of type Int64.

AsNInt<T>(Vector128<T>)

Reinterprets a Vector128<T> as a new Vector128<T>.

AsNUInt<T>(Vector128<T>)

Reinterprets a Vector128<T> as a new Vector128<T>.

AsSByte<T>(Vector128<T>)

Reinterprets a Vector128<T> as a new Vector128 of type SByte.

AsSingle<T>(Vector128<T>)

Reinterprets a Vector128<T> as a new Vector128 of type Single.

AsUInt16<T>(Vector128<T>)

Reinterprets a Vector128<T> as a new Vector128 of type UInt16.

AsUInt32<T>(Vector128<T>)

Reinterprets a Vector128<T> as a new Vector128 of type UInt32.

AsUInt64<T>(Vector128<T>)

Reinterprets a Vector128<T> as a new Vector128 of type UInt64.

AsVector<T>(Vector128<T>)

Reinterprets a Vector128<T> as a new Vector<T>.

AsVector128(Vector2)

Reinterprets a Vector2 as a new Vector128<T>.

AsVector128(Vector3)

Reinterprets a Vector3 as a new Vector128<T>.

AsVector128(Vector4)

Reinterprets a Vector4 as a new Vector128<T>.

AsVector128<T>(Vector<T>)

Reinterprets a Vector<T> as a new Vector128<T>.

AsVector2(Vector128<Single>)

Reinterprets a Vector128<T> as a new Vector2.

AsVector3(Vector128<Single>)

Reinterprets a Vector128<T> as a new Vector3.

AsVector4(Vector128<Single>)

Reinterprets a Vector128<T> as a new Vector4.

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

Computes the bitwise-and of two vectors.

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

Computes the bitwise-or of two vectors.

Ceiling(Vector128<Double>)

Computes the ceiling of each element in a vector.

Ceiling(Vector128<Single>)

Computes the ceiling of each element in a vector.

ConditionalSelect<T>(Vector128<T>, Vector128<T>, Vector128<T>)

Conditionally selects a value from two vectors on a bitwise basis.

ConvertToDouble(Vector128<Int64>)

Converts a Vector128<T> to a Vector128<T>.

ConvertToDouble(Vector128<UInt64>)

Converts a Vector128<T> to a Vector128<T>.

ConvertToInt32(Vector128<Single>)

Converts a Vector128<T> to a Vector128<T>.

ConvertToInt64(Vector128<Double>)

Converts a Vector128<T> to a Vector128<T>.

ConvertToSingle(Vector128<Int32>)

Converts a Vector128<T> to a Vector128<T>.

ConvertToSingle(Vector128<UInt32>)

Converts a Vector128<T> to a Vector128<T>.

ConvertToUInt32(Vector128<Single>)

Converts a Vector128<T> to a Vector128<T>.

ConvertToUInt64(Vector128<Double>)

Converts a Vector128<T> to a Vector128<T>.

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

Copies a Vector128<T> to a given span.

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

Copies a Vector128<T> to a given array.

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

Copies a Vector128<T> to a given array starting at the specified index.

Create(Byte)

Creates a new Vector128<T> instance with all elements initialized to the specified value.

Create(Byte, Byte, Byte, Byte, Byte, Byte, Byte, Byte, Byte, Byte, Byte, Byte, Byte, Byte, Byte, Byte)

Creates a new Vector128<T> instance with each element initialized to the corresponding specified value.

Create(Double)

Creates a new Vector128<T> instance with all elements initialized to the specified value.

Create(Double, Double)

Creates a new Vector128<T> instance with each element initialized to the corresponding specified value.

Create(Int16)

Creates a new Vector128<T> instance with all elements initialized to the specified value.

Create(Int16, Int16, Int16, Int16, Int16, Int16, Int16, Int16)

Creates a new Vector128<T> instance with each element initialized to the corresponding specified value.

Create(Int32)

Creates a new Vector128<T> instance with all elements initialized to the specified value.

Create(Int32, Int32, Int32, Int32)

Creates a new Vector128<T> instance with each element initialized to the corresponding specified value.

Create(Int64)

Creates a new Vector128<T> instance with all elements initialized to the specified value.

Create(Int64, Int64)

Creates a new Vector128<T> instance with each element initialized to the corresponding specified value.

Create(IntPtr)

Creates a new Vector128<T> instance with all elements initialized to the specified value.

Create(SByte)

Creates a new Vector128<T> instance with all elements initialized to the specified value.

Create(SByte, SByte, SByte, SByte, SByte, SByte, SByte, SByte, SByte, SByte, SByte, SByte, SByte, SByte, SByte, SByte)

Creates a new Vector128<T> instance with each element initialized to the corresponding specified value.

Create(Single)

Creates a new Vector128<T> instance with all elements initialized to the specified value.

Create(Single, Single, Single, Single)

Creates a new Vector128<T> instance with each element initialized to the corresponding specified value.

Create(UInt16)

Creates a new Vector128<T> instance with all elements initialized to the specified value.

Create(UInt16, UInt16, UInt16, UInt16, UInt16, UInt16, UInt16, UInt16)

Creates a new Vector128<T> instance with each element initialized to the corresponding specified value.

Create(UInt32)

Creates a new Vector128<T> instance with all elements initialized to the specified value.

Create(UInt32, UInt32, UInt32, UInt32)

Creates a new Vector128<T> instance with each element initialized to the corresponding specified value.

Create(UInt64)

Creates a new Vector128<T> instance with all elements initialized to the specified value.

Create(UInt64, UInt64)

Creates a new Vector128<T> instance with each element initialized to the corresponding specified value.

Create(UIntPtr)

Creates a new Vector128<T> instance with all elements initialized to the specified value.

Create(Vector64<Byte>, Vector64<Byte>)

Creates a new Vector128<T> instance from two Vector64<T> instances.

Create(Vector64<Double>, Vector64<Double>)

Creates a new Vector128<T> instance from two Vector64<T> instances.

Create(Vector64<Int16>, Vector64<Int16>)

Creates a new Vector128<T> instance from two Vector64<T> instances.

Create(Vector64<Int32>, Vector64<Int32>)

Creates a new Vector128<T> instance from two Vector64<T> instances.

Create(Vector64<Int64>, Vector64<Int64>)

Creates a new Vector128<T> instance from two Vector64<T> instances.

Create(Vector64<SByte>, Vector64<SByte>)

Creates a new Vector128<T> instance from two Vector64<T> instances.

Create(Vector64<Single>, Vector64<Single>)

Creates a new Vector128<T> instance from two Vector64<T> instances.

Create(Vector64<UInt16>, Vector64<UInt16>)

Creates a new Vector128<T> instance from two Vector64<T> instances.

Create(Vector64<UInt32>, Vector64<UInt32>)

Creates a new Vector128<T> instance from two Vector64<T> instances.

Create(Vector64<UInt64>, Vector64<UInt64>)

Creates a new Vector128<T> instance from two Vector64<T> instances.

Create<T>(ReadOnlySpan<T>)

Creates a new Vector128<T> from a given readonly span.

Create<T>(T)

Creates a new Vector128<T> instance with all elements initialized to the specified value.

Create<T>(T[])

Creates a new Vector128<T> from a given array.

Create<T>(T[], Int32)

Creates a new Vector128<T> from a given array.

CreateScalar(Byte)

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements initialized to zero.

CreateScalar(Double)

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements initialized to zero.

CreateScalar(Int16)

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements initialized to zero.

CreateScalar(Int32)

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements initialized to zero.

CreateScalar(Int64)

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements initialized to zero.

CreateScalar(IntPtr)

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements initialized to zero.

CreateScalar(SByte)

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements initialized to zero.

CreateScalar(Single)

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements initialized to zero.

CreateScalar(UInt16)

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements initialized to zero.

CreateScalar(UInt32)

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements initialized to zero.

CreateScalar(UInt64)

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements initialized to zero.

CreateScalar(UIntPtr)

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements initialized to zero.

CreateScalarUnsafe(Byte)

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements left uninitialized.

CreateScalarUnsafe(Double)

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements left uninitialized.

CreateScalarUnsafe(Int16)

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements left uninitialized.

CreateScalarUnsafe(Int32)

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements left uninitialized.

CreateScalarUnsafe(Int64)

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements left uninitialized.

CreateScalarUnsafe(IntPtr)

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements left uninitialized.

CreateScalarUnsafe(SByte)

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements left uninitialized.

CreateScalarUnsafe(Single)

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements left uninitialized.

CreateScalarUnsafe(UInt16)

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements left uninitialized.

CreateScalarUnsafe(UInt32)

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements left uninitialized.

CreateScalarUnsafe(UInt64)

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements left uninitialized.

CreateScalarUnsafe(UIntPtr)

Creates a new Vector128<T> instance with the first element initialized to the specified value and the remaining elements left uninitialized.

Divide<T>(Vector128<T>, Vector128<T>)

Divides two vectors to compute their quotient.

Dot<T>(Vector128<T>, Vector128<T>)

Computes the dot product of two vectors.

Equals<T>(Vector128<T>, Vector128<T>)

Compares two vectors to determine if they are equal on a per-element basis.

EqualsAll<T>(Vector128<T>, Vector128<T>)

Compares two vectors to determine if all elements are equal.

EqualsAny<T>(Vector128<T>, Vector128<T>)

Compares two vectors to determine if any elements are equal.

ExtractMostSignificantBits<T>(Vector128<T>)

Extracts the most significant bit from each element in a vector.

Floor(Vector128<Double>)

Computes the floor of each element in a vector.

Floor(Vector128<Single>)

Computes the floor of each element in a vector.

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

Gets the element at the specified index.

GetLower<T>(Vector128<T>)

Gets the value of the lower 64-bits as a new Vector64<T>.

GetUpper<T>(Vector128<T>)

Gets the value of the upper 64-bits as a new Vector64<T>.

GreaterThan<T>(Vector128<T>, Vector128<T>)

Compares two vectors to determine which is greater on a per-element basis.

GreaterThanAll<T>(Vector128<T>, Vector128<T>)

Compares two vectors to determine if all elements are greater.

GreaterThanAny<T>(Vector128<T>, Vector128<T>)

Compares two vectors to determine if any elements are greater.

GreaterThanOrEqual<T>(Vector128<T>, Vector128<T>)

Compares two vectors to determine which is greater or equal on a per-element basis.

GreaterThanOrEqualAll<T>(Vector128<T>, Vector128<T>)

Compares two vectors to determine if all elements are greater or equal.

GreaterThanOrEqualAny<T>(Vector128<T>, Vector128<T>)

Compares two vectors to determine if any elements are greater or equal.

LessThan<T>(Vector128<T>, Vector128<T>)

Compares two vectors to determine which is less on a per-element basis.

LessThanAll<T>(Vector128<T>, Vector128<T>)

Compares two vectors to determine if all elements are less.

LessThanAny<T>(Vector128<T>, Vector128<T>)

Compares two vectors to determine if any elements are less.

LessThanOrEqual<T>(Vector128<T>, Vector128<T>)

Compares two vectors to determine which is less or equal on a per-element basis.

LessThanOrEqualAll<T>(Vector128<T>, Vector128<T>)

Compares two vectors to determine if all elements are less or equal.

LessThanOrEqualAny<T>(Vector128<T>, Vector128<T>)

Compares two vectors to determine if any elements are less or equal.

Load<T>(T*)

Loads a vector from the given source.

LoadAligned<T>(T*)

Loads a vector from the given aligned source.

LoadAlignedNonTemporal<T>(T*)

Loads a vector from the given aligned source.

LoadUnsafe<T>(T)

Loads a vector from the given source.

LoadUnsafe<T>(T, UIntPtr)

Loads a vector from the given source and element offset.

Max<T>(Vector128<T>, Vector128<T>)

Computes the maximum of two vectors on a per-element basis.

Min<T>(Vector128<T>, Vector128<T>)

Computes the minimum of two vectors on a per-element basis.

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

Multiplies a vector by a scalar to compute their product.

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

Multiplies a vector by a scalar to compute their product.

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

Multiplies two vectors to compute their element-wise product.

Narrow(Vector128<Double>, Vector128<Double>)

Narrows two Vector128<T> instances into one Vector128<T>.

Narrow(Vector128<Int16>, Vector128<Int16>)

Narrows two Vector128<T> instances into one Vector128<T>.

Narrow(Vector128<Int32>, Vector128<Int32>)

Narrows two Vector128<T> instances into one Vector128<T>.

Narrow(Vector128<Int64>, Vector128<Int64>)

Narrows two Vector128<T> instances into one Vector128<T>.

Narrow(Vector128<UInt16>, Vector128<UInt16>)

Narrows two Vector128<T> instances into one Vector128<T>.

Narrow(Vector128<UInt32>, Vector128<UInt32>)

Narrows two Vector128<T> instances into one Vector128<T>.

Narrow(Vector128<UInt64>, Vector128<UInt64>)

Narrows two Vector128<T> instances into one Vector128<T>.

Negate<T>(Vector128<T>)

Negates a vector.

OnesComplement<T>(Vector128<T>)

Computes the ones-complement of a vector.

ShiftLeft(Vector128<Byte>, Int32)

Shifts each element of a vector left by the specified amount.

ShiftLeft(Vector128<Int16>, Int32)

Shifts each element of a vector left by the specified amount.

ShiftLeft(Vector128<Int32>, Int32)

Shifts each element of a vector left by the specified amount.

ShiftLeft(Vector128<Int64>, Int32)

Shifts each element of a vector left by the specified amount.

ShiftLeft(Vector128<IntPtr>, Int32)

Shifts each element of a vector left by the specified amount.

ShiftLeft(Vector128<SByte>, Int32)

Shifts each element of a vector left by the specified amount.

ShiftLeft(Vector128<UInt16>, Int32)

Shifts each element of a vector left by the specified amount.

ShiftLeft(Vector128<UInt32>, Int32)

Shifts each element of a vector left by the specified amount.

ShiftLeft(Vector128<UInt64>, Int32)

Shifts each element of a vector left by the specified amount.

ShiftLeft(Vector128<UIntPtr>, Int32)

Shifts each element of a vector left by the specified amount.

ShiftRightArithmetic(Vector128<Int16>, Int32)

Shifts (signed) each element of a vector right by the specified amount.

ShiftRightArithmetic(Vector128<Int32>, Int32)

Shifts (signed) each element of a vector right by the specified amount.

ShiftRightArithmetic(Vector128<Int64>, Int32)

Shifts (signed) each element of a vector right by the specified amount.

ShiftRightArithmetic(Vector128<IntPtr>, Int32)

Shifts (signed) each element of a vector right by the specified amount.

ShiftRightArithmetic(Vector128<SByte>, Int32)

Shifts (signed) each element of a vector right by the specified amount.

ShiftRightLogical(Vector128<Byte>, Int32)

Shifts (unsigned) each element of a vector right by the specified amount.

ShiftRightLogical(Vector128<Int16>, Int32)

Shifts (unsigned) each element of a vector right by the specified amount.

ShiftRightLogical(Vector128<Int32>, Int32)

Shifts (unsigned) each element of a vector right by the specified amount.

ShiftRightLogical(Vector128<Int64>, Int32)

Shifts (unsigned) each element of a vector right by the specified amount.

ShiftRightLogical(Vector128<IntPtr>, Int32)

Shifts (unsigned) each element of a vector right by the specified amount.

ShiftRightLogical(Vector128<SByte>, Int32)

Shifts (unsigned) each element of a vector right by the specified amount.

ShiftRightLogical(Vector128<UInt16>, Int32)

Shifts (unsigned) each element of a vector right by the specified amount.

ShiftRightLogical(Vector128<UInt32>, Int32)

Shifts (unsigned) each element of a vector right by the specified amount.

ShiftRightLogical(Vector128<UInt64>, Int32)

Shifts (unsigned) each element of a vector right by the specified amount.

ShiftRightLogical(Vector128<UIntPtr>, Int32)

Shifts (unsigned) each element of a vector right by the specified amount.

Shuffle(Vector128<Byte>, Vector128<Byte>)

Creates a new vector by selecting values from an input vector using a set of indices.

Shuffle(Vector128<Double>, Vector128<Int64>)

Creates a new vector by selecting values from an input vector using a set of indices.

Shuffle(Vector128<Int16>, Vector128<Int16>)

Creates a new vector by selecting values from an input vector using a set of indices.

Shuffle(Vector128<Int32>, Vector128<Int32>)

Creates a new vector by selecting values from an input vector using a set of indices.

Shuffle(Vector128<Int64>, Vector128<Int64>)

Creates a new vector by selecting values from an input vector using a set of indices.

Shuffle(Vector128<SByte>, Vector128<SByte>)

Creates a new vector by selecting values from an input vector using a set of indices.

Shuffle(Vector128<Single>, Vector128<Int32>)

Creates a new vector by selecting values from an input vector using a set of indices.

Shuffle(Vector128<UInt16>, Vector128<UInt16>)

Creates a new vector by selecting values from an input vector using a set of indices.

Shuffle(Vector128<UInt32>, Vector128<UInt32>)

Creates a new vector by selecting values from an input vector using a set of indices.

Shuffle(Vector128<UInt64>, Vector128<UInt64>)

Creates a new vector by selecting values from an input vector using a set of indices.

Sqrt<T>(Vector128<T>)

Computes the square root of a vector on a per-element basis.

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

Stores a vector at the given destination.

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

Stores a vector at the given aligned destination.

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

Stores a vector at the given aligned destination.

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

Stores a vector at the given destination.

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

Stores a vector at the given destination.

Subtract<T>(Vector128<T>, Vector128<T>)

Subtracts two vectors to compute their difference.

Sum<T>(Vector128<T>)

Computes the sum of all elements in a vector.

ToScalar<T>(Vector128<T>)

Converts the given vector to a scalar containing the value of the first element.

ToVector256<T>(Vector128<T>)

Converts the given vector to a new Vector256<T> with the lower 128-bits set to the value of the given vector and the upper 128-bits initialized to zero.

ToVector256Unsafe<T>(Vector128<T>)

Converts the given vector to a new Vector256<T> with the lower 128-bits set to the value of the given vector and the upper 128-bits left uninitialized.

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

Tries to copy a Vector<T> to a given span.

Widen(Vector128<Byte>)

Widens a Vector128<T> into two Vector128<T>.

Widen(Vector128<Int16>)

Widens a Vector128<T> into two Vector128<T>.

Widen(Vector128<Int32>)

Widens a Vector128<T> into two Vector128<T>.

Widen(Vector128<SByte>)

Widens a Vector128<T> into two Vector128<T>.

Widen(Vector128<Single>)

Widens a Vector128<T> into two Vector128<T>.

Widen(Vector128<UInt16>)

Widens a Vector128<T> into two Vector128<T>.

Widen(Vector128<UInt32>)

Widens a Vector128<T> into two Vector128<T>.

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

Creates a new Vector128<T> with the element at the specified index set to the specified value and the remaining elements set to the same value as that in the given vector.

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

Creates a new Vector128<T> with the lower 64-bits set to the specified value and the upper 64-bits set to the same value as that in the given vector.

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

Creates a new Vector128<T> with the upper 64-bits set to the specified value and the lower 64-bits set to the same value as that in the given vector.

Xor<T>(Vector128<T>, Vector128<T>)

Computes the exclusive-or of two vectors.

Applies to