33 static int32_t scalarproduct_and_madd_int16_altivec(int16_t *v1,
40 register vec_s16 muls = { mul, mul, mul, mul, mul, mul, mul, mul };
42 register vec_s16 i2 = vec_ld(0, v2), i3 = vec_ld(0, v3);
50 t0 = vec_perm(i2, i1, align);
52 t1 = vec_perm(i1, i2, align);
55 res = vec_msum(t0, i0, res);
56 res = vec_msum(t1, i1, res);
58 t0 = vec_perm(i3, i4, align);
60 t1 = vec_perm(i4, i3, align);
61 pv1[0] = vec_mladd(t0, muls, i0);
62 pv1[1] = vec_mladd(t1, muls, i1);
67 res = vec_splat(vec_sums(res,
zero_s32v), 3);
68 vec_ste(res, 0, &ires);