1 typedef int *__restrict__ pRINT;
2 typedef unsigned int *__restrict__ pRUINT;
3 typedef long long *__restrict__ pRINT64;
4 typedef unsigned long long *__restrict__ pRUINT64;
6 void test_orn (pRUINT a, pRUINT b, pRUINT c)
9 for (i = 0; i < 16; i++)
10 c[i] = a[i] | (~b[i]);
13 void test_bic (pRUINT a, pRUINT b, pRUINT c)
16 for (i = 0; i < 16; i++)
17 c[i] = a[i] & (~b[i]);
20 void mla (pRINT a, pRINT b, pRINT c)
27 void mls (pRINT a, pRINT b, pRINT c)
34 void smax (pRINT a, pRINT b, pRINT c)
38 c[i] = (a[i] > b[i] ? a[i] : b[i]);
41 void smin (pRINT a, pRINT b, pRINT c)
45 c[i] = (a[i] < b[i] ? a[i] : b[i]);
48 void umax (pRUINT a, pRUINT b, pRUINT c)
52 c[i] = (a[i] > b[i] ? a[i] : b[i]);
55 void umin (pRUINT a, pRUINT b, pRUINT c)
59 c[i] = (a[i] < b[i] ? a[i] : b[i]);
62 unsigned int reduce_umax (pRUINT a)
65 unsigned int s = a[0];
66 for (i = 1; i < 16; i++)
67 s = (s > a[i] ? s : a[i]);
72 unsigned int reduce_umin (pRUINT a)
75 unsigned int s = a[0];
76 for (i = 1; i < 16; i++)
77 s = (s < a[i] ? s : a[i]);
82 int reduce_smax (pRINT a)
86 for (i = 1; i < 16; i++)
87 s = (s > a[i] ? s : a[i]);
92 int reduce_smin (pRINT a)
96 for (i = 1; i < 16; i++)
97 s = (s < a[i] ? s : a[i]);
102 unsigned int reduce_add_u32 (pRINT a)
106 for (i = 0; i < 16; i++)
112 int reduce_add_s32 (pRINT a)
116 for (i = 0; i < 16; i++)
122 unsigned long long reduce_add_u64 (pRUINT64 a)
125 unsigned long long s = 0;
126 for (i = 0; i < 16; i++)
132 long long reduce_add_s64 (pRINT64 a)
136 for (i = 0; i < 16; i++)
142 void sabd (pRINT a, pRINT b, pRINT c)
145 for (i = 0; i < 16; i++)
146 c[i] = abs (a[i] - b[i]);
149 void saba (pRINT a, pRINT b, pRINT c)
152 for (i = 0; i < 16; i++)
153 c[i] += abs (a[i] - b[i]);