<PackageReference Include="System.Numerics.Vectors" Version="4.3.0" />

System.Numerics.Vector

public static class Vector
Contains various methods useful for creating, manipulating, combining, and converting generic vectors with one another.
public static bool IsHardwareAccelerated { get; }

Returns whether or not vector operations are subject to hardware acceleration through JIT intrinsic support.

public static Vector<T> Abs<T>(Vector<T> value) where T : struct

Returns a new vector whose elements are the absolute values of the given vector's elements.

public static Vector<T> Add<T>(Vector<T> left, Vector<T> right) where T : struct

Creates a new vector whose values are the sum of each pair of elements from the two given vectors.

public static Vector<T> AndNot<T>(Vector<T> left, Vector<T> right) where T : struct

Returns a new vector by performing a bitwise-and-not operation on each of the elements in the given vectors.

public static Vector<byte> AsVectorByte<T>(Vector<T> value) where T : struct

Reinterprets the bits of the given vector into those of a vector of unsigned bytes.

public static Vector<double> AsVectorDouble<T>(Vector<T> value) where T : struct

Reinterprets the bits of the given vector into those of a vector of 64-bit floating point numbers.

public static Vector<short> AsVectorInt16<T>(Vector<T> value) where T : struct

Reinterprets the bits of the given vector into those of a vector of signed 16-bit integers.

public static Vector<int> AsVectorInt32<T>(Vector<T> value) where T : struct

Reinterprets the bits of the given vector into those of a vector of signed 32-bit integers.

public static Vector<long> AsVectorInt64<T>(Vector<T> value) where T : struct

Reinterprets the bits of the given vector into those of a vector of signed 64-bit integers.

public static Vector<sbyte> AsVectorSByte<T>(Vector<T> value) where T : struct

Reinterprets the bits of the given vector into those of a vector of signed bytes.

public static Vector<float> AsVectorSingle<T>(Vector<T> value) where T : struct

Reinterprets the bits of the given vector into those of a vector of 32-bit floating point numbers.

public static Vector<ushort> AsVectorUInt16<T>(Vector<T> value) where T : struct

Reinterprets the bits of the given vector into those of a vector of 16-bit integers.

public static Vector<uint> AsVectorUInt32<T>(Vector<T> value) where T : struct

Reinterprets the bits of the given vector into those of a vector of unsigned 32-bit integers.

public static Vector<ulong> AsVectorUInt64<T>(Vector<T> value) where T : struct

Reinterprets the bits of the given vector into those of a vector of unsigned 64-bit integers.

public static Vector<T> BitwiseAnd<T>(Vector<T> left, Vector<T> right) where T : struct

Returns a new vector by performing a bitwise-and operation on each of the elements in the given vectors.

public static Vector<T> BitwiseOr<T>(Vector<T> left, Vector<T> right) where T : struct

Returns a new vector by performing a bitwise-or operation on each of the elements in the given vectors.

public static Vector<float> ConditionalSelect(Vector<int> condition, Vector<float> left, Vector<float> right)

Creates a new vector with elements selected between the two given source vectors, and based on a mask vector.

public static Vector<double> ConditionalSelect(Vector<long> condition, Vector<double> left, Vector<double> right)

Creates a new vector with elements selected between the two given source vectors, and based on a mask vector.

public static Vector<T> ConditionalSelect<T>(Vector<T> condition, Vector<T> left, Vector<T> right) where T : struct

Creates a new vector with elements selected between the two given source vectors, and based on a mask vector.

public static Vector<T> Divide<T>(Vector<T> left, Vector<T> right) where T : struct

Returns a new vector whose values are the result of dividing the first vector's elements by the corresponding elements in the second vector.

public static T Dot<T>(Vector<T> left, Vector<T> right) where T : struct

Returns the dot product of two vectors.

public static Vector<T> Equals<T>(Vector<T> left, Vector<T> right) where T : struct

