boolean function:
- up to three variables are allowed
- allowed operators: not, and, or,
xor, alternatively ~, &, |, ^
- for one- or two-variable functions values marked with ? are ignored
How to use ternarylogic in code?
C/C++: |
_mm512_ternarylogic_epi32(a, b, var_c, 0x??) |
GNU as: |
vpternlogd $0x??, a, b, c |
GO asm: |
VPTERNLOGD $0x??, a, b, c |
|
a |
b |
c |
|
0 | 0 | 0 | — |
0 | 0 | 1 | — |
0 | 1 | 0 | — |
0 | 1 | 1 | — |
1 | 0 | 0 | — |
1 | 0 | 1 | — |
1 | 1 | 0 | — |
1 | 1 | 1 | — |
hex | |
|