Method CreateRotate
- Namespace
- Zyl.VectorTraits
- Assembly
- VectorTraits.dll
CreateRotate<T>(T[], int, int)
Rotate creates a new Vector256<T> from a given span starting at a specified index position (于指定索引位置开始,从指定跨度旋转创建一个 Vector256<T>).
public static Vector256<T> CreateRotate<T>(T[] values, int index, int length) where T : struct
Parameters
valuesT[]The array from which the vector is created (用于创建向量的数组).
indexintStarting index position of valid data in
values(values中有效数据的起始索引位置).lengthintLength of valid data in
values(values中有效数据的长度).
Returns
- Vector256<T>
A new Vector256<T> with its elements set to the first Count elements from
values(一个新Vector256<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).
CreateRotate<T>(ReadOnlySpan<T>, int, int)
Rotate creates a new Vector256<T> from a given span starting at a specified index position (于指定索引位置开始,从指定跨度旋转创建一个 Vector256<T>).
public static Vector256<T> CreateRotate<T>(ReadOnlySpan<T> values, int index, int length) where T : struct
Parameters
valuesReadOnlySpan<T>The span from which the vector is created (用于创建向量的跨度).
indexintStarting index position of valid data in
values(values中有效数据的起始索引位置).lengthintLength of valid data in
values(values中有效数据的长度).
Returns
- Vector256<T>
A new Vector256<T> with its elements set to the first Count elements from
values(一个新Vector256<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).
CreateRotate<T>(ReadOnlySpan<T>)
Rotate creates a new Vector256<T> from a given span (从指定跨度旋转创建一个 Vector256<T>).
public static Vector256<T> CreateRotate<T>(ReadOnlySpan<T> values) where T : struct
Parameters
valuesReadOnlySpan<T>The span from which the vector is created (用于创建向量的跨度).
Returns
- Vector256<T>
A new Vector256<T> with its elements set to the first Count elements from
values(一个新Vector256<T>,其元素设置为来自values首批满足长度的元素).
Type Parameters
TThe vector element type (向量中的元素的类型).
CreateRotate<T>(params T[])
Rotate creates a new Vector256<T> from a given array (从给定数组旋转创建一个新的 Vector256<T> ).
public static Vector256<T> CreateRotate<T>(params T[] values) where T : struct
Parameters
valuesT[]The array from which the vector is created (用于创建向量的数组).
Returns
- Vector256<T>
A new Vector256<T> with its elements set to the first Count elements from
values(一个新Vector256<T>,其元素设置为来自values首批满足长度的元素).
Type Parameters
TThe vector element type (向量中的元素的类型).