Table of Contents

Method Widen

Namespace
Zyl.VectorTraits.Impl
Assembly
VectorTraits.dll

Widen(Vector<float>)

Widens a Vector<T> into two Vector<T> instances (将一个 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

source Vector<float>

The vector whose elements are to be widened (要扩宽其元素的向量).

Returns

(Vector<double> Lower, Vector<double> Upper)
See Also

Widen(Vector<sbyte>)

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 (Vector<short> Lower, Vector<short> Upper) Widen(Vector<sbyte> source)

Parameters

source Vector<sbyte>

The vector whose elements are to be widened (要扩宽其元素的向量).

Returns

(Vector<short> Lower, Vector<short> Upper)
See Also

Widen(Vector<byte>)

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 (Vector<ushort> Lower, Vector<ushort> Upper) Widen(Vector<byte> source)

Parameters

source Vector<byte>

The vector whose elements are to be widened (要扩宽其元素的向量).

Returns

(Vector<ushort> Lower, Vector<ushort> Upper)
See Also

Widen(Vector<short>)

Widens a Vector<T> into two Vector<T> instances (将一个 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

source Vector<short>

The vector whose elements are to be widened (要扩宽其元素的向量).

Returns

(Vector<int> Lower, Vector<int> Upper)
See Also

Widen(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 (Vector<uint> Lower, Vector<uint> Upper) Widen(Vector<ushort> source)

Parameters

source Vector<ushort>

The vector whose elements are to be widened (要扩宽其元素的向量).

Returns

(Vector<uint> Lower, Vector<uint> Upper)
See Also

Widen(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 (Vector<long> Lower, Vector<long> Upper) Widen(Vector<int> source)

Parameters

source Vector<int>

The vector whose elements are to be widened (要扩宽其元素的向量).

Returns

(Vector<long> Lower, Vector<long> Upper)
See Also

Widen(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 (Vector<ulong> Lower, Vector<ulong> Upper) Widen(Vector<uint> source)

Parameters

source Vector<uint>

The vector whose elements are to be widened (要扩宽其元素的向量).

Returns

(Vector<ulong> Lower, Vector<ulong> Upper)
See Also

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