转载请标明出处:https://blog.csdn.net/u013752202/article/details/92008843
文章目的:
快速索引到需要的向量运算
vadd -> ri = ai + bi; //--1、Vector add(正常指令): r, a, b have equal lane sizes
vaddl -> ri = ai + bi; //--2、Vector long add(长指令): a, b have equal lane sizes,
vhadd -> ri = (ai + bi) >> 1; //--4、Vector halving add:
vrhadd -> ri = (ai + bi + 1) >> 1; //--5、Vector rounding halving add:
vqadd -> ri = sat(ai + bi); //--6、Vector saturating add(饱和指令):
vaddhn -> ri = sat(ai + bi); //--7、Vector add high half(窄指令):
vraddhn -> ri = ai + bi; //--8、Vector rounding add high half(窄指令):
vmul -> ri = ai * bi; //--1、Vector multiply(正常指令):
vmla -> ri = ai + bi * ci; //--2、Vector multiply accumulate:
vqdmulh -> ri = sat(ai * bi); //--6、Vector saturating doubling multiply high:
vqdmlal -> ri = ai + bi * ci; //--8、Vector saturating doubling multiply accumulate long:
vqdmlsl -> ri = ai - bi * ci; //--9、Vector saturating doubling multiply subtract long:
vmull -> ri = ai * bi; //--10、Vector long multiply(长指令):
vqdmull -> ri = ai * bi; //--11、Vector saturating doubling long multiply:
vfma -> ri = ai + bi * ci; //--12、Fused multiply accumulate:
vfms -> ri = ai - bi * ci; //--13、Fused multiply subtract:
vsub -> ri = ai - bi; //--1、Vector subtract(正常指令):
vsubl -> ri = ai - bi; //--2、Vector long subtract(长指令):
vsubw -> ri = ai - bi; //--3、Vector wide subtract(宽指令):
vqsub -> ri = sat(ai - bi); //--4、Vector saturating subtract(饱和指令):
vhsub -> ri = (ai - bi) >> 1; //--5、Vector halving subtract:
vsubhn -> ri = ai - bi; //--6、Vector subtract high half(窄指令):
vrsubhn -> ai - bi; //--7、Vector rounding subtract high half(窄指令):
vceq -> ri = ai == bi ? 1...1 : 0...0; //--1、Vector compare equal(正常指令):
vcge-> ri = ai >= bi ? 1...1:0...0; //--2、Vector compare greater-than or equal(正常指令):
vcle -> ri = ai <= bi ? 1...1:0...0; //--3、Vector compare less-than or equal(正常指令):
vcgt -> ri = ai > bi ? 1...1:0...0; //--4、Vector compare greater-than(正常指令):
vclt -> ri = ai < bi ? 1...1:0...0; //--5、Vector compare less-than(正常指令):
vtst -> ri = (ai & bi != 0) ? 1...1:0...0; //--正常指令,
vabd -> ri = |ai - bi|; //--1、Absolute difference between the arguments(正常指令):
vabdl -> ri = |ai - bi|; //--2、Absolute difference - long(长指令):
vaba -> ri = ai + |bi - ci|; //--3、Absolute difference and accumulate:
vabal -> ri = ai + |bi - ci|; //--4、Absolute difference and accumulate - long:
vmax -> ri = ai >= bi ? ai : bi; //--正常指令, returns the larger of each pair
vmin -> ri = ai >= bi ? bi : ai; //--正常指令, returns the smaller of each pair
vshl -> ri = ai << bi; //--1、Vector shift left(饱和指令): (negative values shift right)
vshr -> ri = ai >> b; //--1、Vector shift right by constant: The results are truncated.
vshl -> ri = ai << b; //--2、Vector shift left by constant:
vrshr -> ri = ai >> b; //--3、Vector rounding shift right by constant:
vsra -> ri = (ai >> c) + (bi >> c); //--4、Vector shift right by constant and accumulate:
vqshl -> ri = sat(ai << b); //--6、Vector saturating shift left by constant:
vqshlu -> ri = ai << b; //--7、Vector signed->unsigned saturating shift left by constant:
vshrn -> ri = ai >> b; //--8、Vector narrowing shift right by constant:
vqshrn -> ri = ai >> b; //--11、Vector narrowing saturating shift right by constant:
vrshrn -> ri = ai >> b; //--12、Vector rounding narrowing shift right by constant:
vshll -> ri = ai << b; //--14、Vector widening shift left by constant:
vabs -> ri = |ai|; //--1、Absolute(正常指令):
vqabs -> ri = sat(|ai|); //--2、Saturating absolute(饱和指令):
vneg -> ri = -ai; //--1、Negate(正常指令): negates each element in a vector.
vqneg -> ri = sat(-ai); //--2、Saturating Negate:
vn -> ri = ~ai; //--1、Bitwise not(正常指令): vm
vand -> ri = ai & bi; //--2、Bitwise and(正常指令): performs a bitwise AND between
vorr -> ri = ai | bi; //--3、Bitwise or(正常指令): performs a bitwise OR between
veor -> ri = ai ^ bi; //--4、Bitwise exclusive or (EOR or XOR)(正常指令):
vbic -> ri = ~ai & bi; //--5、Bit Clear(正常指令):
vorn -> ri = ai | (~bi); //--6、Bitwise OR complement(正常指令):
vn -> ri = ai[0...8]; //--1、Vector narrow integer(窄指令): vmo copies the least
vmul -> ri = ai * b; //--1、Vector multiply by scalar:
vmull -> ri = ai * b; //--3、Vector long multiply with scalar:
vmull -> ri = ai * b[c]; //--4、Vector long multiply by scalar:
vqdmull -> ri = sat(ai * b); //--5、Vector saturating doubling long multiply with scalar:
vqdmull -> ri = sat(ai * b[c]); //--6、Vector saturating doubling long multiply by scalar:
vmla -> ri = ai + bi * c; //--11、Vector multiply accumulate with scalar:
vmla -> ri = ai + bi * c[d]; //--12、Vector multiply accumulate by scalar:
vmlal -> ri = ai + bi * c; //--13、Vector widening multiply accumulate with scalar:
vmlal -> ri = ai + bi * c[d]; //--14、Vector widening multiply accumulate by scalar:
vmls -> ri = ai - bi * c; //--17、Vector multiply subtract with scalar:
vmls -> ri = ai - bi * c[d]; //--18、Vector multiply subtract by scalar:
vmlsl -> ri = ai - bi * c; //--19、Vector widening multiply subtract with scalar:
vmlsl -> ri = ai - bi * c[d]; //--20、Vector widening multiply subtract by scalar:
函数说明详见《Neon Intrinsics各函数介绍》
转载请标明出处:https://blog.csdn.net/u013752202/article/details/92008843