Table of Contents

Method Widen

Namespace
Zyl.VectorTraits.Impl
Assembly
VectorTraits.dll

Widen<T, TOut>(Vector256<T>, out Vector256<TOut>, out Vector256<TOut>)

Widens a Vector256<T> into two Vector256<T> instances - Generic version (将一个 Vector256<T> 扩宽为两个 Vector256<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>(Vector256<T> source, out Vector256<TOut> lower, out Vector256<TOut> upper) where T : struct where TOut : struct

Parameters

source Vector256<T>

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

lower Vector256<TOut>

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

upper Vector256<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