Table of Contents

Method Widen

Namespace
Zyl.VectorTraits.Impl
Assembly
VectorTraits.dll

Widen<T, TOut>(IWVectorTraits128, Vector128<T>, out Vector128<TOut>, out Vector128<TOut>)

Widens a Vector128<T> into two Vector128<T> instances - Generic version (将一个 Vector128<T> 扩宽为两个 Vector128<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 (因它含有分支语句, 性能较差, 仅适用于单元测试. 一般情况下, 建议使用非泛型版方法).")]
[CLSCompliant(false)]
public static void Widen<T, TOut>(this IWVectorTraits128 athis, Vector128<T> source, out Vector128<TOut> lower, out Vector128<TOut> upper) where T : struct where TOut : struct

Parameters

athis IWVectorTraits128
source Vector128<T>

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

lower Vector128<TOut>

When this method returns, contains the widened elements from lower indices in the source vector (当此方法返回时,包含源向量中来自较低下标的扩宽元素).

upper Vector128<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(IWVectorTraits128, Vector128<float>)

Widens a Vector128<T> into two Vector128<T> instances - Generic version (将一个 Vector128<T> 扩宽为两个 Vector128<T> 实例 - 泛型版). Mnemonic: element_ref(i, lower, upper) := widen(source[i]).

[CLSCompliant(false)]
public static (Vector128<double> Lower, Vector128<double> Upper) Widen(this IWVectorTraits128 athis, Vector128<float> source)

Parameters

athis IWVectorTraits128
source Vector128<float>

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

Returns

(Vector128<double> Lower, Vector128<double> Upper)

A pair of vectors that contain the widened lower and upper halves of source (包含 source 的下半部和上半部的一对扩宽向量).

See Also

Widen(IWVectorTraits128, Vector128<sbyte>)

Widens a Vector128<T> into two Vector128<T> instances - Generic version (将一个 Vector128<T> 扩宽为两个 Vector128<T> 实例 - 泛型版). Mnemonic: element_ref(i, lower, upper) := widen(source[i]).

[CLSCompliant(false)]
public static (Vector128<short> Lower, Vector128<short> Upper) Widen(this IWVectorTraits128 athis, Vector128<sbyte> source)

Parameters

athis IWVectorTraits128
source Vector128<sbyte>

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

Returns

(Vector128<short> Lower, Vector128<short> Upper)

A pair of vectors that contain the widened lower and upper halves of source (包含 source 的下半部和上半部的一对扩宽向量).

See Also

Widen(IWVectorTraits128, Vector128<byte>)

Widens a Vector128<T> into two Vector128<T> instances - Generic version (将一个 Vector128<T> 扩宽为两个 Vector128<T> 实例 - 泛型版). Mnemonic: element_ref(i, lower, upper) := widen(source[i]).

[CLSCompliant(false)]
public static (Vector128<ushort> Lower, Vector128<ushort> Upper) Widen(this IWVectorTraits128 athis, Vector128<byte> source)

Parameters

athis IWVectorTraits128
source Vector128<byte>

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

Returns

(Vector128<ushort> Lower, Vector128<ushort> Upper)

A pair of vectors that contain the widened lower and upper halves of source (包含 source 的下半部和上半部的一对扩宽向量).

See Also

Widen(IWVectorTraits128, Vector128<short>)

Widens a Vector128<T> into two Vector128<T> instances - Generic version (将一个 Vector128<T> 扩宽为两个 Vector128<T> 实例 - 泛型版). Mnemonic: element_ref(i, lower, upper) := widen(source[i]).

[CLSCompliant(false)]
public static (Vector128<int> Lower, Vector128<int> Upper) Widen(this IWVectorTraits128 athis, Vector128<short> source)

Parameters

athis IWVectorTraits128
source Vector128<short>

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

Returns

(Vector128<int> Lower, Vector128<int> Upper)

A pair of vectors that contain the widened lower and upper halves of source (包含 source 的下半部和上半部的一对扩宽向量).

See Also

Widen(IWVectorTraits128, Vector128<ushort>)

Widens a Vector128<T> into two Vector128<T> instances - Generic version (将一个 Vector128<T> 扩宽为两个 Vector128<T> 实例 - 泛型版). Mnemonic: element_ref(i, lower, upper) := widen(source[i]).

[CLSCompliant(false)]
public static (Vector128<uint> Lower, Vector128<uint> Upper) Widen(this IWVectorTraits128 athis, Vector128<ushort> source)

Parameters

athis IWVectorTraits128
source Vector128<ushort>

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

Returns

(Vector128<uint> Lower, Vector128<uint> Upper)

A pair of vectors that contain the widened lower and upper halves of source (包含 source 的下半部和上半部的一对扩宽向量).

See Also

Widen(IWVectorTraits128, Vector128<int>)

Widens a Vector128<T> into two Vector128<T> instances - Generic version (将一个 Vector128<T> 扩宽为两个 Vector128<T> 实例 - 泛型版). Mnemonic: element_ref(i, lower, upper) := widen(source[i]).

[CLSCompliant(false)]
public static (Vector128<long> Lower, Vector128<long> Upper) Widen(this IWVectorTraits128 athis, Vector128<int> source)

Parameters

athis IWVectorTraits128
source Vector128<int>

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

Returns

(Vector128<long> Lower, Vector128<long> Upper)

A pair of vectors that contain the widened lower and upper halves of source (包含 source 的下半部和上半部的一对扩宽向量).

See Also

Widen(IWVectorTraits128, Vector128<uint>)

Widens a Vector128<T> into two Vector128<T> instances - Generic version (将一个 Vector128<T> 扩宽为两个 Vector128<T> 实例 - 泛型版). Mnemonic: element_ref(i, lower, upper) := widen(source[i]).

[CLSCompliant(false)]
public static (Vector128<ulong> Lower, Vector128<ulong> Upper) Widen(this IWVectorTraits128 athis, Vector128<uint> source)

Parameters

athis IWVectorTraits128
source Vector128<uint>

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

Returns

(Vector128<ulong> Lower, Vector128<ulong> Upper)

A pair of vectors that contain the widened lower and upper halves of source (包含 source 的下半部和上半部的一对扩宽向量).

See Also