Method Create
- Namespace
- Zyl.VectorTraits
- Assembly
- VectorTraits.dll
Create<T>(Vector256<T>, Vector256<T>)
Create a new vector instance from two shorter vector instances. (从两个更短的向量实例, 来创建新的向量实例).
public static Vector512<T> Create<T>(Vector256<T> lower, Vector256<T> upper) where T : struct
Parameters
lowerVector256<T>The value that the lower 128-bits will be initialized to (较低 128 位的初始化值).
upperVector256<T>The value that the upper 128-bits will be initialized to (较高 128 位的初始化值).
Returns
- Vector512<T>
A new Vector512<T> initialized from
lowerandupper(从lower和upper初始化的新 Vector512<T>).
Type Parameters
TThe type of the input vector element (输入向量元素的类型).
Create<T>(T)
Creates a new Vector512<T> instance with all elements initialized to the specified value (创建新的 Vector512<T> 实例,其中所有元素已初始化为指定值).
public static Vector512<T> Create<T>(T value) where T : struct
Parameters
valueTThe value that all elements will be initialized to (所有元素的初始化目标值).
Returns
- Vector512<T>
A new Vector512<T> with all elements initialized to value (一个新的 Vector512<T>,其中所有元素已初始化为
value).
Type Parameters
TThe vector element type (向量中的元素的类型).
- See Also
-
Create<T>(T)
Create<T>(T[])
Creates a new Vector512<T> from a given array (从给定数组创建一个新的 Vector512<T> ).
public static Vector512<T> Create<T>(T[] values) where T : struct
Parameters
valuesT[]The array from which the vector is created (用于创建向量的数组).
Returns
- Vector512<T>
A new Vector512<T> with its elements set to the first Count elements from
values(一个新Vector512<T>,其元素设置为来自values首批满足长度的元素).
Type Parameters
TThe vector element type (向量中的元素的类型).
- See Also
-
Create<T>(T[])
Create<T>(T[], int)
Creates a new Vector512<T> from a given array starting at a specified index position (于指定索引位置开始,从指定数组创建一个 Vector512<T>).
public static Vector512<T> Create<T>(T[] values, int index) where T : struct
Parameters
valuesT[]The array from which the vector is created (用于创建向量的数组).
indexintThe starting index position from which to create the vector (欲创建向量的起始索引位置).
Returns
- Vector512<T>
A new Vector512<T> with its elements set to the first Count elements from
values(一个新Vector512<T>,其元素设置为来自values首批满足长度的元素).
Type Parameters
TThe vector element type (向量中的元素的类型).
Exceptions
- IndexOutOfRangeException
The
indexis less than zero (index小于零). The length ofvalues, starting fromindex, is less than Count (从index开始的values的长度小于 Count).
- See Also
Create<T>(ReadOnlySpan<byte>)
Creates a new Vector512<T> from a given read-only span of bytes (根据给定的只读字节跨度构造一个 Vector512<T>).
public static Vector512<T> Create<T>(ReadOnlySpan<byte> values) where T : struct
Parameters
valuesReadOnlySpan<byte>A read-only span of bytes that contains the values to add to the vector (从中创建向量的只读字节跨度).
Returns
- Vector512<T>
A new Vector512<T> with its elements set to the first Count elements from
values(一个新Vector512<T>,其元素设置为来自values首批满足长度的元素).
Type Parameters
TThe vector element type (向量中的元素的类型).
Exceptions
- IndexOutOfRangeException
valuesdid not contain at least Count elements (values的长度小于 Count).
- See Also
-
Create<T>(ReadOnlySpan<T>)
Create<T>(ReadOnlySpan<T>)
Creates a new Vector512<T> from a from the given ReadOnlySpan<T> (根据给定的 ReadOnlySpan<T> 构造一个 Vector512<T>).
public static Vector512<T> Create<T>(ReadOnlySpan<T> values) where T : struct
Parameters
valuesReadOnlySpan<T>The readonly span from which the vector is created (从中创建向量的只读跨度).
Returns
- Vector512<T>
A new Vector512<T> with its elements set to the first Count elements from
values(一个新Vector512<T>,其元素设置为来自values首批满足长度的元素).
Type Parameters
TThe vector element type (向量中的元素的类型).
Exceptions
- IndexOutOfRangeException
valuesdid not contain at least Count elements (values的长度小于 Count).
- See Also
-
Create<T>(ReadOnlySpan<T>)
Create<T>(Span<T>)
Creates a new Vector512<T> from a from the given Span<T> (根据给定的 Span<T> 构造一个 Vector512<T>).
public static Vector512<T> Create<T>(Span<T> values) where T : struct
Parameters
valuesSpan<T>The span from which the vector is created (从中创建向量的跨度).
Returns
- Vector512<T>
A new Vector512<T> with its elements set to the first Count elements from
values(一个新Vector512<T>,其元素设置为来自values首批满足长度的元素).
Type Parameters
TThe vector element type (向量中的元素的类型).
Exceptions
- IndexOutOfRangeException
valuesdid not contain at least Count elements (values的长度小于 Count).
- See Also
-
Create<T>(ReadOnlySpan<T>)
Create(ExInt128)
Creates a new vector instance of element type ExInt128 with all elements initialized to the specified value (创建新的元素类型为ExInt128的向量实例,其中所有元素已初始化为指定值).
public static Vector512<ExInt128> Create(ExInt128 value)
Parameters
valueExInt128The value that all elements will be initialized to (所有元素的初始化值).
Returns
- Vector512<ExInt128>
A new Vector512<T> with all elements initialized to
value(一个新向量,它的所有元素都初始化为value).
Create(ExUInt128)
Creates a new vector instance of element type ExUInt128 with all elements initialized to the specified value (创建新的元素类型为ExUInt128的向量实例,其中所有元素已初始化为指定值).
[CLSCompliant(false)]
public static Vector512<ExUInt128> Create(ExUInt128 value)
Parameters
valueExUInt128The value that all elements will be initialized to (所有元素的初始化值).
Returns
- Vector512<ExUInt128>
A new Vector512<T> with all elements initialized to
value(一个新向量,它的所有元素都初始化为value).
Create(ExInt128, ExInt128, ExInt128, ExInt128)
Creates a new vector instance of element type ExInt128 with each element initialized to the corresponding specified value {创建新的元素类型为ExInt128的向量实例,其中每个元素都已初始化为相应的指定值}.
public static Vector512<ExInt128> Create(ExInt128 e0, ExInt128 e1, ExInt128 e2, ExInt128 e3)
Parameters
e0ExInt128The value that element 0 will be initialized to (元素 0 的初始化值).
e1ExInt128The value that element 1 will be initialized to (元素 1 的初始化值).
e2ExInt128The value that element 2 will be initialized to (元素 2 的初始化值).
e3ExInt128The value that element 3 will be initialized to (元素 3 的初始化值).
Returns
- Vector512<ExInt128>
A new Vector512<T> with each element initialized to corresponding specified value (一个新向量,其中每个元素都初始化为相应的指定值).
Create(ExUInt128, ExUInt128, ExUInt128, ExUInt128)
Creates a new vector instance of element type ExUInt128 with each element initialized to the corresponding specified value {创建新的元素类型为ExUInt128的向量实例,其中每个元素都已初始化为相应的指定值}.
[CLSCompliant(false)]
public static Vector512<ExUInt128> Create(ExUInt128 e0, ExUInt128 e1, ExUInt128 e2, ExUInt128 e3)
Parameters
e0ExUInt128The value that element 0 will be initialized to (元素 0 的初始化值).
e1ExUInt128The value that element 1 will be initialized to (元素 1 的初始化值).
e2ExUInt128The value that element 2 will be initialized to (元素 2 的初始化值).
e3ExUInt128The value that element 3 will be initialized to (元素 3 的初始化值).
Returns
- Vector512<ExUInt128>
A new Vector512<T> with each element initialized to corresponding specified value (一个新向量,其中每个元素都初始化为相应的指定值).
Create(Int128)
Creates a new vector instance of element type Int128 with all elements initialized to the specified value (创建新的元素类型为Int128的向量实例,其中所有元素已初始化为指定值).
public static Vector512<Int128> Create(Int128 value)
Parameters
valueInt128The value that all elements will be initialized to (所有元素的初始化值).
Returns
- Vector512<Int128>
A new Vector512<T> with all elements initialized to
value(一个新向量,它的所有元素都初始化为value).
Create(UInt128)
Creates a new vector instance of element type UInt128 with all elements initialized to the specified value (创建新的元素类型为UInt128的向量实例,其中所有元素已初始化为指定值).
[CLSCompliant(false)]
public static Vector512<UInt128> Create(UInt128 value)
Parameters
valueUInt128The value that all elements will be initialized to (所有元素的初始化值).
Returns
- Vector512<UInt128>
A new Vector512<T> with all elements initialized to
value(一个新向量,它的所有元素都初始化为value).
Create(Int128, Int128, Int128, Int128)
Creates a new vector instance of element type Int128 with each element initialized to the corresponding specified value {创建新的元素类型为Int128的向量实例,其中每个元素都已初始化为相应的指定值}.
public static Vector512<Int128> Create(Int128 e0, Int128 e1, Int128 e2, Int128 e3)
Parameters
e0Int128The value that element 0 will be initialized to (元素 0 的初始化值).
e1Int128The value that element 1 will be initialized to (元素 1 的初始化值).
e2Int128The value that element 2 will be initialized to (元素 2 的初始化值).
e3Int128The value that element 3 will be initialized to (元素 3 的初始化值).
Returns
- Vector512<Int128>
A new Vector512<T> with each element initialized to corresponding specified value (一个新向量,其中每个元素都初始化为相应的指定值).
Create(UInt128, UInt128, UInt128, UInt128)
Creates a new vector instance of element type UInt128 with each element initialized to the corresponding specified value {创建新的元素类型为UInt128的向量实例,其中每个元素都已初始化为相应的指定值}.
[CLSCompliant(false)]
public static Vector512<UInt128> Create(UInt128 e0, UInt128 e1, UInt128 e2, UInt128 e3)
Parameters
e0UInt128The value that element 0 will be initialized to (元素 0 的初始化值).
e1UInt128The value that element 1 will be initialized to (元素 1 的初始化值).
e2UInt128The value that element 2 will be initialized to (元素 2 的初始化值).
e3UInt128The value that element 3 will be initialized to (元素 3 的初始化值).
Returns
- Vector512<UInt128>
A new Vector512<T> with each element initialized to corresponding specified value (一个新向量,其中每个元素都初始化为相应的指定值).