Returns a new vector whose elements signal whether the elements in left and right were equal.

public static Vector<int> Equals(Vector<float> left, Vector<float> right)

Returns an integral vector whose elements signal whether elements in the left and right floating point vectors were equal.

public static Vector<int> Equals(Vector<int> left, Vector<int> right)

Returns a new vector whose elements signal whether the elements in left and right were equal.

public static Vector<long> Equals(Vector<double> left, Vector<double> right)

Returns an integral vector whose elements signal whether elements in the left and right floating point vectors were equal.

public static Vector<long> Equals(Vector<long> left, Vector<long> right)

Returns a new vector whose elements signal whether the elements in left and right were equal.

public static bool EqualsAll<T>(Vector<T> left, Vector<T> right) where T : struct

Returns a boolean indicating whether each pair of elements in the given vectors are equal.

public static bool EqualsAny<T>(Vector<T> left, Vector<T> right) where T : struct

Returns a boolean indicating whether any single pair of elements in the given vectors are equal.

public static Vector<T> GreaterThan<T>(Vector<T> left, Vector<T> right) where T : struct

Returns a new vector whose elements signal whether the elements in left were greater than their corresponding elements in right.

public static Vector<int> GreaterThan(Vector<float> left, Vector<float> right)

Returns an integral vector whose elements signal whether the elements in left were greater than their corresponding elements in right.

public static Vector<int> GreaterThan(Vector<int> left, Vector<int> right)

Returns a new vector whose elements signal whether the elements in left were greater than their corresponding elements in right.

public static Vector<long> GreaterThan(Vector<double> left, Vector<double> right)

Returns an integral vector whose elements signal whether the elements in left were greater than their corresponding elements in right.

public static Vector<long> GreaterThan(Vector<long> left, Vector<long> right)

Returns a new vector whose elements signal whether the elements in left were greater than their corresponding elements in right.

public static bool GreaterThanAll<T>(Vector<T> left, Vector<T> right) where T : struct

Returns a boolean indicating whether all elements in left are greater than the corresponding elements in right. elements in right.

public static bool GreaterThanAny<T>(Vector<T> left, Vector<T> right) where T : struct

Returns a boolean indicating whether any element in left is greater than its corresponding element in right.

public static Vector<T> GreaterThanOrEqual<T>(Vector<T> left, Vector<T> right) where T : struct

Returns a new vector whose elements signal whether the elements in left were greater than or equal to their corresponding elements in right.

public static Vector<int> GreaterThanOrEqual(Vector<float> left, Vector<float> right)

Returns an integral vector whose elements signal whether the elements in left were greater than or equal to their corresponding elements in right.

public static Vector<int> GreaterThanOrEqual(Vector<int> left, Vector<int> right)

Returns a new vector whose elements signal whether the elements in left were greater than or equal to their corresponding elements in right.

public static Vector<long> GreaterThanOrEqual(Vector<long> left, Vector<long> right)

Returns a new vector whose elements signal whether the elements in left were greater than or equal to their corresponding elements in right.

public static Vector<long> GreaterThanOrEqual(Vector<double> left, Vector<double> right)

Returns an integral vector whose elements signal whether the elements in left were greater than or equal to their corresponding elements in right.

public static bool GreaterThanOrEqualAll<T>(Vector<T> left, Vector<T> right) where T : struct

Returns a boolean indicating whether all of the elements in left are greater than or equal to their corresponding elements in right.

public static bool GreaterThanOrEqualAny<T>(Vector<T> left, Vector<T> right) where T : struct

Returns a boolean indicating whether any element in left is greater than or equal to its corresponding element in right.

public static Vector<T> LessThan<T>(Vector<T> left, Vector<T> right) where T : struct

Returns a new vector whose elements signal whether the elements in left were less than their corresponding elements in right.

public static Vector<int> LessThan(Vector<float> left, Vector<float> right)

