Method YShuffleG4_Const_ImmByte
- Namespace
- Zyl.VectorTraits.Impl.AVector256
- Assembly
- VectorTraits.dll
YShuffleG4_Const_ImmByte(Vector256<int>, byte)
For each 4-element groups in a vector, shuffle is performed - Constant version (对于一个向量中的每个 4-元素组, 进行换位 - 常量版). If the count of the vector is less than 4, please use YShuffleG4X2_Const instead (如果向量的数量小于4,请使用 YShuffleG4X2_Const 代替).
Mnemonic: View for group: rt.xyzw = shuffleG4_ref(control, source)
. View for element: rt[i] := source[(i&(~3)) | ((control >> ((i&3)*2)) & 3)]
.
public static Vector256<int> YShuffleG4_Const_ImmByte(Vector256<int> source, byte control)
Parameters
source
Vector256<int>The input source from which values are selected (从中选择值的输入向量).
control
byteShuffle control code (换位控制码).
Returns
- Vector256<int>
A new source containing the values from
source
selected by the givencontrol
(一个新向量,其中包含给定control
从source
中选择的值).
- See Also