Table of Contents

Method YGroup4ToGroup3

Namespace
Zyl.VectorTraits.Impl
Assembly
VectorTraits.dll

YGroup4ToGroup3<T>(IVectorTraits, Vector<T>, Vector<T>, Vector<T>, Vector<T>)

Convert a 4-element group, to a 3-element group. It also converts packed RGBA pixel data to packed RGB pixel data (将4-元素组, 转为3-元素组. 它还能将 已打包的RGBA像素数据, 转换为 已打包的RGB像素数据). Mnemonic: View for group: (result0, result1, result2) = YGroup3Zip(YGroup4Unzip(data0, data1, data2, data3))). View for element: element_ref(i, result0, result1, result2) := element_ref((i/3)*4+(i%3), data0, data1, data2, data3).

[CLSCompliant(false)]
[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 (Vector<T> Result0, Vector<T> Result1, Vector<T> Result2) YGroup4ToGroup3<T>(this IVectorTraits athis, Vector<T> data0, Vector<T> data1, Vector<T> data2, Vector<T> data3) where T : struct

Parameters

athis IVectorTraits
data0 Vector<T>

A vector made of 4-element groups - Part 0 (由4元素组所组成的向量 - 第0部分).

data1 Vector<T>

A vector made of 4-element groups - Part 1 (由4元素组所组成的向量 - 第1部分).

data2 Vector<T>

A vector made of 4-element groups - Part 2 (由4元素组所组成的向量 - 第2部分).

data3 Vector<T>

A vector made of 4-element groups - Part 3 (由4元素组所组成的向量 - 第3部分).

Returns

(Vector<T> Result0, Vector<T> Result1, Vector<T> Result2)

Returns the converted data. (返回转换后数据).

Type Parameters

T

The element type of the input parameter (输入参数的元素类型).

YGroup4ToGroup3(IVectorTraits, Vector<float>, Vector<float>, Vector<float>, Vector<float>)

Convert a 4-element group, to a 3-element group. It also converts packed RGBA pixel data to packed RGB pixel data (将4-元素组, 转为3-元素组. 它还能将 已打包的RGBA像素数据, 转换为 已打包的RGB像素数据). Mnemonic: View for group: (result0, result1, result2) = YGroup3Zip(YGroup4Unzip(data0, data1, data2, data3))). View for element: element_ref(i, result0, result1, result2) := element_ref((i/3)*4+(i%3), data0, data1, data2, data3).

[CLSCompliant(false)]
public static (Vector<float> Result0, Vector<float> Result1, Vector<float> Result2) YGroup4ToGroup3(this IVectorTraits athis, Vector<float> data0, Vector<float> data1, Vector<float> data2, Vector<float> data3)

Parameters

athis IVectorTraits
data0 Vector<float>

A vector made of 4-element groups - Part 0 (由4元素组所组成的向量 - 第0部分).

data1 Vector<float>

A vector made of 4-element groups - Part 1 (由4元素组所组成的向量 - 第1部分).

data2 Vector<float>

A vector made of 4-element groups - Part 2 (由4元素组所组成的向量 - 第2部分).

data3 Vector<float>

A vector made of 4-element groups - Part 3 (由4元素组所组成的向量 - 第3部分).

Returns

(Vector<float> Result0, Vector<float> Result1, Vector<float> Result2)

Returns the converted data. (返回转换后数据).

YGroup4ToGroup3(IVectorTraits, Vector<double>, Vector<double>, Vector<double>, Vector<double>)

Convert a 4-element group, to a 3-element group. It also converts packed RGBA pixel data to packed RGB pixel data (将4-元素组, 转为3-元素组. 它还能将 已打包的RGBA像素数据, 转换为 已打包的RGB像素数据). Mnemonic: View for group: (result0, result1, result2) = YGroup3Zip(YGroup4Unzip(data0, data1, data2, data3))). View for element: element_ref(i, result0, result1, result2) := element_ref((i/3)*4+(i%3), data0, data1, data2, data3).

[CLSCompliant(false)]
public static (Vector<double> Result0, Vector<double> Result1, Vector<double> Result2) YGroup4ToGroup3(this IVectorTraits athis, Vector<double> data0, Vector<double> data1, Vector<double> data2, Vector<double> data3)

Parameters

athis IVectorTraits
data0 Vector<double>

A vector made of 4-element groups - Part 0 (由4元素组所组成的向量 - 第0部分).

