33 #define GET_T(tt0,tt1,src,a,b){ \
34 a = vec_ld(16, src); \
35 tt0 = vec_perm(b, a, align); \
36 b = vec_ld(32, src); \
37 tt1 = vec_perm(a, b, align); \
40 #define GET_T(tt0,tt1,src,a,b){ \
41 tt0 = vec_vsx_ld(0, src); \
42 tt1 = vec_vsx_ld(16, src); \
47 static int32_t scalarproduct_and_madd_int16_altivec(int16_t *v1,
54 register vec_s16 muls = { mul, mul, mul, mul, mul, mul, mul, mul };
66 GET_T(t0,t1,v2,i1,i2);
69 res = vec_msum(t0, i0, res);
70 res = vec_msum(t1, i1, res);
71 GET_T(t0,t1,v3,i4,i3);
72 pv1[0] = vec_mladd(t0, muls, i0);
73 pv1[1] = vec_mladd(t1, muls, i1);
78 res = vec_splat(vec_sums(res,
zero_s32v), 3);
79 vec_ste(res, 0, &ires);