1 /* { dg-do compile } */
3 extern vector
signed short image
[];
4 extern vector
signed short band
[];
6 #define load(a,b) vec_ld((b)*16, a)
7 #define store(v,a,b) vec_st(v,(b)*16,a)
10 haar (vector
signed char a
, vector
signed char b
, vector
signed char c
,
11 vector
signed char d
, unsigned int N
, int XX
)
14 vector
unsigned char high
, low
;
15 vector
signed int zero
= ((vector
signed int){0,0,0,0});
17 for (i
= 0; i
< N
; i
++) {
18 high
= (vector
unsigned char) (vec_vmrghh (load(image
, i
+XX
),
20 low
= (vector
unsigned char) (vec_vmrglh (load(image
, i
+XX
),
23 store (vec_vpkswss (vec_vmsummbm (a
, high
, zero
),
24 vec_vmsummbm (a
, low
, zero
)),
26 store (vec_vpkswss (vec_vmsummbm (b
, high
, zero
),
27 vec_vmsummbm (b
, low
, zero
)),
29 store(vec_vpkswss (vec_vmsummbm (c
, high
, zero
),
30 vec_vmsummbm (c
, low
, zero
)),
32 store(vec_vpkswss (vec_vmsummbm (d
, high
, zero
),
33 vec_vmsummbm (d
, low
, zero
)),