data1 Vector<double>

A vector made of 4-element groups - Part 1 (由4元素组所组成的向量 - 第1部分).

data2 Vector<double>

A vector made of 4-element groups - Part 2 (由4元素组所组成的向量 - 第2部分).

data3 Vector<double>

A vector made of 4-element groups - Part 3 (由4元素组所组成的向量 - 第3部分).

Returns

(Vector<double> Result0, Vector<double> Result1, Vector<double> Result2)

Returns the converted data. (返回转换后数据).

YGroup4ToGroup3(IVectorTraits, Vector<sbyte>, Vector<sbyte>, Vector<sbyte>, Vector<sbyte>)

Convert a 4-element group, to a 3-element group. It also converts packed RGBA pixel data to packed RGB pixel data (将4-元素组, 转为3-元素组. 它还能将 已打包的RGBA像素数据, 转换为 已打包的RGB像素数据). Mnemonic: View for group: (result0, result1, result2) = YGroup3Zip(YGroup4Unzip(data0, data1, data2, data3))). View for element: element_ref(i, result0, result1, result2) := element_ref((i/3)*4+(i%3), data0, data1, data2, data3).

[CLSCompliant(false)]
public static (Vector<sbyte> Result0, Vector<sbyte> Result1, Vector<sbyte> Result2) YGroup4ToGroup3(this IVectorTraits athis, Vector<sbyte> data0, Vector<sbyte> data1, Vector<sbyte> data2, Vector<sbyte> data3)

Parameters

athis IVectorTraits
data0 Vector<sbyte>

A vector made of 4-element groups - Part 0 (由4元素组所组成的向量 - 第0部分).

data1 Vector<sbyte>

A vector made of 4-element groups - Part 1 (由4元素组所组成的向量 - 第1部分).

data2 Vector<sbyte>

A vector made of 4-element groups - Part 2 (由4元素组所组成的向量 - 第2部分).

data3 Vector<sbyte>

A vector made of 4-element groups - Part 3 (由4元素组所组成的向量 - 第3部分).

Returns

(Vector<sbyte> args0, Vector<sbyte> args1, Vector<sbyte> args2)

Returns the converted data. (返回转换后数据).

YGroup4ToGroup3(IVectorTraits, Vector<byte>, Vector<byte>, Vector<byte>, Vector<byte>)

Convert a 4-element group, to a 3-element group. It also converts packed RGBA pixel data to packed RGB pixel data (将4-元素组, 转为3-元素组. 它还能将 已打包的RGBA像素数据, 转换为 已打包的RGB像素数据). Mnemonic: View for group: (result0, result1, result2) = YGroup3Zip(YGroup4Unzip(data0, data1, data2, data3))). View for element: element_ref(i, result0, result1, result2) := element_ref((i/3)*4+(i%3), data0, data1, data2, data3).

[CLSCompliant(false)]
public static (Vector<byte> Result0, Vector<byte> Result1, Vector<byte> Result2) YGroup4ToGroup3(this IVectorTraits athis, Vector<byte> data0, Vector<byte> data1, Vector<byte> data2, Vector<byte> data3)

Parameters

athis IVectorTraits
data0 Vector<byte>

A vector made of 4-element groups - Part 0 (由4元素组所组成的向量 - 第0部分).

data1 Vector<byte>

A vector made of 4-element groups - Part 1 (由4元素组所组成的向量 - 第1部分).

data2 Vector<byte>

A vector made of 4-element groups - Part 2 (由4元素组所组成的向量 - 第2部分).

data3 Vector<byte>

A vector made of 4-element groups - Part 3 (由4元素组所组成的向量 - 第3部分).

Returns

(Vector<byte> args0, Vector<byte> args1, Vector<byte> args2)

Returns the converted data. (返回转换后数据).

YGroup4ToGroup3(IVectorTraits, Vector<short>, Vector<short>, Vector<short>, Vector<short>)

Convert a 4-element group, to a 3-element group. It also converts packed RGBA pixel data to packed RGB pixel data (将4-元素组, 转为3-元素组. 它还能将 已打包的RGBA像素数据, 转换为 已打包的RGB像素数据). Mnemonic: View for group: (result0, result1, result2) = YGroup3Zip(YGroup4Unzip(data0, data1, data2, data3))). View for element: element_ref(i, result0, result1, result2) := element_ref((i/3)*4+(i%3), data0, data1, data2, data3).

