+
-
+
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
19#include <initializer_list>
-
-
-
-
-
-
-
26#ifdef SIMDE_X86_SSE4_2_NATIVE
-
-
-
29 (SIMDE_SIDD_UBYTE_OPS | SIMDE_SIDD_CMP_EQUAL_EACH | \
-
30 SIMDE_SIDD_NEGATIVE_POLARITY)
-
-
32 (SIMDE_SIDD_UBYTE_OPS | SIMDE_SIDD_CMP_EQUAL_EACH | \
-
33 SIMDE_SIDD_NEGATIVE_POLARITY | SIMDE_SIDD_MOST_SIGNIFICANT)
-
34#define FIRST_ZERO (SIMDE_SIDD_UBYTE_OPS | SIMDE_SIDD_CMP_EQUAL_ANY)
-
-
36 (SIMDE_SIDD_UBYTE_OPS | SIMDE_SIDD_CMP_EQUAL_ANY | \
-
37 SIMDE_SIDD_MOST_SIGNIFICANT)
-
38#define FIRST_NON_ZERO \
-
39 (SIMDE_SIDD_UBYTE_OPS | SIMDE_SIDD_CMP_EQUAL_ANY | \
-
40 SIMDE_SIDD_MASKED_NEGATIVE_POLARITY)
-
41#define LAST_NON_ZERO \
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
25#include <initializer_list>
+
+
+
+
+
+
+
32#ifdef SIMDE_X86_SSE4_2_NATIVE
+
+
+
35 (SIMDE_SIDD_UBYTE_OPS | SIMDE_SIDD_CMP_EQUAL_EACH | \
+
36 SIMDE_SIDD_NEGATIVE_POLARITY)
+
+
38 (SIMDE_SIDD_UBYTE_OPS | SIMDE_SIDD_CMP_EQUAL_EACH | \
+
39 SIMDE_SIDD_NEGATIVE_POLARITY | SIMDE_SIDD_MOST_SIGNIFICANT)
+
40#define FIRST_ZERO (SIMDE_SIDD_UBYTE_OPS | SIMDE_SIDD_CMP_EQUAL_ANY)
+
42 (SIMDE_SIDD_UBYTE_OPS | SIMDE_SIDD_CMP_EQUAL_ANY | \
-
43 SIMDE_SIDD_MASKED_NEGATIVE_POLARITY | SIMDE_SIDD_MOST_SIGNIFICANT)
-
-
-
-
+
43 SIMDE_SIDD_MOST_SIGNIFICANT)
+
44#define FIRST_NON_ZERO \
+
45 (SIMDE_SIDD_UBYTE_OPS | SIMDE_SIDD_CMP_EQUAL_ANY | \
+
46 SIMDE_SIDD_MASKED_NEGATIVE_POLARITY)
+
47#define LAST_NON_ZERO \
+
48 (SIMDE_SIDD_UBYTE_OPS | SIMDE_SIDD_CMP_EQUAL_ANY | \
+
49 SIMDE_SIDD_MASKED_NEGATIVE_POLARITY | SIMDE_SIDD_MOST_SIGNIFICANT)
+
-
-
-
55 for (uint64_t i = 0; i < 16; i++)
-
56 res[i] = a[b[i] & 0xF];
-
-
-
-
-
-
62 uint64_t
res = simde_mm_movemask_epi8(msk & (
Epu8.id() <
Epu8(bound)));
-
63 return res == 0 ? 16 : (__builtin_ffsll(
res) - 1);
+
+
+
+
+
+
+
61 for (uint64_t i = 0; i < 16; i++)
+
62 res[i] = a[b[i] & 0xF];
+
-
-
66 auto res = simde_mm_movemask_epi8(msk & (
Epu8.id() <
Epu8(bound)));
-
67 return res == 0 ? 16 : (63 - __builtin_clzll(
res));
-
-
-
-
71 for (
size_t i = 0; i < bound; i++)
-
-
-
+
+
+
+
+
69 uint64_t
res = simde_mm_movemask_epi8(msk & (
Epu8.id() <
Epu8(bound)));
+
70 return res == 0 ? 16 : (__builtin_ffsll(
res) - 1);
+
+
+
73 auto res = simde_mm_movemask_epi8(msk & (
Epu8.id() <
Epu8(bound)));
+
74 return res == 0 ? 16 : (63 - __builtin_clzll(
res));
-
76#ifdef SIMDE_X86_SSE4_2_NATIVE
-
77inline uint64_t first_diff_cmpstr(
epu8 a,
epu8 b,
size_t bound)
noexcept {
-
78 return unsigned(_mm_cmpestri(a, bound, b, bound, FIRST_DIFF));
-
-
-
-
-
-
-
-
-
-
88 if (a[bound] != b[bound])
-
-
-
-
-
93#ifdef SIMDE_X86_SSE4_2_NATIVE
-
94inline uint64_t last_diff_cmpstr(
epu8 a,
epu8 b,
size_t bound)
noexcept {
-
95 return unsigned(_mm_cmpestri(a, bound, b, bound, LAST_DIFF));
-
-
-
-
-
-
-
-
-
104 return (diff < 16) && (a[diff] < b[diff]);
-
-
-
-
-
-
110 :
static_cast<int8_t
>(a[diff]) -
static_cast<int8_t
>(b[diff]);
-
-
-
-
-
-
-
+
+
+
78 for (
size_t i = 0; i < bound; i++)
+
+
+
+
+
83#ifdef SIMDE_X86_SSE4_2_NATIVE
+
84inline uint64_t first_diff_cmpstr(
epu8 a,
epu8 b,
size_t bound)
noexcept {
+
85 return unsigned(_mm_cmpestri(a, bound, b, bound, FIRST_DIFF));
+
+
+
+
+
+
+
+
+
+
95 if (a[bound] != b[bound])
+
+
+
+
+
100#ifdef SIMDE_X86_SSE4_2_NATIVE
+
101inline uint64_t last_diff_cmpstr(
epu8 a,
epu8 b,
size_t bound)
noexcept {
+
102 return unsigned(_mm_cmpestri(a, bound, b, bound, LAST_DIFF));
+
+
+
+
+
+
+
+
+
111 return (diff < 16) && (a[diff] < b[diff]);
+
+
+
+
+
+
117 :
static_cast<int8_t
>(a[diff]) -
static_cast<int8_t
>(b[diff]);
-
-
-
-
-
-
-
-
127template <
bool Increasing = true,
size_t sz>
-
-
129 for (
auto round : rounds) {
-
-
131 epu8 mask = Increasing ? round <
Epu8.id() :
Epu8.id() < round;
-
-
-
-
-
-
-
-
140template <
bool Increasing = true,
size_t sz>
-
-
-
143 for (
auto round : rounds) {
-
-
145 epu8 mask = Increasing ? round <
Epu8.id() :
Epu8.id() < round;
-
-
147 epu8 cmp = simde_mm_blendv_epi8(b < v, v < b, mask);
-
148 v = simde_mm_blendv_epi8(v, b, cmp);
-
-
-
-
-
-
-
-
162 {{
epu8{1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14},
-
163 epu8{2, 3, 0, 1, 6, 7, 4, 5, 10, 11, 8, 9, 14, 15, 12, 13},
-
164 epu8{4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15, 8, 9, 10, 11},
-
165 epu8{8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7},
-
166 epu8{0, 2, 1, 12, 8, 10, 9, 11, 4, 6, 5, 7, 3, 14, 13, 15},
-
167 epu8{0, 4, 8, 10, 1, 9, 12, 13, 2, 5, 3, 14, 6, 7, 11, 15},
-
168 epu8{0, 1, 4, 5, 2, 3, 8, 9, 6, 7, 12, 13, 10, 11, 14, 15},
-
169 epu8{0, 1, 2, 6, 4, 8, 3, 10, 5, 12, 7, 11, 9, 13, 14, 15},
-
170 epu8{0, 1, 2, 4, 3, 6, 5, 8, 7, 10, 9, 12, 11, 13, 14, 15}}};
-
-
-
-
-
-
184 epu8 { 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14},
-
185 epu8 { 2, 3, 0, 1, 6, 7, 4, 5, 10, 11, 8, 9, 14, 15, 12, 13},
-
186 epu8 { 0, 2, 1, 3, 4, 6, 5, 7, 8, 10, 9, 11, 12, 14, 13, 15},
-
187 epu8 { 4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15, 8, 9, 10, 11},
-
188 epu8 { 0, 1, 4, 5, 2, 3, 6, 7, 8, 9, 12, 13, 10, 11, 14, 15},
-
189 epu8 { 0, 2, 1, 4, 3, 6, 5, 7, 8, 10, 9, 12, 11, 14, 13, 15}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
134template <
bool Increasing = true,
size_t sz>
+
+
136 for (
auto round : rounds) {
+
+
138 epu8 mask = Increasing ? round <
Epu8.id() :
Epu8.id() < round;
+
+
+
+
+
+
+
+
147template <
bool Increasing = true,
size_t sz>
+
+
+
150 for (
auto round : rounds) {
+
+
152 epu8 mask = Increasing ? round <
Epu8.id() :
Epu8.id() < round;
+
+
154 epu8 cmp = simde_mm_blendv_epi8(b < v, v < b, mask);
+
155 v = simde_mm_blendv_epi8(v, b, cmp);
+
+
+
+
+
+
+
+
169 {{
epu8{1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14},
+
170 epu8{2, 3, 0, 1, 6, 7, 4, 5, 10, 11, 8, 9, 14, 15, 12, 13},
+
171 epu8{4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15, 8, 9, 10, 11},
+
172 epu8{8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7},
+
173 epu8{0, 2, 1, 12, 8, 10, 9, 11, 4, 6, 5, 7, 3, 14, 13, 15},
+
174 epu8{0, 4, 8, 10, 1, 9, 12, 13, 2, 5, 3, 14, 6, 7, 11, 15},
+
175 epu8{0, 1, 4, 5, 2, 3, 8, 9, 6, 7, 12, 13, 10, 11, 14, 15},
+
176 epu8{0, 1, 2, 6, 4, 8, 3, 10, 5, 12, 7, 11, 9, 13, 14, 15},
+
177 epu8{0, 1, 2, 4, 3, 6, 5, 8, 7, 10, 9, 12, 11, 13, 14, 15}}};
+
+
+
+
+
+
191 epu8 { 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14},
+
192 epu8 { 2, 3, 0, 1, 6, 7, 4, 5, 10, 11, 8, 9, 14, 15, 12, 13},
+
193 epu8 { 0, 2, 1, 3, 4, 6, 5, 7, 8, 10, 9, 11, 12, 14, 13, 15},
+
194 epu8 { 4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15, 8, 9, 10, 11},
+
195 epu8 { 0, 1, 4, 5, 2, 3, 6, 7, 8, 9, 12, 13, 10, 11, 14, 15},
+
196 epu8 { 0, 2, 1, 4, 3, 6, 5, 7, 8, 10, 9, 12, 11, 14, 13, 15}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
220 epu8 { 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7},
-
221 epu8 { 4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15, 8, 9, 10, 11},
-
222 epu8 { 2, 3, 0, 1, 6, 7, 4, 5, 10, 11, 8, 9, 14, 15, 12, 13},
-
223 epu8 { 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14},
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
243 static std::random_device rd;
-
244 static std::default_random_engine e1(rd());
-
245 std::uniform_int_distribution<int> uniform_dist(0, bnd - 1);
-
-
247 for (
size_t i = 0; i < 16; i++)
-
248 res[i] = uniform_dist(e1);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
262 epu8 { 0, 1, 2, 3, 8, 9, 10, 11, 4, 5, 6, 7, 12, 13, 14, 15},
-
263 epu8 { 0, 1, 4, 5, 8, 9, 12, 13, 2, 3, 6, 7, 10, 11, 14, 15},
-
264 epu8 { 0, 2, 4, 6, 8, 10, 12, 14, 1, 3, 5, 7, 9, 11, 13, 15}
-
-
-
-
268#ifdef SIMDE_X86_SSE4_2_NATIVE
-
269#define FIND_IN_VECT \
-
270 (SIMDE_SIDD_UBYTE_OPS | SIMDE_SIDD_CMP_EQUAL_ANY | SIMDE_SIDD_UNIT_MASK | \
-
271 SIMDE_SIDD_NEGATIVE_POLARITY)
-
272#define FIND_IN_VECT_COMPL \
-
273 (SIMDE_SIDD_UBYTE_OPS | SIMDE_SIDD_CMP_EQUAL_ANY | SIMDE_SIDD_UNIT_MASK)
-
-
275inline epu8 permutation_of_cmpestrm(
epu8 a,
epu8 b)
noexcept {
-
276 epu8 res = -
static_cast<epu8>(_mm_cmpestrm(a, 8, b, 16, FIND_IN_VECT));
-
-
-
-
280 res -=
static_cast<epu8>(_mm_cmpestrm(a, 8, b, 16, FIND_IN_VECT));
-
-
-
-
-
-
-
-
-
289 for (
size_t i = 0; i < 16; i++) {
-
-
291 std::distance(ar.begin(), std::find(ar.begin(), ar.end(), b[i]));
-
-
-
-
-
296#ifdef SIMDE_X86_SSE4_2_NATIVE
-
297 return permutation_of_cmpestrm(a, b);
-
-
-
-
-
-
-
304#error FF is defined !
-
-
-
-
-
-
-
312 epu8 {
FF, 0,
FF, 2,
FF, 4,
FF, 6,
FF, 8,
FF, 10,
FF, 12,
FF, 14},
-
313 epu8 {
FF,
FF, 1, 1,
FF,
FF, 5, 5,
FF,
FF, 9, 9,
FF,
FF, 13, 13},
-
314 epu8 {
FF,
FF,
FF,
FF, 3, 3, 3, 3,
FF,
FF,
FF,
FF, 11, 11, 11, 11},
-
315 epu8 {
FF,
FF,
FF,
FF,
FF,
FF,
FF,
FF, 7, 7, 7, 7, 7, 7, 7, 7}
-
-
-
-
-
-
-
322 epu8 { 0, 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14},
-
323 epu8 { 0, 1, 1, 1, 4, 5, 5, 5, 8, 9, 9, 9, 12, 13, 13, 13},
-
324 epu8 { 0, 1, 2, 3, 3, 3, 3, 3, 8, 9, 10, 11, 11, 11, 11, 11},
-
325 epu8 { 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7}
-
-
-
-
-
-
-
-
333 for (
size_t i = 0; i < 16; i++)
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
227 epu8 { 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7},
+
228 epu8 { 4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15, 8, 9, 10, 11},
+
229 epu8 { 2, 3, 0, 1, 6, 7, 4, 5, 10, 11, 8, 9, 14, 15, 12, 13},
+
230 epu8 { 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14},
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
251 static std::random_device rd;
+
252 static std::default_random_engine e1(rd());
+
253 std::uniform_int_distribution<int> uniform_dist(0, bnd - 1);
+
+
255 for (
size_t i = 0; i < 16; i++)
+
256 res[i] = uniform_dist(e1);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
270 epu8 { 0, 1, 2, 3, 8, 9, 10, 11, 4, 5, 6, 7, 12, 13, 14, 15},
+
271 epu8 { 0, 1, 4, 5, 8, 9, 12, 13, 2, 3, 6, 7, 10, 11, 14, 15},
+
272 epu8 { 0, 2, 4, 6, 8, 10, 12, 14, 1, 3, 5, 7, 9, 11, 13, 15}
+
+
+
+
276#ifdef SIMDE_X86_SSE4_2_NATIVE
+
277#define FIND_IN_VECT \
+
278 (SIMDE_SIDD_UBYTE_OPS | SIMDE_SIDD_CMP_EQUAL_ANY | SIMDE_SIDD_UNIT_MASK | \
+
279 SIMDE_SIDD_NEGATIVE_POLARITY)
+
280#define FIND_IN_VECT_COMPL \
+
281 (SIMDE_SIDD_UBYTE_OPS | SIMDE_SIDD_CMP_EQUAL_ANY | SIMDE_SIDD_UNIT_MASK)
+
+
283inline epu8 permutation_of_cmpestrm(
epu8 a,
epu8 b)
noexcept {
+
284 epu8 res = -
static_cast<epu8>(_mm_cmpestrm(a, 8, b, 16, FIND_IN_VECT));
+
+
+
+
288 res -=
static_cast<epu8>(_mm_cmpestrm(a, 8, b, 16, FIND_IN_VECT));
+
+
+
+
+
+
+
+
+
297 for (
size_t i = 0; i < 16; i++) {
+
+
299 std::distance(ar.begin(), std::find(ar.begin(), ar.end(), b[i]));
+
+
+
+
+
304#ifdef SIMDE_X86_SSE4_2_NATIVE
+
305 return permutation_of_cmpestrm(a, b);
+
+
+
+
+
+
+
312#error FF is defined !
+
+
+
+
+
+
+
320 epu8 {
FF, 0,
FF, 2,
FF, 4,
FF, 6,
FF, 8,
FF, 10,
FF, 12,
FF, 14},
+
321 epu8 {
FF,
FF, 1, 1,
FF,
FF, 5, 5,
FF,
FF, 9, 9,
FF,
FF, 13, 13},
+
322 epu8 {
FF,
FF,
FF,
FF, 3, 3, 3, 3,
FF,
FF,
FF,
FF, 11, 11, 11, 11},
+
323 epu8 {
FF,
FF,
FF,
FF,
FF,
FF,
FF,
FF, 7, 7, 7, 7, 7, 7, 7, 7}
+
+
+
+
+
+
+
330 epu8 { 0, 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14},
+
331 epu8 { 0, 1, 1, 1, 4, 5, 5, 5, 8, 9, 9, 9, 12, 13, 13, 13},
+
332 epu8 { 0, 1, 2, 3, 3, 3, 3, 3, 8, 9, 10, 11, 11, 11, 11, 11},
+
333 epu8 { 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7}
+
+
+
+
+
+
+
+
341 for (
size_t i = 0; i < 16; i++)
+
+
+
+
+
-
-
-
-
-
352 for (
size_t i = 1; i < 16; i++)
-
353 res[i] =
res[i - 1] + v[i];
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
368 for (
size_t i = 0; i < 16; i++)
-
369 res = std::max(
res, v[i]);
-
-
-
-
-
-
-
-
-
-
-
-
381 return std::max(v[7], v[15]);
+
+
+
+
+
360 for (
size_t i = 1; i < 16; i++)
+
361 res[i] =
res[i - 1] + v[i];
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
376 for (
size_t i = 0; i < 16; i++)
+
377 res = std::max(
res, v[i]);
+
+
+
+
-
-
-
-
-
387 for (
size_t i = 1; i < 16; i++)
-
388 res[i] = std::max(
res[i - 1], v[i]);
-
+
+
+
+
+
+
+
389 return std::max(v[7], v[15]);
-
-
-
-
-
-
-
-
-
-
-
-
-
403 for (
size_t i = 0; i < 16; i++)
-
404 res = std::min(
res, v[i]);
-
-
-
-
-
-
-
-
-
-
-
-
416 return std::min(v[7], v[15]);
+
+
+
+
+
395 for (
size_t i = 1; i < 16; i++)
+
396 res[i] = std::max(
res[i - 1], v[i]);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
411 for (
size_t i = 0; i < 16; i++)
+
412 res = std::min(
res, v[i]);
+
+
+
+
-
-
-
-
-
422 for (
size_t i = 1; i < 16; i++)
-
423 res[i] = std::min(
res[i - 1], v[i]);
-
+
+
+
+
+
+
+
424 return std::min(v[7], v[15]);
-
-
-
-
-
-
-
-
-
-
-
-
-
438 for (
size_t i = 0; i < 16; i++)
-
-
-
+
+
+
+
+
430 for (
size_t i = 1; i < 16; i++)
+
431 res[i] = std::min(
res[i - 1], v[i]);
+
+
+
+
+
+
+
+
+
+
-
-
-
-
447 for (
size_t i = 0; i < 16; i++)
-
-
-
-
-
-
-
-
-
-
457 for (
int i = 1; i < 16; i++) {
-
-
-
-
+
+
+
446 for (
size_t i = 0; i < 16; i++)
+
+
+
+
+
+
+
+
+
455 for (
size_t i = 0; i < 16; i++)
+
+
+
+
+
+
-
-
-
465 for (
size_t i = 0; i < 16; i++) {
-
-
467 __builtin_popcountl(simde_mm_movemask_epi8(v ==
Epu8(uint8_t(i))));
+
+
+
465 for (
int i = 1; i < 16; i++) {
+
+
-
-
-
-
-
-
-
-
-
-
-
481 return (simde_mm_movemask_epi8(v +
Epu8(1) <=
Epu8(0x10)) == 0xffff) &&
-
482 (diff == 16 || diff < k);
+
+
+
473 for (
size_t i = 0; i < 16; i++) {
+
+
475 __builtin_popcountl(simde_mm_movemask_epi8(v ==
Epu8(uint8_t(i))));
+
+
+
+
+
+
+
-
+
-
487 return (simde_mm_movemask_epi8(v <
Epu8(0x10)) == 0xffff) &&
-
488 (diff == 16 || diff < k);
-
-
-
-
-
-
-
-
496 return (simde_mm_movemask_epi8(v +
Epu8(1) <=
Epu8(0x10)) == 0xffff) &&
-
497 (simde_mm_movemask_epi8(
eval16(v) <=
Epu8(1)) == 0xffff) &&
-
498 (diff == 16 || diff < k);
-
-
-
501#ifdef SIMDE_X86_SSE4_2_NATIVE
-
502inline bool is_permutation_cmpestri(
epu8 v,
const size_t k)
noexcept {
-
-
-
-
-
507 return _mm_cmpestri(
Epu8.id(), 16, v, 16, FIRST_NON_ZERO) == 16 &&
-
508 _mm_cmpestri(v, 16,
Epu8.id(), 16, FIRST_NON_ZERO) == 16 &&
-
509 (diff == 16 || diff < k);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
523#ifdef SIMDE_X86_SSE4_2_NATIVE
-
524 return is_permutation_cmpestri(v, k);
-
-
-
+
+
+
489 return (simde_mm_movemask_epi8(v +
Epu8(1) <=
Epu8(0x10)) == 0xffff) &&
+
490 (diff == 16 || diff < k);
+
+
+
+
+
495 return (simde_mm_movemask_epi8(v <
Epu8(0x10)) == 0xffff) &&
+
496 (diff == 16 || diff < k);
+
+
+
+
+
+
+
+
504 return (simde_mm_movemask_epi8(v +
Epu8(1) <=
Epu8(0x10)) == 0xffff) &&
+
505 (simde_mm_movemask_epi8(
eval16(v) <=
Epu8(1)) == 0xffff) &&
+
506 (diff == 16 || diff < k);
+
+
+
509#ifdef SIMDE_X86_SSE4_2_NATIVE
+
510inline bool is_permutation_cmpestri(
epu8 v,
const size_t k)
noexcept {
+
+
+
+
+
515 return _mm_cmpestri(
Epu8.id(), 16, v, 16, FIRST_NON_ZERO) == 16 &&
+
516 _mm_cmpestri(v, 16,
Epu8.id(), 16, FIRST_NON_ZERO) == 16 &&
+
517 (diff == 16 || diff < k);
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
535 stream <<
"{" << std::setw(2) << unsigned(a[0]);
-
536 for (
unsigned i = 1; i < 16; ++i)
-
537 stream <<
"," << std::setw(2) << unsigned(a[i]);
-
-
-
+
+
531#ifdef SIMDE_X86_SSE4_2_NATIVE
+
532 return is_permutation_cmpestri(v, k);
+
+
+
+
+
+
+
+
-
-
543 std::ostringstream ss;
-
-
-
-
-
-
-
-
-
-
-
-
555template <>
struct not_equal_to<
HPCombi::epu8> {
-
-
-
-
-
-
-
-
-
564 unsigned __int128 v0 = simde_mm_extract_epi64(a, 0);
-
565 unsigned __int128 v1 = simde_mm_extract_epi64(a, 1);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
584 simde__m128 v1v = simde__m128(v1), v2v = simde__m128(v2);
-
585 return v1v[0] == v2v[0] ? v1v[1] < v2v[1] : v1v[0] < v2v[0];
-
-
-
-
-
#define FF
Definition bmat8_impl.hpp:240
-
std::array< std::tuple< uint16_t, uint16_t, std::array< uint16_t, gens.size()> >, 65536 > res
Definition image.cpp:62
-
-
uint8_t horiz_min4(epu8) noexcept
Horizontal sum of a HPCombi::epu8.
Definition epu8_impl.hpp:410
-
epu8 max(epu8 a, epu8 b) noexcept
Vector max between two HPCombi::epu8 0.
Definition epu8.hpp:89
-
uint64_t last_diff_ref(epu8 a, epu8 b, size_t bound=16) noexcept
The last difference between two HPCombi::epu8.
Definition epu8_impl.hpp:85
-
uint64_t first_non_zero(epu8 v, int bnd) noexcept
return the index of the first non zero entry or 16 if there are none Only index smaller than bound ar...
Definition epu8_impl.hpp:119
-
uint8_t horiz_min_ref(epu8) noexcept
Horizontal sum of a HPCombi::epu8.
Definition epu8_impl.hpp:401
-
epu8 eval16_arr(epu8 v) noexcept
Evaluation of a HPCombi::epu8.
Definition epu8_impl.hpp:444
-
epu8 permuted(epu8 a, epu8 b) noexcept
Permuting a HPCombi::epu8.
Definition epu8.hpp:70
-
epu8 sort8_perm(epu8 &a) noexcept
Sort this and return the sorting permutation.
Definition epu8_impl.hpp:212
-
epu8 shifted_right(epu8 a) noexcept
Left shifted of a HPCombi::epu8 inserting a 0.
Definition epu8.hpp:76
-
uint64_t first_diff_ref(epu8 a, epu8 b, size_t bound=16) noexcept
The first difference between two HPCombi::epu8.
Definition epu8_impl.hpp:70
-
uint64_t first_diff_mask(epu8 a, epu8 b, size_t bound=16) noexcept
The first difference between two HPCombi::epu8.
Definition epu8_impl.hpp:81
-
epu8 partial_sums_ref(epu8) noexcept
Horizontal partial sum of a HPCombi::epu8.
Definition epu8_impl.hpp:349
-
epu8 eval16_gen(epu8 v) noexcept
Definition epu8_impl.hpp:452
-
epu8 network_sort(epu8 res, std::array< epu8, sz > rounds)
Apply a sorting network.
Definition epu8_impl.hpp:128
-
epu8 remove_dups(epu8 a, uint8_t repl=0) noexcept
Remove duplicates in a sorted HPCombi::epu8.
Definition epu8_impl.hpp:252
-
epu8 revsorted8(epu8 a) noexcept
Return a HPCombi::epu8 with the two half reverse sorted.
Definition epu8_impl.hpp:205
-
epu8 permutation_of(epu8 a, epu8 b) noexcept
Find if a vector is a permutation of one other.
Definition epu8_impl.hpp:295
-
bool is_permutation(epu8 v, const size_t k=16) noexcept
Definition epu8_impl.hpp:522
-
void merge_rev(epu8 &a, epu8 &b) noexcept
Definition epu8_impl.hpp:226
-
constexpr std::array< epu8, 4 > summing_rounds
Permutation Round for partial and horizontal sums.
Definition epu8_impl.hpp:309
-
int8_t less_partial(epu8 a, epu8 b, int k) noexcept
Partial lexicographic comparison between two HPCombi::epu8.
Definition epu8_impl.hpp:106
-
uint8_t horiz_max4(epu8) noexcept
Horizontal sum of a HPCombi::epu8.
Definition epu8_impl.hpp:375
-
uint64_t last_diff_mask(epu8 a, epu8 b, size_t bound=16) noexcept
The last difference between two HPCombi::epu8.
Definition epu8_impl.hpp:98
-
uint8_t horiz_max3(epu8) noexcept
Horizontal sum of a HPCombi::epu8.
Definition epu8_impl.hpp:376
-
constexpr uint64_t prime
A prime number good for hashing.
Definition epu8.hpp:162
-
uint8_t horiz_min_gen(epu8) noexcept
Horizontal sum of a HPCombi::epu8.
Definition epu8_impl.hpp:407
-
bool is_partial_permutation(epu8 v, const size_t k=16) noexcept
Test for partial permutations.
Definition epu8_impl.hpp:491
-
bool is_permutation_sort(epu8 v, const size_t k=16) noexcept
Definition epu8_impl.hpp:513
-
uint64_t last_zero(epu8 v, int bnd) noexcept
return the index of the last zero entry or 16 if there are none Only index smaller than bound are tak...
Definition epu8_impl.hpp:116
-
void merge(epu8 &a, epu8 &b) noexcept
Merge two sorted epu8.
Definition epu8_impl.hpp:233
-
uint8_t horiz_sum4(epu8) noexcept
Horizontal sum of a HPCombi::epu8.
Definition epu8_impl.hpp:340
-
epu8 popcount16(epu8 v) noexcept
a vector popcount function
Definition epu8_impl.hpp:472
-
epu8 partial_sums_round(epu8) noexcept
Horizontal partial sum of a HPCombi::epu8.
Definition epu8_impl.hpp:360
-
uint8_t horiz_sum3(epu8) noexcept
Horizontal sum of a HPCombi::epu8.
Definition epu8_impl.hpp:341
-
uint8_t horiz_sum_ref(epu8) noexcept
Horizontal sum of a HPCombi::epu8.
Definition epu8_impl.hpp:331
-
epu8 partial_sums_gen(epu8) noexcept
Horizontal partial sum of a HPCombi::epu8.
Definition epu8_impl.hpp:356
-
bool equal(epu8 a, epu8 b) noexcept
Equality of HPCombi::epu8.
Definition epu8.hpp:61
-
epu8 permutation_of_ref(epu8 a, epu8 b) noexcept
Find if a vector is a permutation of one other.
Definition epu8_impl.hpp:286
-
epu8 min(epu8 a, epu8 b) noexcept
Vector min between two HPCombi::epu8 0.
Definition epu8.hpp:87
-
uint64_t first_mask(epu8 msk, size_t bound)
Definition epu8_impl.hpp:61
-
epu8 partial_max_ref(epu8) noexcept
Horizontal partial sum of a HPCombi::epu8.
Definition epu8_impl.hpp:384
-
epu8 sorted8(epu8 a) noexcept
Return a HPCombi::epu8 with the two half sorted.
Definition epu8_impl.hpp:199
-
epu8 partial_max_round(epu8) noexcept
Horizontal partial sum of a HPCombi::epu8.
Definition epu8_impl.hpp:395
-
epu8 eval16(epu8 v) noexcept
Evaluation of a HPCombi::epu8.
Definition epu8.hpp:406
-
epu8 network_sort_perm(epu8 &v, std::array< epu8, sz > rounds)
Apply a sorting network in place and return the permutation.
Definition epu8_impl.hpp:141
-
constexpr std::array< epu8, 6 > sorting_rounds8
A duplicated 8-way sorting network.
Definition epu8_impl.hpp:183
-
epu8 eval16_cycle(epu8 v) noexcept
Evaluation of a HPCombi::epu8.
Definition epu8_impl.hpp:455
-
constexpr std::array< epu8, 9 > sorting_rounds
A 16-way sorting network.
Definition epu8_impl.hpp:162
-
epu8 eval16_ref(epu8 v) noexcept
Evaluation of a HPCombi::epu8.
Definition epu8_impl.hpp:436
-
epu8 partial_max_gen(epu8) noexcept
Horizontal partial sum of a HPCombi::epu8.
Definition epu8_impl.hpp:391
-
bool less(epu8 a, epu8 b) noexcept
Lexicographic comparison between two HPCombi::epu8.
Definition epu8_impl.hpp:102
-
uint8_t horiz_max_ref(epu8) noexcept
Horizontal sum of a HPCombi::epu8.
Definition epu8_impl.hpp:366
-
epu8 sorted(epu8 a) noexcept
Return a sorted HPCombi::epu8.
Definition epu8_impl.hpp:196
-
uint64_t last_mask(epu8 msk, size_t bound)
Definition epu8_impl.hpp:65
-
constexpr std::array< epu8, 4 > mining_rounds
Definition epu8_impl.hpp:319
-
constexpr TPUBuild< epu8 > Epu8
Factory object acting as a class constructor for type HPCombi::epu8.
Definition epu8.hpp:50
-
bool is_permutation_eval(epu8 v, const size_t k=16) noexcept
Definition epu8_impl.hpp:517
-
VectGeneric< TPUBuild< TPU >::size > & as_VectGeneric(TPU &v)
Cast a HPCombi::epu8 to a c++ HPCombi::VectGeneric.
Definition builder.hpp:151
-
uint64_t first_zero(epu8 v, int bnd) noexcept
return the index of the first zero entry or 16 if there are none Only index smaller than bound are ta...
Definition epu8_impl.hpp:113
-
epu8 random_epu8(uint16_t bnd)
A random HPCombi::epu8.
Definition epu8_impl.hpp:240
-
epu8 revsorted(epu8 a) noexcept
Return a reverse sorted HPCombi::epu8.
Definition epu8_impl.hpp:202
-
epu8 partial_min_round(epu8) noexcept
Horizontal partial sum of a HPCombi::epu8.
Definition epu8_impl.hpp:430
-
bool is_sorted(epu8 a) noexcept
Testing if a HPCombi::epu8 is sorted.
Definition epu8_impl.hpp:193
-
uint8_t __attribute__((vector_size(16))) epu8
SIMD vector of 16 unsigned bytes.
Definition epu8.hpp:41
-
constexpr std::array< epu8, 3 > inverting_rounds
Definition epu8_impl.hpp:259
-
uint64_t last_non_zero(epu8 v, int bnd) noexcept
return the index of the last non zero entry or 16 if there are none Only index smaller than bound are...
Definition epu8_impl.hpp:122
-
uint64_t last_diff(epu8 a, epu8 b, size_t bound=16) noexcept
The last difference between two HPCombi::epu8.
Definition epu8.hpp:484
-
epu8 eval16_popcount(epu8 v) noexcept
Evaluation of a HPCombi::epu8.
Definition epu8_impl.hpp:463
-
epu8 sort_perm(epu8 &a) noexcept
Sort this and return the sorting permutation.
Definition epu8_impl.hpp:209
-
epu8 partial_min_gen(epu8) noexcept
Horizontal partial sum of a HPCombi::epu8.
Definition epu8_impl.hpp:426
-
epu8 partial_min_ref(epu8) noexcept
Horizontal partial sum of a HPCombi::epu8.
Definition epu8_impl.hpp:419
-
uint8_t horiz_max_gen(epu8) noexcept
Horizontal sum of a HPCombi::epu8.
Definition epu8_impl.hpp:372
-
bool is_transformation(epu8 v, const size_t k=16) noexcept
Test for transformation.
Definition epu8_impl.hpp:485
-
uint64_t first_diff(epu8 a, epu8 b, size_t bound=16) noexcept
The first difference between two HPCombi::epu8.
Definition epu8.hpp:444
-
bool is_partial_transformation(epu8 v, const size_t k=16) noexcept
Test for partial transformation.
Definition epu8_impl.hpp:477
-
epu8 permuted_ref(epu8 a, epu8 b) noexcept
Permuting a HPCombi::epu8.
Definition epu8_impl.hpp:53
-
constexpr std::array< epu8, 6 > merge_rounds
Definition epu8_impl.hpp:219
-
TPUBuild< TPU >::array & as_array(TPU &v) noexcept
Cast a TPU to a c++ std::array.
Definition builder.hpp:134
-
uint8_t horiz_sum_gen(epu8) noexcept
Horizontal sum of a HPCombi::epu8.
Definition epu8_impl.hpp:337
-
uint8_t horiz_min3(epu8) noexcept
Horizontal sum of a HPCombi::epu8.
Definition epu8_impl.hpp:411
-
bool not_equal(epu8 a, epu8 b) noexcept
Non equality of HPCombi::epu8.
Definition epu8.hpp:65
-
-
std::ostream & operator<<(std::ostream &os, HPCombi::BMat8 const &bm)
Definition bmat8_impl.hpp:500
-
std::string to_string(HPCombi::epu8 const &a)
Definition epu8_impl.hpp:542
-
bool operator()(const HPCombi::epu8 &lhs, const HPCombi::epu8 &rhs) const noexcept
Definition epu8_impl.hpp:549
-
size_t operator()(HPCombi::epu8 a) const noexcept
Definition epu8_impl.hpp:563
-
size_t operator()(const HPCombi::epu8 &v1, const HPCombi::epu8 &v2) const noexcept
Definition epu8_impl.hpp:582
-
bool operator()(const HPCombi::epu8 &lhs, const HPCombi::epu8 &rhs) const noexcept
Definition epu8_impl.hpp:556
+
+
543 stream <<
"{" << std::setw(2) << unsigned(a[0]);
+
544 for (
unsigned i = 1; i < 16; ++i)
+
545 stream <<
"," << std::setw(2) << unsigned(a[i]);
+
+
+
+
+
+
551 std::ostringstream ss;
+
+
+
+
+
+
+
+
+
+
+
+
563template <>
struct not_equal_to<
HPCombi::epu8> {
+
+
+
+
+
+
+
+
+
572 unsigned __int128 v0 = simde_mm_extract_epi64(a, 0);
+
573 unsigned __int128 v1 = simde_mm_extract_epi64(a, 1);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
592 simde__m128 v1v = simde__m128(v1), v2v = simde__m128(v2);
+
593 return v1v[0] == v2v[0] ? v1v[1] < v2v[1] : v1v[0] < v2v[0];
+
+
+
+
+
#define FF
Definition bmat8_impl.hpp:246
+
std::array< std::tuple< uint16_t, uint16_t, std::array< uint16_t, gens.size()> >, 65536 > res
Definition image.cpp:66
+
+
uint8_t horiz_min4(epu8) noexcept
Horizontal sum of a HPCombi::epu8.
Definition epu8_impl.hpp:418
+
epu8 max(epu8 a, epu8 b) noexcept
Vector max between two HPCombi::epu8 0.
Definition epu8.hpp:91
+
uint64_t last_diff_ref(epu8 a, epu8 b, size_t bound=16) noexcept
The last difference between two HPCombi::epu8.
Definition epu8_impl.hpp:92
+
uint64_t first_non_zero(epu8 v, int bnd) noexcept
return the index of the first non zero entry or 16 if there are none Only index smaller than bound ar...
Definition epu8_impl.hpp:126
+
uint8_t horiz_min_ref(epu8) noexcept
Horizontal sum of a HPCombi::epu8.
Definition epu8_impl.hpp:409
+
epu8 eval16_arr(epu8 v) noexcept
Evaluation of a HPCombi::epu8.
Definition epu8_impl.hpp:452
+
epu8 permuted(epu8 a, epu8 b) noexcept
Permuting a HPCombi::epu8.
Definition epu8.hpp:72
+
epu8 sort8_perm(epu8 &a) noexcept
Sort this and return the sorting permutation.
Definition epu8_impl.hpp:219
+
epu8 shifted_right(epu8 a) noexcept
Left shifted of a HPCombi::epu8 inserting a 0.
Definition epu8.hpp:78
+
uint64_t first_diff_ref(epu8 a, epu8 b, size_t bound=16) noexcept
The first difference between two HPCombi::epu8.
Definition epu8_impl.hpp:77
+
uint64_t first_diff_mask(epu8 a, epu8 b, size_t bound=16) noexcept
The first difference between two HPCombi::epu8.
Definition epu8_impl.hpp:88
+
epu8 partial_sums_ref(epu8) noexcept
Horizontal partial sum of a HPCombi::epu8.
Definition epu8_impl.hpp:357
+
epu8 eval16_gen(epu8 v) noexcept
Definition epu8_impl.hpp:460
+
epu8 network_sort(epu8 res, std::array< epu8, sz > rounds)
Apply a sorting network.
Definition epu8_impl.hpp:135
+
epu8 remove_dups(epu8 a, uint8_t repl=0) noexcept
Remove duplicates in a sorted HPCombi::epu8.
Definition epu8_impl.hpp:260
+
epu8 revsorted8(epu8 a) noexcept
Return a HPCombi::epu8 with the two half reverse sorted.
Definition epu8_impl.hpp:212
+
epu8 permutation_of(epu8 a, epu8 b) noexcept
Find if a vector is a permutation of one other.
Definition epu8_impl.hpp:303
+
bool is_permutation(epu8 v, const size_t k=16) noexcept
Definition epu8_impl.hpp:530
+
void merge_rev(epu8 &a, epu8 &b) noexcept
Definition epu8_impl.hpp:233
+
constexpr std::array< epu8, 4 > summing_rounds
Permutation Round for partial and horizontal sums.
Definition epu8_impl.hpp:317
+
int8_t less_partial(epu8 a, epu8 b, int k) noexcept
Partial lexicographic comparison between two HPCombi::epu8.
Definition epu8_impl.hpp:113
+
uint8_t horiz_max4(epu8) noexcept
Horizontal sum of a HPCombi::epu8.
Definition epu8_impl.hpp:383
+
uint64_t last_diff_mask(epu8 a, epu8 b, size_t bound=16) noexcept
The last difference between two HPCombi::epu8.
Definition epu8_impl.hpp:105
+
uint8_t horiz_max3(epu8) noexcept
Horizontal sum of a HPCombi::epu8.
Definition epu8_impl.hpp:384
+
constexpr uint64_t prime
A prime number good for hashing.
Definition epu8.hpp:164
+
uint8_t horiz_min_gen(epu8) noexcept
Horizontal sum of a HPCombi::epu8.
Definition epu8_impl.hpp:415
+
bool is_partial_permutation(epu8 v, const size_t k=16) noexcept
Test for partial permutations.
Definition epu8_impl.hpp:499
+
bool is_permutation_sort(epu8 v, const size_t k=16) noexcept
Definition epu8_impl.hpp:521
+
uint64_t last_zero(epu8 v, int bnd) noexcept
return the index of the last zero entry or 16 if there are none Only index smaller than bound are tak...
Definition epu8_impl.hpp:123
+
void merge(epu8 &a, epu8 &b) noexcept
Merge two sorted epu8.
Definition epu8_impl.hpp:240
+
uint8_t horiz_sum4(epu8) noexcept
Horizontal sum of a HPCombi::epu8.
Definition epu8_impl.hpp:348
+
epu8 popcount16(epu8 v) noexcept
a vector popcount function
Definition epu8_impl.hpp:480
+
epu8 partial_sums_round(epu8) noexcept
Horizontal partial sum of a HPCombi::epu8.
Definition epu8_impl.hpp:368
+
uint8_t horiz_sum3(epu8) noexcept
Horizontal sum of a HPCombi::epu8.
Definition epu8_impl.hpp:349
+
uint8_t horiz_sum_ref(epu8) noexcept
Horizontal sum of a HPCombi::epu8.
Definition epu8_impl.hpp:339
+
epu8 partial_sums_gen(epu8) noexcept
Horizontal partial sum of a HPCombi::epu8.
Definition epu8_impl.hpp:364
+
bool equal(epu8 a, epu8 b) noexcept
Equality of HPCombi::epu8.
Definition epu8.hpp:63
+
epu8 permutation_of_ref(epu8 a, epu8 b) noexcept
Find if a vector is a permutation of one other.
Definition epu8_impl.hpp:294
+
epu8 min(epu8 a, epu8 b) noexcept
Vector min between two HPCombi::epu8 0.
Definition epu8.hpp:89
+
uint64_t first_mask(epu8 msk, size_t bound)
Definition epu8_impl.hpp:68
+
epu8 partial_max_ref(epu8) noexcept
Horizontal partial sum of a HPCombi::epu8.
Definition epu8_impl.hpp:392
+
epu8 sorted8(epu8 a) noexcept
Return a HPCombi::epu8 with the two half sorted.
Definition epu8_impl.hpp:206
+
epu8 partial_max_round(epu8) noexcept
Horizontal partial sum of a HPCombi::epu8.
Definition epu8_impl.hpp:403
+
epu8 eval16(epu8 v) noexcept
Evaluation of a HPCombi::epu8.
Definition epu8.hpp:408
+
epu8 network_sort_perm(epu8 &v, std::array< epu8, sz > rounds)
Apply a sorting network in place and return the permutation.
Definition epu8_impl.hpp:148
+
constexpr std::array< epu8, 6 > sorting_rounds8
A duplicated 8-way sorting network.
Definition epu8_impl.hpp:190
+
epu8 eval16_cycle(epu8 v) noexcept
Evaluation of a HPCombi::epu8.
Definition epu8_impl.hpp:463
+
constexpr std::array< epu8, 9 > sorting_rounds
A 16-way sorting network.
Definition epu8_impl.hpp:169
+
epu8 eval16_ref(epu8 v) noexcept
Evaluation of a HPCombi::epu8.
Definition epu8_impl.hpp:444
+
epu8 partial_max_gen(epu8) noexcept
Horizontal partial sum of a HPCombi::epu8.
Definition epu8_impl.hpp:399
+
bool less(epu8 a, epu8 b) noexcept
Lexicographic comparison between two HPCombi::epu8.
Definition epu8_impl.hpp:109
+
uint8_t horiz_max_ref(epu8) noexcept
Horizontal sum of a HPCombi::epu8.
Definition epu8_impl.hpp:374
+
epu8 sorted(epu8 a) noexcept
Return a sorted HPCombi::epu8.
Definition epu8_impl.hpp:203
+
uint64_t last_mask(epu8 msk, size_t bound)
Definition epu8_impl.hpp:72
+
constexpr std::array< epu8, 4 > mining_rounds
Definition epu8_impl.hpp:327
+
constexpr TPUBuild< epu8 > Epu8
Factory object acting as a class constructor for type HPCombi::epu8.
Definition epu8.hpp:53
+
bool is_permutation_eval(epu8 v, const size_t k=16) noexcept
Definition epu8_impl.hpp:525
+
VectGeneric< TPUBuild< TPU >::size > & as_VectGeneric(TPU &v)
Cast a HPCombi::epu8 to a c++ HPCombi::VectGeneric.
Definition builder.hpp:156
+
uint64_t first_zero(epu8 v, int bnd) noexcept
return the index of the first zero entry or 16 if there are none Only index smaller than bound are ta...
Definition epu8_impl.hpp:120
+
epu8 random_epu8(uint16_t bnd)
A random HPCombi::epu8.
Definition epu8_impl.hpp:248
+
epu8 revsorted(epu8 a) noexcept
Return a reverse sorted HPCombi::epu8.
Definition epu8_impl.hpp:209
+
epu8 partial_min_round(epu8) noexcept
Horizontal partial sum of a HPCombi::epu8.
Definition epu8_impl.hpp:438
+
bool is_sorted(epu8 a) noexcept
Testing if a HPCombi::epu8 is sorted.
Definition epu8_impl.hpp:200
+
uint8_t __attribute__((vector_size(16))) epu8
SIMD vector of 16 unsigned bytes.
Definition epu8.hpp:45
+
constexpr std::array< epu8, 3 > inverting_rounds
Definition epu8_impl.hpp:267
+
uint64_t last_non_zero(epu8 v, int bnd) noexcept
return the index of the last non zero entry or 16 if there are none Only index smaller than bound are...
Definition epu8_impl.hpp:129
+
uint64_t last_diff(epu8 a, epu8 b, size_t bound=16) noexcept
The last difference between two HPCombi::epu8.
Definition epu8.hpp:486
+
epu8 eval16_popcount(epu8 v) noexcept
Evaluation of a HPCombi::epu8.
Definition epu8_impl.hpp:471
+
epu8 sort_perm(epu8 &a) noexcept
Sort this and return the sorting permutation.
Definition epu8_impl.hpp:216
+
epu8 partial_min_gen(epu8) noexcept
Horizontal partial sum of a HPCombi::epu8.
Definition epu8_impl.hpp:434
+
epu8 partial_min_ref(epu8) noexcept
Horizontal partial sum of a HPCombi::epu8.
Definition epu8_impl.hpp:427
+
uint8_t horiz_max_gen(epu8) noexcept
Horizontal sum of a HPCombi::epu8.
Definition epu8_impl.hpp:380
+
bool is_transformation(epu8 v, const size_t k=16) noexcept
Test for transformation.
Definition epu8_impl.hpp:493
+
uint64_t first_diff(epu8 a, epu8 b, size_t bound=16) noexcept
The first difference between two HPCombi::epu8.
Definition epu8.hpp:446
+
bool is_partial_transformation(epu8 v, const size_t k=16) noexcept
Test for partial transformation.
Definition epu8_impl.hpp:485
+
epu8 permuted_ref(epu8 a, epu8 b) noexcept
Permuting a HPCombi::epu8.
Definition epu8_impl.hpp:59
+
constexpr std::array< epu8, 6 > merge_rounds
Definition epu8_impl.hpp:226
+
TPUBuild< TPU >::array & as_array(TPU &v) noexcept
Cast a TPU to a c++ std::array.
Definition builder.hpp:139
+
uint8_t horiz_sum_gen(epu8) noexcept
Horizontal sum of a HPCombi::epu8.
Definition epu8_impl.hpp:345
+
uint8_t horiz_min3(epu8) noexcept
Horizontal sum of a HPCombi::epu8.
Definition epu8_impl.hpp:419
+
bool not_equal(epu8 a, epu8 b) noexcept
Non equality of HPCombi::epu8.
Definition epu8.hpp:67
+
+
std::ostream & operator<<(std::ostream &os, HPCombi::BMat8 const &bm)
Definition bmat8_impl.hpp:508
+
std::string to_string(HPCombi::epu8 const &a)
Definition epu8_impl.hpp:550
+
bool operator()(const HPCombi::epu8 &lhs, const HPCombi::epu8 &rhs) const noexcept
Definition epu8_impl.hpp:557
+
size_t operator()(HPCombi::epu8 a) const noexcept
Definition epu8_impl.hpp:571
+
size_t operator()(const HPCombi::epu8 &v1, const HPCombi::epu8 &v2) const noexcept
Definition epu8_impl.hpp:590
+
bool operator()(const HPCombi::epu8 &lhs, const HPCombi::epu8 &rhs) const noexcept
Definition epu8_impl.hpp:564