Method Widen
- Namespace
- Zyl.VectorTraits
- Assembly
- VectorTraits.dll
Widen<T, TOut>(Vector<T>, out Vector<TOut>, out Vector<TOut>)
Widens a Vector<T> into two Vector<T> instances - Generic version (将一个 Vector<T> 扩宽为两个 Vector<T> 实例 - 泛型版).
Mnemonic: element_ref(i, lower, upper) := widen(source[i])
.
[Obsolete("It is only suitable for unit testing because it contains branching statements and has poor performance. In general, it is recommended to use the non-generic version of the methods (因它含有分支语句, 性能较差, 仅适用于单元测试. 一般情况下, 建议使用非泛型版方法).")]
public static void Widen<T, TOut>(Vector<T> source, out Vector<TOut> lower, out Vector<TOut> upper) where T : struct where TOut : struct
Parameters
source
Vector<T>The vector whose elements are to be widened (要扩宽其元素的向量).
lower
Vector<TOut>When this method returns, contains the widened elements from lower indices in the source vector (当此方法返回时,包含源向量中来自较低下标的扩宽元素).
upper
Vector<TOut>When this method returns, contains the widened elements from upper indices in the source vector (当此方法返回时,包含源向量中来自较高下标的扩宽元素).
Type Parameters
T
The element type of the input parameter (输入参数的元素类型).
TOut
The element type of the output parameter (输出参数的元素类型).
Exceptions
- NotSupportedException
These element types(
T
,TOut
) are not supported.
- See Also
Widen(Vector<float>)
Widens a Vector<T> into two Vector<T> instances - Generic version (将一个 Vector<T> 扩宽为两个 Vector<T> 实例 - 泛型版).
Mnemonic: element_ref(i, lower, upper) := widen(source[i])
.
public static (Vector<double> Lower, Vector<double> Upper) Widen(Vector<float> source)
Parameters
Returns
- (Vector<double> Lower, Vector<double> Upper)
A pair of vectors that contain the widened lower and upper halves of
source
(包含source
的下半部和上半部的一对扩宽向量).
- See Also
Widen(Vector<sbyte>)
Widens a Vector<T> into two Vector<T> instances - Generic version (将一个 Vector<T> 扩宽为两个 Vector<T> 实例 - 泛型版).
Mnemonic: element_ref(i, lower, upper) := widen(source[i])
.
[CLSCompliant(false)]
public static (Vector<short> Lower, Vector<short> Upper) Widen(Vector<sbyte> source)
Parameters
Returns
- (Vector<short> Lower, Vector<short> Upper)
A pair of vectors that contain the widened lower and upper halves of
source
(包含source
的下半部和上半部的一对扩宽向量).
- See Also
Widen(Vector<byte>)
Widens a Vector<T> into two Vector<T> instances - Generic version (将一个 Vector<T> 扩宽为两个 Vector<T> 实例 - 泛型版).
Mnemonic: element_ref(i, lower, upper) := widen(source[i])
.
[CLSCompliant(false)]
public static (Vector<ushort> Lower, Vector<ushort> Upper) Widen(Vector<byte> source)
Parameters
Returns
- (Vector<ushort> Lower, Vector<ushort> Upper)
A pair of vectors that contain the widened lower and upper halves of
source
(包含source
的下半部和上半部的一对扩宽向量).
- See Also
Widen(Vector<short>)
Widens a Vector<T> into two Vector<T> instances - Generic version (将一个 Vector<T> 扩宽为两个 Vector<T> 实例 - 泛型版).
Mnemonic: element_ref(i, lower, upper) := widen(source[i])
.
public static (Vector<int> Lower, Vector<int> Upper) Widen(Vector<short> source)
Parameters
Returns
- (Vector<int> Lower, Vector<int> Upper)
A pair of vectors that contain the widened lower and upper halves of
source
(包含source
的下半部和上半部的一对扩宽向量).
- See Also
Widen(Vector<ushort>)
Widens a Vector<T> into two Vector<T> instances - Generic version (将一个 Vector<T> 扩宽为两个 Vector<T> 实例 - 泛型版).
Mnemonic: element_ref(i, lower, upper) := widen(source[i])
.
[CLSCompliant(false)]
public static (Vector<uint> Lower, Vector<uint> Upper) Widen(Vector<ushort> source)
Parameters
Returns
- (Vector<uint> Lower, Vector<uint> Upper)
A pair of vectors that contain the widened lower and upper halves of
source
(包含source
的下半部和上半部的一对扩宽向量).
- See Also
Widen(Vector<int>)
Widens a Vector<T> into two Vector<T> instances - Generic version (将一个 Vector<T> 扩宽为两个 Vector<T> 实例 - 泛型版).
Mnemonic: element_ref(i, lower, upper) := widen(source[i])
.
public static (Vector<long> Lower, Vector<long> Upper) Widen(Vector<int> source)
Parameters
Returns
- (Vector<long> Lower, Vector<long> Upper)
A pair of vectors that contain the widened lower and upper halves of
source
(包含source
的下半部和上半部的一对扩宽向量).
- See Also
Widen(Vector<uint>)
Widens a Vector<T> into two Vector<T> instances - Generic version (将一个 Vector<T> 扩宽为两个 Vector<T> 实例 - 泛型版).
Mnemonic: element_ref(i, lower, upper) := widen(source[i])
.
[CLSCompliant(false)]
public static (Vector<ulong> Lower, Vector<ulong> Upper) Widen(Vector<uint> source)
Parameters
Returns
- (Vector<ulong> Lower, Vector<ulong> Upper)
A pair of vectors that contain the widened lower and upper halves of
source
(包含source
的下半部和上半部的一对扩宽向量).
- See Also
Widen(Vector<float>, out Vector<double>, out Vector<double>)
Widens a Vector<T> into two Vector<T> instances (将一个 Vector<T> 扩宽为两个 Vector<T> 实例).
Mnemonic: element_ref(i, lower, upper) := widen(source[i])
.
public static void Widen(Vector<float> source, out Vector<double> lower, out Vector<double> upper)
Parameters
source
Vector<float>The vector whose elements are to be widened (要扩宽其元素的向量).
lower
Vector<double>When this method returns, contains the widened elements from lower indices in the source vector (当此方法返回时,包含源向量中来自较低下标的扩宽元素).
upper
Vector<double>When this method returns, contains the widened elements from upper indices in the source vector (当此方法返回时,包含源向量中来自较高下标的扩宽元素).
- See Also
Widen(Vector<sbyte>, out Vector<short>, out Vector<short>)
Widens a Vector<T> into two Vector<T> instances (将一个 Vector<T> 扩宽为两个 Vector<T> 实例).
Mnemonic: element_ref(i, lower, upper) := widen(source[i])
.
[CLSCompliant(false)]
public static void Widen(Vector<sbyte> source, out Vector<short> lower, out Vector<short> upper)
Parameters
source
Vector<sbyte>The vector whose elements are to be widened (要扩宽其元素的向量).
lower
Vector<short>When this method returns, contains the widened elements from lower indices in the source vector (当此方法返回时,包含源向量中来自较低下标的扩宽元素).
upper
Vector<short>When this method returns, contains the widened elements from upper indices in the source vector (当此方法返回时,包含源向量中来自较高下标的扩宽元素).
- See Also
Widen(Vector<byte>, out Vector<ushort>, out Vector<ushort>)
Widens a Vector<T> into two Vector<T> instances (将一个 Vector<T> 扩宽为两个 Vector<T> 实例).
Mnemonic: element_ref(i, lower, upper) := widen(source[i])
.
[CLSCompliant(false)]
public static void Widen(Vector<byte> source, out Vector<ushort> lower, out Vector<ushort> upper)
Parameters
source
Vector<byte>The vector whose elements are to be widened (要扩宽其元素的向量).
lower
Vector<ushort>When this method returns, contains the widened elements from lower indices in the source vector (当此方法返回时,包含源向量中来自较低下标的扩宽元素).
upper
Vector<ushort>When this method returns, contains the widened elements from upper indices in the source vector (当此方法返回时,包含源向量中来自较高下标的扩宽元素).
- See Also
Widen(Vector<short>, out Vector<int>, out Vector<int>)
Widens a Vector<T> into two Vector<T> instances (将一个 Vector<T> 扩宽为两个 Vector<T> 实例).
Mnemonic: element_ref(i, lower, upper) := widen(source[i])
.
public static void Widen(Vector<short> source, out Vector<int> lower, out Vector<int> upper)
Parameters
source
Vector<short>The vector whose elements are to be widened (要扩宽其元素的向量).
lower
Vector<int>When this method returns, contains the widened elements from lower indices in the source vector (当此方法返回时,包含源向量中来自较低下标的扩宽元素).
upper
Vector<int>When this method returns, contains the widened elements from upper indices in the source vector (当此方法返回时,包含源向量中来自较高下标的扩宽元素).
- See Also
Widen(Vector<ushort>, out Vector<uint>, out Vector<uint>)
Widens a Vector<T> into two Vector<T> instances (将一个 Vector<T> 扩宽为两个 Vector<T> 实例).
Mnemonic: element_ref(i, lower, upper) := widen(source[i])
.
[CLSCompliant(false)]
public static void Widen(Vector<ushort> source, out Vector<uint> lower, out Vector<uint> upper)
Parameters
source
Vector<ushort>The vector whose elements are to be widened (要扩宽其元素的向量).
lower
Vector<uint>When this method returns, contains the widened elements from lower indices in the source vector (当此方法返回时,包含源向量中来自较低下标的扩宽元素).
upper
Vector<uint>When this method returns, contains the widened elements from upper indices in the source vector (当此方法返回时,包含源向量中来自较高下标的扩宽元素).
- See Also
Widen(Vector<int>, out Vector<long>, out Vector<long>)
Widens a Vector<T> into two Vector<T> instances (将一个 Vector<T> 扩宽为两个 Vector<T> 实例).
Mnemonic: element_ref(i, lower, upper) := widen(source[i])
.
public static void Widen(Vector<int> source, out Vector<long> lower, out Vector<long> upper)
Parameters
source
Vector<int>The vector whose elements are to be widened (要扩宽其元素的向量).
lower
Vector<long>When this method returns, contains the widened elements from lower indices in the source vector (当此方法返回时,包含源向量中来自较低下标的扩宽元素).
upper
Vector<long>When this method returns, contains the widened elements from upper indices in the source vector (当此方法返回时,包含源向量中来自较高下标的扩宽元素).
- See Also
Widen(Vector<uint>, out Vector<ulong>, out Vector<ulong>)
Widens a Vector<T> into two Vector<T> instances (将一个 Vector<T> 扩宽为两个 Vector<T> 实例).
Mnemonic: element_ref(i, lower, upper) := widen(source[i])
.
[CLSCompliant(false)]
public static void Widen(Vector<uint> source, out Vector<ulong> lower, out Vector<ulong> upper)
Parameters
source
Vector<uint>The vector whose elements are to be widened (要扩宽其元素的向量).
lower
Vector<ulong>When this method returns, contains the widened elements from lower indices in the source vector (当此方法返回时,包含源向量中来自较低下标的扩宽元素).
upper
Vector<ulong>When this method returns, contains the widened elements from upper indices in the source vector (当此方法返回时,包含源向量中来自较高下标的扩宽元素).
- See Also