| 155 | |
| 156 | /* maj_1 : TWO * TWO * TWO |- TWO */ |
| 157 | bool simplicity_maj_1(frameItem* dst, frameItem src, const txEnv* env) { |
| 158 | (void) env; /* env is unused. */ |
| 159 | bool x = readBit(&src); |
| 160 | bool y = readBit(&src); |
| 161 | bool z = readBit(&src); |
| 162 | writeBit(dst, (x && y) || (y && z) || (z && x)); |
| 163 | return true; |
| 164 | } |
| 165 | |
| 166 | #define MAJ_(bits) \ |
| 167 | /* maj_n : TWO^n * TWO^n * TWO^n |- TWO^n */ \ |