8 vector
unsigned short vusa
= {0,1,2,3,4,5,6,7};
9 vector
unsigned short vusb
= {8,9,10,11,12,13,14,15};
10 vector
signed short vssa
= {-8,-7,-6,-5,-4,-3,-2,-1};
11 vector
signed short vssb
= {0,1,2,3,4,5,6,7};
12 vector
bool short vbsa
= {0,65535,65535,0,0,0,65535,0};
13 vector
bool short vbsb
= {65535,0,0,65535,65535,65535,0,65535};
14 vector
unsigned int vuia
= {0,1,2,3};
15 vector
unsigned int vuib
= {4,5,6,7};
16 vector
signed int vsia
= {-4,-3,-2,-1};
17 vector
signed int vsib
= {0,1,2,3};
18 vector
bool int vbia
= {0,BIG
,BIG
,BIG
};
19 vector
bool int vbib
= {BIG
,0,0,0};
20 vector
unsigned int vipa
= {(0<<24) + (2<<19) + (3<<11) + (4<<3),
21 (1<<24) + (5<<19) + (6<<11) + (7<<3),
22 (0<<24) + (8<<19) + (9<<11) + (10<<3),
23 (1<<24) + (11<<19) + (12<<11) + (13<<3)};
24 vector
unsigned int vipb
= {(1<<24) + (14<<19) + (15<<11) + (16<<3),
25 (0<<24) + (17<<19) + (18<<11) + (19<<3),
26 (1<<24) + (20<<19) + (21<<11) + (22<<3),
27 (0<<24) + (23<<19) + (24<<11) + (25<<3)};
28 vector
unsigned short vusc
= {0,256,1,257,2,258,3,259};
29 vector
unsigned short vusd
= {4,260,5,261,6,262,7,263};
30 vector
signed short vssc
= {-1,-128,0,127,-2,-129,1,128};
31 vector
signed short vssd
= {-3,-130,2,129,-4,-131,3,130};
32 vector
unsigned int vuic
= {0,65536,1,65537};
33 vector
unsigned int vuid
= {2,65538,3,65539};
34 vector
signed int vsic
= {-1,-32768,0,32767};
35 vector
signed int vsid
= {-2,-32769,1,32768};
38 vector
unsigned char vucr
;
39 vector
signed char vscr
;
40 vector
bool char vbcr
;
41 vector
unsigned short vusr
;
42 vector
signed short vssr
;
43 vector
bool short vbsr
;
45 vector
unsigned char vucsr
;
46 vector
signed char vscsr
;
47 vector
unsigned short vussr
;
48 vector
signed short vsssr
;
49 vector
unsigned char vucsur1
, vucsur2
;
50 vector
unsigned short vussur1
, vussur2
;
52 /* Expected result vectors. */
53 vector
unsigned char vucer
= {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
54 vector
signed char vscer
= {-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7};
55 vector
bool char vbcer
= {0,255,255,0,0,0,255,0,255,0,0,255,255,255,0,255};
56 vector
unsigned short vuser
= {0,1,2,3,4,5,6,7};
57 vector
signed short vsser
= {-4,-3,-2,-1,0,1,2,3};
58 vector
bool short vbser
= {0,65535,65535,65535,65535,0,0,0};
59 vector pixel vper
= {(0<<15) + (2<<10) + (3<<5) + 4,
60 (1<<15) + (5<<10) + (6<<5) + 7,
61 (0<<15) + (8<<10) + (9<<5) + 10,
62 (1<<15) + (11<<10) + (12<<5) + 13,
63 (1<<15) + (14<<10) + (15<<5) + 16,
64 (0<<15) + (17<<10) + (18<<5) + 19,
65 (1<<15) + (20<<10) + (21<<5) + 22,
66 (0<<15) + (23<<10) + (24<<5) + 25};
67 vector
unsigned char vucser
= {0,255,1,255,2,255,3,255,4,255,5,255,6,255,7,255};
68 vector
signed char vscser
= {-1,-128,0,127,-2,-128,1,127,
69 -3,-128,2,127,-4,-128,3,127};
70 vector
unsigned short vusser
= {0,65535,1,65535,2,65535,3,65535};
71 vector
signed short vssser
= {-1,-32768,0,32767,-2,-32768,1,32767};
72 vector
unsigned char vucsuer1
= {0,255,1,255,2,255,3,255,4,255,5,255,6,255,7,255};
73 vector
unsigned char vucsuer2
= {0,0,0,127,0,0,1,128,0,0,2,129,0,0,3,130};
74 vector
unsigned short vussuer1
= {0,65535,1,65535,2,65535,3,65535};
75 vector
unsigned short vussuer2
= {0,0,0,32767,0,0,1,32768};
77 vucr
= vec_pack (vusa
, vusb
);
78 vscr
= vec_pack (vssa
, vssb
);
79 vbcr
= vec_pack (vbsa
, vbsb
);
80 vusr
= vec_pack (vuia
, vuib
);
81 vssr
= vec_pack (vsia
, vsib
);
82 vbsr
= vec_pack (vbia
, vbib
);
83 vpr
= vec_packpx (vipa
, vipb
);
84 vucsr
= vec_packs (vusc
, vusd
);
85 vscsr
= vec_packs (vssc
, vssd
);
86 vussr
= vec_packs (vuic
, vuid
);
87 vsssr
= vec_packs (vsic
, vsid
);
88 vucsur1
= vec_packsu (vusc
, vusd
);
89 vucsur2
= vec_packsu (vssc
, vssd
);
90 vussur1
= vec_packsu (vuic
, vuid
);
91 vussur2
= vec_packsu (vsic
, vsid
);
93 check (vec_all_eq (vucr
, vucer
), "vucr");
94 check (vec_all_eq (vscr
, vscer
), "vscr");
95 check (vec_all_eq (vbcr
, vbcer
), "vbcr");
96 check (vec_all_eq (vusr
, vuser
), "vusr");
97 check (vec_all_eq (vssr
, vsser
), "vssr");
98 check (vec_all_eq (vbsr
, vbser
), "vbsr");
99 check (vec_all_eq (vpr
, vper
), "vpr" );
100 check (vec_all_eq (vucsr
, vucser
), "vucsr");
101 check (vec_all_eq (vscsr
, vscser
), "vscsr");
102 check (vec_all_eq (vussr
, vusser
), "vussr");
103 check (vec_all_eq (vsssr
, vssser
), "vsssr");
104 check (vec_all_eq (vucsur1
, vucsuer1
), "vucsur1");
105 check (vec_all_eq (vucsur2
, vucsuer2
), "vucsur2");
106 check (vec_all_eq (vussur1
, vussuer1
), "vussur1");
107 check (vec_all_eq (vussur2
, vussuer2
), "vussur2");