This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Usage: evaluate a ternary bitwise function with the values a=0xf0, b=0xcc, c=0xaa. | |
On AVX-512 you can pass the result directly to VPTERNLOGD. On other platforms, | |
look up the value in the following tables to find a short, equivalent sequence of | |
operations. | |
For A64/SVE/Neon see https://gist.github.com/dougallj/10c3ffdbd07229db2cc8b0430d7ccd39 | |
The tables here are: | |
* agx: "not" and all binary operations (as used in Apple GPUs, but possibly useful elsewhere): |