Returns an integral vector whose elements signal whether the elements in left were less than their corresponding elements in right.

public static Vector<int> LessThan(Vector<int> left, Vector<int> right)

Returns a new vector whose elements signal whether the elements in left were less than their corresponding elements in right.

public static Vector<long> LessThan(Vector<double> left, Vector<double> right)

Returns an integral vector whose elements signal whether the elements in left were less than their corresponding elements in right.

public static Vector<long> LessThan(Vector<long> left, Vector<long> right)

Returns a new vector whose elements signal whether the elements in left were less than their corresponding elements in right.

public static bool LessThanAll<T>(Vector<T> left, Vector<T> right) where T : struct

Returns a boolean indicating whether all of the elements in left are less than their corresponding elements in right.

public static bool LessThanAny<T>(Vector<T> left, Vector<T> right) where T : struct

Returns a boolean indicating whether any element in left is less than its corresponding element in right.

public static Vector<T> LessThanOrEqual<T>(Vector<T> left, Vector<T> right) where T : struct

Returns a new vector whose elements signal whether the elements in left were less than or equal to their corresponding elements in right.

public static Vector<int> LessThanOrEqual(Vector<float> left, Vector<float> right)

Returns an integral vector whose elements signal whether the elements in left were less than or equal to their corresponding elements in right.

public static Vector<int> LessThanOrEqual(Vector<int> left, Vector<int> right)

Returns a new vector whose elements signal whether the elements in left were less than or equal to their corresponding elements in right.

public static Vector<long> LessThanOrEqual(Vector<long> left, Vector<long> right)

Returns a new vector whose elements signal whether the elements in left were less than or equal to their corresponding elements in right.

public static Vector<long> LessThanOrEqual(Vector<double> left, Vector<double> right)

Returns an integral vector whose elements signal whether the elements in left were less than or equal to their corresponding elements in right.

public static bool LessThanOrEqualAll<T>(Vector<T> left, Vector<T> right) where T : struct

Returns a boolean indicating whether all elements in left are less than or equal to their corresponding elements in right.

public static bool LessThanOrEqualAny<T>(Vector<T> left, Vector<T> right) where T : struct

Returns a boolean indicating whether any element in left is less than or equal to its corresponding element in right.

public static Vector<T> Max<T>(Vector<T> left, Vector<T> right) where T : struct

Returns a new vector whose elements are the maximum of each pair of elements in the two given vectors.

public static Vector<T> Min<T>(Vector<T> left, Vector<T> right) where T : struct

Returns a new vector whose elements are the minimum of each pair of elements in the two given vectors.

public static Vector<T> Multiply<T>(Vector<T> left, Vector<T> right) where T : struct

Creates a new vector whose values are the product of each pair of elements from the two given vectors.

public static Vector<T> Multiply<T>(Vector<T> left, T right) where T : struct

Returns a new vector whose values are the values of the given vector each multiplied by a scalar value.

public static Vector<T> Multiply<T>(T left, Vector<T> right) where T : struct

Returns a new vector whose values are the values of the given vector each multiplied by a scalar value.

public static Vector<T> Negate<T>(Vector<T> value) where T : struct

Returns a new vector whose elements are the given vector's elements negated.

public static Vector<T> OnesComplement<T>(Vector<T> value) where T : struct

Returns a new vector whose elements are obtained by taking the one's complement of the given vector's elements.

public static Vector<T> SquareRoot<T>(Vector<T> value) where T : struct

Returns a new vector whose elements are the square roots of the given vector's elements.

public static Vector<T> Subtract<T>(Vector<T> left, Vector<T> right) where T : struct

Creates a new vector whose values are the difference between each pairs of elements in the given vectors.

public static Vector<T> Xor<T>(Vector<T> left, Vector<T> right) where T : struct

Returns a new vector by performing a bitwise-exclusive-or operation on each of the elements in the given vectors.