[CLSCompliant(false)]
public static (Vector<short> Result0, Vector<short> Result1, Vector<short> Result2) YGroup4ToGroup3(this IVectorTraits athis, Vector<short> data0, Vector<short> data1, Vector<short> data2, Vector<short> data3)

Parameters

athis IVectorTraits
data0 Vector<short>

A vector made of 4-element groups - Part 0 (由4元素组所组成的向量 - 第0部分).

data1 Vector<short>

A vector made of 4-element groups - Part 1 (由4元素组所组成的向量 - 第1部分).

data2 Vector<short>

A vector made of 4-element groups - Part 2 (由4元素组所组成的向量 - 第2部分).

data3 Vector<short>

A vector made of 4-element groups - Part 3 (由4元素组所组成的向量 - 第3部分).

Returns

(Vector<short> args0, Vector<short> args1, Vector<short> args2)

Returns the converted data. (返回转换后数据).

YGroup4ToGroup3(IVectorTraits, Vector<ushort>, Vector<ushort>, Vector<ushort>, Vector<ushort>)

Convert a 4-element group, to a 3-element group. It also converts packed RGBA pixel data to packed RGB pixel data (将4-元素组, 转为3-元素组. 它还能将 已打包的RGBA像素数据, 转换为 已打包的RGB像素数据). Mnemonic: View for group: (result0, result1, result2) = YGroup3Zip(YGroup4Unzip(data0, data1, data2, data3))). View for element: element_ref(i, result0, result1, result2) := element_ref((i/3)*4+(i%3), data0, data1, data2, data3).

[CLSCompliant(false)]
public static (Vector<ushort> Result0, Vector<ushort> Result1, Vector<ushort> Result2) YGroup4ToGroup3(this IVectorTraits athis, Vector<ushort> data0, Vector<ushort> data1, Vector<ushort> data2, Vector<ushort> data3)

Parameters

athis IVectorTraits
data0 Vector<ushort>

A vector made of 4-element groups - Part 0 (由4元素组所组成的向量 - 第0部分).

data1 Vector<ushort>

A vector made of 4-element groups - Part 1 (由4元素组所组成的向量 - 第1部分).

data2 Vector<ushort>

A vector made of 4-element groups - Part 2 (由4元素组所组成的向量 - 第2部分).

data3 Vector<ushort>

A vector made of 4-element groups - Part 3 (由4元素组所组成的向量 - 第3部分).

Returns

(Vector<ushort> args0, Vector<ushort> args1, Vector<ushort> args2)

Returns the converted data. (返回转换后数据).

YGroup4ToGroup3(IVectorTraits, Vector<int>, Vector<int>, Vector<int>, Vector<int>)

Convert a 4-element group, to a 3-element group. It also converts packed RGBA pixel data to packed RGB pixel data (将4-元素组, 转为3-元素组. 它还能将 已打包的RGBA像素数据, 转换为 已打包的RGB像素数据). Mnemonic: View for group: (result0, result1, result2) = YGroup3Zip(YGroup4Unzip(data0, data1, data2, data3))). View for element: element_ref(i, result0, result1, result2) := element_ref((i/3)*4+(i%3), data0, data1, data2, data3).

[CLSCompliant(false)]
public static (Vector<int> Result0, Vector<int> Result1, Vector<int> Result2) YGroup4ToGroup3(this IVectorTraits athis, Vector<int> data0, Vector<int> data1, Vector<int> data2, Vector<int> data3)

Parameters

athis IVectorTraits
data0 Vector<int>

A vector made of 4-element groups - Part 0 (由4元素组所组成的向量 - 第0部分).

data1 Vector<int>

A vector made of 4-element groups - Part 1 (由4元素组所组成的向量 - 第1部分).

data2 Vector<int>

A vector made of 4-element groups - Part 2 (由4元素组所组成的向量 - 第2部分).

data3 Vector<int>

A vector made of 4-element groups - Part 3 (由4元素组所组成的向量 - 第3部分).

Returns

(Vector<int> args0, Vector<int> args1, Vector<int> args2)

Returns the converted data. (返回转换后数据).

YGroup4ToGroup3(IVectorTraits, Vector<uint>, Vector<uint>, Vector<uint>, Vector<uint>)

