本文的直接思路来源是: https://www.code project.com/articles/874396/crunching-numbers-with-avx-and-avx
For example,supposeavectorcontainssignedbytes,sothemaximumvalueforeachelementis 127 (0x7f ).If an operation adds 98 to 85, themathematicalsumis183(0XB7).ifthevaluesareaddedwith _ mm 256 _ add _ epi 8,thesaturationwillbeignoredandthestoredredredreswith 我想赶得上的话是(53岁)。 和文章中的数值不一样。 我想起计算后必须以补数的形式恢复。 (原来是反码(不操作符号) () ) () ) ) ) ) )的补码,现在撤消就是反码过程。 如图1所示。
图1 :