What is the difference between VASUB and VASUBU?
VASUB interprets elements as signed, while VASUBU interprets them as unsigned; both use vxrm for averaging-subtract rounding.
Vector signed averaging subtract: vd[i] = roundoff_signed(vs2[i] - vs1[i], 1).
VASUB.VV performs RVV signed fixed-point averaging subtract. The difference is right-shifted by one bit and rounded according to vxrm; the SEW-width result is written back, and this is not a saturating subtract.
VASUB.VV is fixed-point averaging subtract; the key distinctions are signed interpretation and vxrm rounding.
Understand this scenario with real code like «vsetvli t0, a0, e32, m1, ta, ma vasub.vv v1, v2, v3».
Understand this scenario with real code like «vsetvli t0, a0, e32, m1, ta, ma vasub.vv v1, v2, v3».
VASUB interprets elements as signed, while VASUBU interprets them as unsigned; both use vxrm for averaging-subtract rounding.