Table of Contents

Enum ShuffleControlG2On256

Namespace
Zyl.VectorTraits.Impl
Assembly
VectorTraits.dll

Shuffle control constants for "2-element group" at 256 bits vector ("2元素组"在256位向量时的换位控制常数) .

public enum ShuffleControlG2On256 : byte

Fields

XXXX = 0

XXXX := GetByteBy4XBitR(0, 0, 0, 0) = (_MM_SHUFFLE2(0, 0)<<2) | _MM_SHUFFLE2(0, 0) = (0 << 3) | (0 << 2) | (0 << 1) | 0 = 0x00 = 0 .

XXXY = 8

XXXY := GetByteBy4XBitR(0, 0, 0, 1) = (_MM_SHUFFLE2(1, 0)<<2) | _MM_SHUFFLE2(0, 0) = (1 << 3) | (0 << 2) | (0 << 1) | 0 = 0x08 = 8 .

XXYX = 4

XXYX := GetByteBy4XBitR(0, 0, 1, 0) = (_MM_SHUFFLE2(0, 1)<<2) | _MM_SHUFFLE2(0, 0) = (0 << 3) | (1 << 2) | (0 << 1) | 0 = 0x04 = 4 .

XXYY = 12

XXYY := GetByteBy4XBitR(0, 0, 1, 1) = (_MM_SHUFFLE2(1, 1)<<2) | _MM_SHUFFLE2(0, 0) = (1 << 3) | (1 << 2) | (0 << 1) | 0 = 0x0C = 12 .

XYXX = 2

XYXX := GetByteBy4XBitR(0, 1, 0, 0) = (_MM_SHUFFLE2(0, 0)<<2) | _MM_SHUFFLE2(1, 0) = (0 << 3) | (0 << 2) | (1 << 1) | 0 = 0x02 = 2 .

XYXY = 10

XYXY := GetByteBy4XBitR(0, 1, 0, 1) = (_MM_SHUFFLE2(1, 0)<<2) | _MM_SHUFFLE2(1, 0) = (1 << 3) | (0 << 2) | (1 << 1) | 0 = 0x0A = 10 .

XYYX = 6

XYYX := GetByteBy4XBitR(0, 1, 1, 0) = (_MM_SHUFFLE2(0, 1)<<2) | _MM_SHUFFLE2(1, 0) = (0 << 3) | (1 << 2) | (1 << 1) | 0 = 0x06 = 6 .

XYYY = 14

XYYY := GetByteBy4XBitR(0, 1, 1, 1) = (_MM_SHUFFLE2(1, 1)<<2) | _MM_SHUFFLE2(1, 0) = (1 << 3) | (1 << 2) | (1 << 1) | 0 = 0x0E = 14 .

YXXX = 1

YXXX := GetByteBy4XBitR(1, 0, 0, 0) = (_MM_SHUFFLE2(0, 0)<<2) | _MM_SHUFFLE2(0, 1) = (0 << 3) | (0 << 2) | (0 << 1) | 1 = 0x01 = 1 .

YXXY = 9

YXXY := GetByteBy4XBitR(1, 0, 0, 1) = (_MM_SHUFFLE2(1, 0)<<2) | _MM_SHUFFLE2(0, 1) = (1 << 3) | (0 << 2) | (0 << 1) | 1 = 0x09 = 9 .

YXYX = 5

YXYX := GetByteBy4XBitR(1, 0, 1, 0) = (_MM_SHUFFLE2(0, 1)<<2) | _MM_SHUFFLE2(0, 1) = (0 << 3) | (1 << 2) | (0 << 1) | 1 = 0x05 = 5 .

YXYY = 13

YXYY := GetByteBy4XBitR(1, 0, 1, 1) = (_MM_SHUFFLE2(1, 1)<<2) | _MM_SHUFFLE2(0, 1) = (1 << 3) | (1 << 2) | (0 << 1) | 1 = 0x0D = 13 .

YYXX = 3

YYXX := GetByteBy4XBitR(1, 1, 0, 0) = (_MM_SHUFFLE2(0, 0)<<2) | _MM_SHUFFLE2(1, 1) = (0 << 3) | (0 << 2) | (1 << 1) | 1 = 0x03 = 3 .

YYXY = 11

YYXY := GetByteBy4XBitR(1, 1, 0, 1) = (_MM_SHUFFLE2(1, 0)<<2) | _MM_SHUFFLE2(1, 1) = (1 << 3) | (0 << 2) | (1 << 1) | 1 = 0x0B = 11 .

YYYX = 7

YYYX := GetByteBy4XBitR(1, 1, 1, 0) = (_MM_SHUFFLE2(0, 1)<<2) | _MM_SHUFFLE2(1, 1) = (0 << 3) | (1 << 2) | (1 << 1) | 1 = 0x07 = 7 .

YYYY = 15

YYYY := GetByteBy4XBitR(1, 1, 1, 1) = (_MM_SHUFFLE2(1, 1)<<2) | _MM_SHUFFLE2(1, 1) = (1 << 3) | (1 << 2) | (1 << 1) | 1 = 0x0F = 15 .

Remarks

Constant names are referenced to HLSL(High-level shader language)/GLSL(OpenGL Shading Language), using the Little-Endian mode (常量名参考了 HLSL(高级着色语言)/GLSL(OpenGL着色语言), 使用的是小端模式).

See Also