Convert a 4-element group, to a 3-element group. It also converts packed RGBA pixel data to packed RGB pixel data (将4-元素组, 转为3-元素组. 它还能将 已打包的RGBA像素数据, 转换为 已打包的RGB像素数据). Mnemonic: View for group: (result0, result1, result2) = YGroup3Zip(YGroup4Unzip(data0, data1, data2, data3))). View for element: element_ref(i, result0, result1, result2) := element_ref((i/3)*4+(i%3), data0, data1, data2, data3).

[CLSCompliant(false)]
public static (Vector<uint> Result0, Vector<uint> Result1, Vector<uint> Result2) YGroup4ToGroup3(this IVectorTraits athis, Vector<uint> data0, Vector<uint> data1, Vector<uint> data2, Vector<uint> data3)

Parameters

athis IVectorTraits
data0 Vector<uint>

A vector made of 4-element groups - Part 0 (由4元素组所组成的向量 - 第0部分).

data1 Vector<uint>

A vector made of 4-element groups - Part 1 (由4元素组所组成的向量 - 第1部分).

data2 Vector<uint>

A vector made of 4-element groups - Part 2 (由4元素组所组成的向量 - 第2部分).

data3 Vector<uint>

A vector made of 4-element groups - Part 3 (由4元素组所组成的向量 - 第3部分).

Returns

(Vector<uint> args0, Vector<uint> args1, Vector<uint> args2)

Returns the converted data. (返回转换后数据).

YGroup4ToGroup3(IVectorTraits, Vector<long>, Vector<long>, Vector<long>, Vector<long>)

Convert a 4-element group, to a 3-element group. It also converts packed RGBA pixel data to packed RGB pixel data (将4-元素组, 转为3-元素组. 它还能将 已打包的RGBA像素数据, 转换为 已打包的RGB像素数据). Mnemonic: View for group: (result0, result1, result2) = YGroup3Zip(YGroup4Unzip(data0, data1, data2, data3))). View for element: element_ref(i, result0, result1, result2) := element_ref((i/3)*4+(i%3), data0, data1, data2, data3).

[CLSCompliant(false)]
public static (Vector<long> Result0, Vector<long> Result1, Vector<long> Result2) YGroup4ToGroup3(this IVectorTraits athis, Vector<long> data0, Vector<long> data1, Vector<long> data2, Vector<long> data3)

Parameters

athis IVectorTraits
data0 Vector<long>

A vector made of 4-element groups - Part 0 (由4元素组所组成的向量 - 第0部分).

data1 Vector<long>

A vector made of 4-element groups - Part 1 (由4元素组所组成的向量 - 第1部分).

data2 Vector<long>

A vector made of 4-element groups - Part 2 (由4元素组所组成的向量 - 第2部分).

data3 Vector<long>

A vector made of 4-element groups - Part 3 (由4元素组所组成的向量 - 第3部分).

Returns

(Vector<long> args0, Vector<long> args1, Vector<long> args2)

Returns the converted data. (返回转换后数据).

YGroup4ToGroup3(IVectorTraits, Vector<ulong>, Vector<ulong>, Vector<ulong>, Vector<ulong>)

Convert a 4-element group, to a 3-element group. It also converts packed RGBA pixel data to packed RGB pixel data (将4-元素组, 转为3-元素组. 它还能将 已打包的RGBA像素数据, 转换为 已打包的RGB像素数据). Mnemonic: View for group: (result0, result1, result2) = YGroup3Zip(YGroup4Unzip(data0, data1, data2, data3))). View for element: element_ref(i, result0, result1, result2) := element_ref((i/3)*4+(i%3), data0, data1, data2, data3).

[CLSCompliant(false)]
public static (Vector<ulong> Result0, Vector<ulong> Result1, Vector<ulong> Result2) YGroup4ToGroup3(this IVectorTraits athis, Vector<ulong> data0, Vector<ulong> data1, Vector<ulong> data2, Vector<ulong> data3)

Parameters

athis IVectorTraits
data0 Vector<ulong>

A vector made of 4-element groups - Part 0 (由4元素组所组成的向量 - 第0部分).

data1 Vector<ulong>

A vector made of 4-element groups - Part 1 (由4元素组所组成的向量 - 第1部分).

data2 Vector<ulong>

A vector made of 4-element groups - Part 2 (由4元素组所组成的向量 - 第2部分).

data3 Vector<ulong>

A vector made of 4-element groups - Part 3 (由4元素组所组成的向量 - 第3部分).

Returns

(Vector<ulong> args0, Vector<ulong> args1, Vector<ulong> args2)

Returns the converted data. (返回转换后数据).