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 unsigned averaging subtract: vd[i] = roundoff_unsigned(vs2[i] - x[rs1], 1).
VASUBU.VX performs RVV unsigned 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.
VASUBU.VX is fixed-point averaging subtract; the key distinctions are unsigned interpretation and vxrm rounding.
Understand this scenario with real code like «vsetvli t0, a0, e32, m1, ta, ma vasubu.vx v1, v2, a1».
Understand this scenario with real code like «vsetvli t0, a0, e32, m1, ta, ma vasubu.vx v1, v2, a1».
VASUB interprets elements as signed, while VASUBU interprets them as unsigned; both use vxrm for averaging-subtract rounding.