2 * Authors.....: Jens Steube <jens.steube@gmail.com>
3 * magnum <john.magnum@hushmail.com>
12 #define MATCHES_ONE_VV(a,b) ((a) == (b))
13 #define MATCHES_ONE_VS(a,b) ((a) == (b))
15 #define COMPARE_S_SIMD(h0,h1,h2,h3) \
17 if (((h0) == search[0]) && ((h1) == search[1]) && ((h2) == search[2]) && ((h3) == search[3])) \
19 const u32 final_hash_pos = digests_offset + 0; \
21 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
23 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos); \
25 d_return_buf[lid] = 1; \
30 #define COMPARE_M_SIMD(h0,h1,h2,h3) \
32 const u32 digest_tp0[4] = { h0, h1, h2, h3 }; \
34 if (check (digest_tp0, \
35 bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, \
36 bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, \
41 int hash_pos = find_hash (digest_tp0, digests_cnt, &digests_buf[digests_offset]); \
45 const u32 final_hash_pos = digests_offset + hash_pos; \
47 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
49 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos); \
51 d_return_buf[lid] = 1; \
63 #define MATCHES_ONE_VV(a,b) (((a).s0 == (b).s0) || ((a).s1 == (b).s1))
64 #define MATCHES_ONE_VS(a,b) (((a).s0 == (b) ) || ((a).s1 == (b) ))
66 #define COMPARE_S_SIMD(h0,h1,h2,h3) \
68 if (((h0).s0 == search[0]) && ((h1).s0 == search[1]) && ((h2).s0 == search[2]) && ((h3).s0 == search[3])) \
70 const u32 final_hash_pos = digests_offset + 0; \
72 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
74 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 0); \
76 d_return_buf[lid] = 1; \
80 if (((h0).s1 == search[0]) && ((h1).s1 == search[1]) && ((h2).s1 == search[2]) && ((h3).s1 == search[3])) \
82 const u32 final_hash_pos = digests_offset + 0; \
84 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
86 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 1); \
88 d_return_buf[lid] = 1; \
93 #define COMPARE_M_SIMD(h0,h1,h2,h3) \
95 const u32 digest_tp0[4] = { h0.s0, h1.s0, h2.s0, h3.s0 }; \
96 const u32 digest_tp1[4] = { h0.s1, h1.s1, h2.s1, h3.s1 }; \
98 if (check (digest_tp0, \
99 bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, \
100 bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, \
105 int hash_pos = find_hash (digest_tp0, digests_cnt, &digests_buf[digests_offset]); \
107 if (hash_pos != -1) \
109 const u32 final_hash_pos = digests_offset + hash_pos; \
111 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
113 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 0); \
115 d_return_buf[lid] = 1; \
120 if (check (digest_tp1, \
121 bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, \
122 bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, \
127 int hash_pos = find_hash (digest_tp1, digests_cnt, &digests_buf[digests_offset]); \
129 if (hash_pos != -1) \
131 const u32 final_hash_pos = digests_offset + hash_pos; \
133 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
135 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 1); \
137 d_return_buf[lid] = 1; \
149 #define MATCHES_ONE_VV(a,b) (((a).s0 == (b).s0) || ((a).s1 == (b).s1) || ((a).s2 == (b).s2) || ((a).s3 == (b).s3))
150 #define MATCHES_ONE_VS(a,b) (((a).s0 == (b) ) || ((a).s1 == (b) ) || ((a).s2 == (b) ) || ((a).s3 == (b) ))
152 #define COMPARE_S_SIMD(h0,h1,h2,h3) \
154 if (((h0).s0 == search[0]) && ((h1).s0 == search[1]) && ((h2).s0 == search[2]) && ((h3).s0 == search[3])) \
156 const u32 final_hash_pos = digests_offset + 0; \
158 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
160 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 0); \
162 d_return_buf[lid] = 1; \
166 if (((h0).s1 == search[0]) && ((h1).s1 == search[1]) && ((h2).s1 == search[2]) && ((h3).s1 == search[3])) \
168 const u32 final_hash_pos = digests_offset + 0; \
170 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
172 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 1); \
174 d_return_buf[lid] = 1; \
178 if (((h0).s2 == search[0]) && ((h1).s2 == search[1]) && ((h2).s2 == search[2]) && ((h3).s2 == search[3])) \
180 const u32 final_hash_pos = digests_offset + 0; \
182 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
184 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 2); \
186 d_return_buf[lid] = 1; \
190 if (((h0).s3 == search[0]) && ((h1).s3 == search[1]) && ((h2).s3 == search[2]) && ((h3).s3 == search[3])) \
192 const u32 final_hash_pos = digests_offset + 0; \
194 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
196 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 3); \
198 d_return_buf[lid] = 1; \
203 #define COMPARE_M_SIMD(h0,h1,h2,h3) \
205 const u32 digest_tp0[4] = { h0.s0, h1.s0, h2.s0, h3.s0 }; \
206 const u32 digest_tp1[4] = { h0.s1, h1.s1, h2.s1, h3.s1 }; \
207 const u32 digest_tp2[4] = { h0.s2, h1.s2, h2.s2, h3.s2 }; \
208 const u32 digest_tp3[4] = { h0.s3, h1.s3, h2.s3, h3.s3 }; \
210 if (check (digest_tp0, \
211 bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, \
212 bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, \
217 int hash_pos = find_hash (digest_tp0, digests_cnt, &digests_buf[digests_offset]); \
219 if (hash_pos != -1) \
221 const u32 final_hash_pos = digests_offset + hash_pos; \
223 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
225 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 0); \
227 d_return_buf[lid] = 1; \
232 if (check (digest_tp1, \
233 bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, \
234 bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, \
239 int hash_pos = find_hash (digest_tp1, digests_cnt, &digests_buf[digests_offset]); \
241 if (hash_pos != -1) \
243 const u32 final_hash_pos = digests_offset + hash_pos; \
245 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
247 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 1); \
249 d_return_buf[lid] = 1; \
254 if (check (digest_tp2, \
255 bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, \
256 bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, \
261 int hash_pos = find_hash (digest_tp2, digests_cnt, &digests_buf[digests_offset]); \
263 if (hash_pos != -1) \
265 const u32 final_hash_pos = digests_offset + hash_pos; \
267 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
269 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 2); \
271 d_return_buf[lid] = 1; \
276 if (check (digest_tp3, \
277 bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, \
278 bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, \
283 int hash_pos = find_hash (digest_tp3, digests_cnt, &digests_buf[digests_offset]); \
285 if (hash_pos != -1) \
287 const u32 final_hash_pos = digests_offset + hash_pos; \
289 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
291 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 3); \
293 d_return_buf[lid] = 1; \
305 #define MATCHES_ONE_VV(a,b) (((a).s0 == (b).s0) || ((a).s1 == (b).s1) || ((a).s2 == (b).s2) || ((a).s3 == (b).s3) || ((a).s4 == (b).s4) || ((a).s5 == (b).s5) || ((a).s6 == (b).s6) || ((a).s7 == (b).s7))
306 #define MATCHES_ONE_VS(a,b) (((a).s0 == (b) ) || ((a).s1 == (b) ) || ((a).s2 == (b) ) || ((a).s3 == (b) ) || ((a).s4 == (b) ) || ((a).s5 == (b) ) || ((a).s6 == (b) ) || ((a).s7 == (b) ))
308 #define COMPARE_S_SIMD(h0,h1,h2,h3) \
310 if (((h0).s0 == search[0]) && ((h1).s0 == search[1]) && ((h2).s0 == search[2]) && ((h3).s0 == search[3])) \
312 const u32 final_hash_pos = digests_offset + 0; \
314 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
316 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 0); \
318 d_return_buf[lid] = 1; \
322 if (((h0).s1 == search[0]) && ((h1).s1 == search[1]) && ((h2).s1 == search[2]) && ((h3).s1 == search[3])) \
324 const u32 final_hash_pos = digests_offset + 0; \
326 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
328 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 1); \
330 d_return_buf[lid] = 1; \
334 if (((h0).s2 == search[0]) && ((h1).s2 == search[1]) && ((h2).s2 == search[2]) && ((h3).s2 == search[3])) \
336 const u32 final_hash_pos = digests_offset + 0; \
338 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
340 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 2); \
342 d_return_buf[lid] = 1; \
346 if (((h0).s3 == search[0]) && ((h1).s3 == search[1]) && ((h2).s3 == search[2]) && ((h3).s3 == search[3])) \
348 const u32 final_hash_pos = digests_offset + 0; \
350 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
352 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 3); \
354 d_return_buf[lid] = 1; \
357 if (((h0).s4 == search[0]) && ((h1).s4 == search[1]) && ((h2).s4 == search[2]) && ((h3).s4 == search[3])) \
359 const u32 final_hash_pos = digests_offset + 0; \
361 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
363 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 4); \
365 d_return_buf[lid] = 1; \
369 if (((h0).s5 == search[0]) && ((h1).s5 == search[1]) && ((h2).s5 == search[2]) && ((h3).s5 == search[3])) \
371 const u32 final_hash_pos = digests_offset + 0; \
373 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
375 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 5); \
377 d_return_buf[lid] = 1; \
381 if (((h0).s6 == search[0]) && ((h1).s6 == search[1]) && ((h2).s6 == search[2]) && ((h3).s6 == search[3])) \
383 const u32 final_hash_pos = digests_offset + 0; \
385 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
387 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 6); \
389 d_return_buf[lid] = 1; \
393 if (((h0).s7 == search[0]) && ((h1).s7 == search[1]) && ((h2).s7 == search[2]) && ((h3).s7 == search[3])) \
395 const u32 final_hash_pos = digests_offset + 0; \
397 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
399 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 7); \
401 d_return_buf[lid] = 1; \
406 #define COMPARE_M_SIMD(h0,h1,h2,h3) \
408 const u32 digest_tp0[4] = { h0.s0, h1.s0, h2.s0, h3.s0 }; \
409 const u32 digest_tp1[4] = { h0.s1, h1.s1, h2.s1, h3.s1 }; \
410 const u32 digest_tp2[4] = { h0.s2, h1.s2, h2.s2, h3.s2 }; \
411 const u32 digest_tp3[4] = { h0.s3, h1.s3, h2.s3, h3.s3 }; \
412 const u32 digest_tp4[4] = { h0.s4, h1.s4, h2.s4, h3.s4 }; \
413 const u32 digest_tp5[4] = { h0.s5, h1.s5, h2.s5, h3.s5 }; \
414 const u32 digest_tp6[4] = { h0.s6, h1.s6, h2.s6, h3.s6 }; \
415 const u32 digest_tp7[4] = { h0.s7, h1.s7, h2.s7, h3.s7 }; \
417 if (check (digest_tp0, \
418 bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, \
419 bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, \
424 int hash_pos = find_hash (digest_tp0, digests_cnt, &digests_buf[digests_offset]); \
426 if (hash_pos != -1) \
428 const u32 final_hash_pos = digests_offset + hash_pos; \
430 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
432 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 0); \
434 d_return_buf[lid] = 1; \
439 if (check (digest_tp1, \
440 bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, \
441 bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, \
446 int hash_pos = find_hash (digest_tp1, digests_cnt, &digests_buf[digests_offset]); \
448 if (hash_pos != -1) \
450 const u32 final_hash_pos = digests_offset + hash_pos; \
452 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
454 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 1); \
456 d_return_buf[lid] = 1; \
461 if (check (digest_tp2, \
462 bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, \
463 bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, \
468 int hash_pos = find_hash (digest_tp2, digests_cnt, &digests_buf[digests_offset]); \
470 if (hash_pos != -1) \
472 const u32 final_hash_pos = digests_offset + hash_pos; \
474 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
476 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 2); \
478 d_return_buf[lid] = 1; \
483 if (check (digest_tp3, \
484 bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, \
485 bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, \
490 int hash_pos = find_hash (digest_tp3, digests_cnt, &digests_buf[digests_offset]); \
492 if (hash_pos != -1) \
494 const u32 final_hash_pos = digests_offset + hash_pos; \
496 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
498 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 3); \
500 d_return_buf[lid] = 1; \
504 if (check (digest_tp4, \
505 bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, \
506 bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, \
511 int hash_pos = find_hash (digest_tp4, digests_cnt, &digests_buf[digests_offset]); \
513 if (hash_pos != -1) \
515 const u32 final_hash_pos = digests_offset + hash_pos; \
517 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
519 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 4); \
521 d_return_buf[lid] = 1; \
526 if (check (digest_tp5, \
527 bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, \
528 bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, \
533 int hash_pos = find_hash (digest_tp5, digests_cnt, &digests_buf[digests_offset]); \
535 if (hash_pos != -1) \
537 const u32 final_hash_pos = digests_offset + hash_pos; \
539 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
541 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 5); \
543 d_return_buf[lid] = 1; \
548 if (check (digest_tp6, \
549 bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, \
550 bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, \
555 int hash_pos = find_hash (digest_tp6, digests_cnt, &digests_buf[digests_offset]); \
557 if (hash_pos != -1) \
559 const u32 final_hash_pos = digests_offset + hash_pos; \
561 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
563 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 6); \
565 d_return_buf[lid] = 1; \
570 if (check (digest_tp7, \
571 bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, \
572 bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, \
577 int hash_pos = find_hash (digest_tp7, digests_cnt, &digests_buf[digests_offset]); \
579 if (hash_pos != -1) \
581 const u32 final_hash_pos = digests_offset + hash_pos; \
583 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
585 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 7); \
587 d_return_buf[lid] = 1; \
599 #define MATCHES_ONE_VV(a,b) (((a).s0 == (b).s0) || ((a).s1 == (b).s1) || ((a).s2 == (b).s2) || ((a).s3 == (b).s3) || ((a).s4 == (b).s4) || ((a).s5 == (b).s5) || ((a).s6 == (b).s6) || ((a).s7 == (b).s7) || ((a).s8 == (b).s8) || ((a).s9 == (b).s9) || ((a).sa == (b).sa) || ((a).sb == (b).sb) || ((a).sc == (b).sc) || ((a).sd == (b).sd) || ((a).se == (b).se) || ((a).sf == (b).sf))
600 #define MATCHES_ONE_VS(a,b) (((a).s0 == (b) ) || ((a).s1 == (b) ) || ((a).s2 == (b) ) || ((a).s3 == (b) ) || ((a).s4 == (b) ) || ((a).s5 == (b) ) || ((a).s6 == (b) ) || ((a).s7 == (b) ) || ((a).s8 == (b) ) || ((a).s9 == (b) ) || ((a).sa == (b) ) || ((a).sb == (b) ) || ((a).sc == (b) ) || ((a).sd == (b) ) || ((a).se == (b) ) || ((a).sf == (b) ))
602 #define COMPARE_S_SIMD(h0,h1,h2,h3) \
604 if (((h0).s0 == search[0]) && ((h1).s0 == search[1]) && ((h2).s0 == search[2]) && ((h3).s0 == search[3])) \
606 const u32 final_hash_pos = digests_offset + 0; \
608 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
610 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 0); \
612 d_return_buf[lid] = 1; \
616 if (((h0).s1 == search[0]) && ((h1).s1 == search[1]) && ((h2).s1 == search[2]) && ((h3).s1 == search[3])) \
618 const u32 final_hash_pos = digests_offset + 0; \
620 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
622 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 1); \
624 d_return_buf[lid] = 1; \
628 if (((h0).s2 == search[0]) && ((h1).s2 == search[1]) && ((h2).s2 == search[2]) && ((h3).s2 == search[3])) \
630 const u32 final_hash_pos = digests_offset + 0; \
632 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
634 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 2); \
636 d_return_buf[lid] = 1; \
640 if (((h0).s3 == search[0]) && ((h1).s3 == search[1]) && ((h2).s3 == search[2]) && ((h3).s3 == search[3])) \
642 const u32 final_hash_pos = digests_offset + 0; \
644 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
646 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 3); \
648 d_return_buf[lid] = 1; \
651 if (((h0).s4 == search[0]) && ((h1).s4 == search[1]) && ((h2).s4 == search[2]) && ((h3).s4 == search[3])) \
653 const u32 final_hash_pos = digests_offset + 0; \
655 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
657 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 4); \
659 d_return_buf[lid] = 1; \
663 if (((h0).s5 == search[0]) && ((h1).s5 == search[1]) && ((h2).s5 == search[2]) && ((h3).s5 == search[3])) \
665 const u32 final_hash_pos = digests_offset + 0; \
667 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
669 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 5); \
671 d_return_buf[lid] = 1; \
675 if (((h0).s6 == search[0]) && ((h1).s6 == search[1]) && ((h2).s6 == search[2]) && ((h3).s6 == search[3])) \
677 const u32 final_hash_pos = digests_offset + 0; \
679 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
681 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 6); \
683 d_return_buf[lid] = 1; \
687 if (((h0).s7 == search[0]) && ((h1).s7 == search[1]) && ((h2).s7 == search[2]) && ((h3).s7 == search[3])) \
689 const u32 final_hash_pos = digests_offset + 0; \
691 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
693 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 7); \
695 d_return_buf[lid] = 1; \
699 if (((h0).s8 == search[0]) && ((h1).s8 == search[1]) && ((h2).s8 == search[2]) && ((h3).s8 == search[3])) \
701 const u32 final_hash_pos = digests_offset + 0; \
703 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
705 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 8); \
707 d_return_buf[lid] = 1; \
711 if (((h0).s9 == search[0]) && ((h1).s9 == search[1]) && ((h2).s9 == search[2]) && ((h3).s9 == search[3])) \
713 const u32 final_hash_pos = digests_offset + 0; \
715 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
717 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 9); \
719 d_return_buf[lid] = 1; \
723 if (((h0).sa == search[0]) && ((h1).sa == search[1]) && ((h2).sa == search[2]) && ((h3).sa == search[3])) \
725 const u32 final_hash_pos = digests_offset + 0; \
727 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
729 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 10); \
731 d_return_buf[lid] = 1; \
735 if (((h0).sb == search[0]) && ((h1).sb == search[1]) && ((h2).sb == search[2]) && ((h3).sb == search[3])) \
737 const u32 final_hash_pos = digests_offset + 0; \
739 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
741 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 11); \
743 d_return_buf[lid] = 1; \
747 if (((h0).sc == search[0]) && ((h1).sc == search[1]) && ((h2).sc == search[2]) && ((h3).sc == search[3])) \
749 const u32 final_hash_pos = digests_offset + 0; \
751 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
753 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 12); \
755 d_return_buf[lid] = 1; \
759 if (((h0).sd == search[0]) && ((h1).sd == search[1]) && ((h2).sd == search[2]) && ((h3).sd == search[3])) \
761 const u32 final_hash_pos = digests_offset + 0; \
763 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
765 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 13); \
767 d_return_buf[lid] = 1; \
771 if (((h0).se == search[0]) && ((h1).se == search[1]) && ((h2).se == search[2]) && ((h3).se == search[3])) \
773 const u32 final_hash_pos = digests_offset + 0; \
775 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
777 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 14); \
779 d_return_buf[lid] = 1; \
783 if (((h0).sf == search[0]) && ((h1).sf == search[1]) && ((h2).sf == search[2]) && ((h3).sf == search[3])) \
785 const u32 final_hash_pos = digests_offset + 0; \
787 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
789 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 15); \
791 d_return_buf[lid] = 1; \
796 #define COMPARE_M_SIMD(h0,h1,h2,h3) \
798 const u32 digest_tp0[4] = { h0.s0, h1.s0, h2.s0, h3.s0 }; \
799 const u32 digest_tp1[4] = { h0.s1, h1.s1, h2.s1, h3.s1 }; \
800 const u32 digest_tp2[4] = { h0.s2, h1.s2, h2.s2, h3.s2 }; \
801 const u32 digest_tp3[4] = { h0.s3, h1.s3, h2.s3, h3.s3 }; \
802 const u32 digest_tp4[4] = { h0.s4, h1.s4, h2.s4, h3.s4 }; \
803 const u32 digest_tp5[4] = { h0.s5, h1.s5, h2.s5, h3.s5 }; \
804 const u32 digest_tp6[4] = { h0.s6, h1.s6, h2.s6, h3.s6 }; \
805 const u32 digest_tp7[4] = { h0.s7, h1.s7, h2.s7, h3.s7 }; \
806 const u32 digest_tp8[4] = { h0.s8, h1.s8, h2.s8, h3.s8 }; \
807 const u32 digest_tp9[4] = { h0.s9, h1.s9, h2.s9, h3.s9 }; \
808 const u32 digest_tp10[4] = { h0.sa, h1.sa, h2.sa, h3.sa }; \
809 const u32 digest_tp11[4] = { h0.sb, h1.sb, h2.sb, h3.sb }; \
810 const u32 digest_tp12[4] = { h0.sc, h1.sc, h2.sc, h3.sc }; \
811 const u32 digest_tp13[4] = { h0.sd, h1.sd, h2.sd, h3.sd }; \
812 const u32 digest_tp14[4] = { h0.se, h1.se, h2.se, h3.se }; \
813 const u32 digest_tp15[4] = { h0.sf, h1.sf, h2.sf, h3.sf }; \
815 if (check (digest_tp0, \
816 bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, \
817 bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, \
822 int hash_pos = find_hash (digest_tp0, digests_cnt, &digests_buf[digests_offset]); \
824 if (hash_pos != -1) \
826 const u32 final_hash_pos = digests_offset + hash_pos; \
828 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
830 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 0); \
832 d_return_buf[lid] = 1; \
837 if (check (digest_tp1, \
838 bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, \
839 bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, \
844 int hash_pos = find_hash (digest_tp1, digests_cnt, &digests_buf[digests_offset]); \
846 if (hash_pos != -1) \
848 const u32 final_hash_pos = digests_offset + hash_pos; \
850 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
852 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 1); \
854 d_return_buf[lid] = 1; \
859 if (check (digest_tp2, \
860 bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, \
861 bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, \
866 int hash_pos = find_hash (digest_tp2, digests_cnt, &digests_buf[digests_offset]); \
868 if (hash_pos != -1) \
870 const u32 final_hash_pos = digests_offset + hash_pos; \
872 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
874 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 2); \
876 d_return_buf[lid] = 1; \
881 if (check (digest_tp3, \
882 bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, \
883 bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, \
888 int hash_pos = find_hash (digest_tp3, digests_cnt, &digests_buf[digests_offset]); \
890 if (hash_pos != -1) \
892 const u32 final_hash_pos = digests_offset + hash_pos; \
894 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
896 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 3); \
898 d_return_buf[lid] = 1; \
902 if (check (digest_tp4, \
903 bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, \
904 bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, \
909 int hash_pos = find_hash (digest_tp4, digests_cnt, &digests_buf[digests_offset]); \
911 if (hash_pos != -1) \
913 const u32 final_hash_pos = digests_offset + hash_pos; \
915 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
917 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 4); \
919 d_return_buf[lid] = 1; \
924 if (check (digest_tp5, \
925 bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, \
926 bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, \
931 int hash_pos = find_hash (digest_tp5, digests_cnt, &digests_buf[digests_offset]); \
933 if (hash_pos != -1) \
935 const u32 final_hash_pos = digests_offset + hash_pos; \
937 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
939 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 5); \
941 d_return_buf[lid] = 1; \
946 if (check (digest_tp6, \
947 bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, \
948 bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, \
953 int hash_pos = find_hash (digest_tp6, digests_cnt, &digests_buf[digests_offset]); \
955 if (hash_pos != -1) \
957 const u32 final_hash_pos = digests_offset + hash_pos; \
959 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
961 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 6); \
963 d_return_buf[lid] = 1; \
968 if (check (digest_tp7, \
969 bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, \
970 bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, \
975 int hash_pos = find_hash (digest_tp7, digests_cnt, &digests_buf[digests_offset]); \
977 if (hash_pos != -1) \
979 const u32 final_hash_pos = digests_offset + hash_pos; \
981 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
983 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 7); \
985 d_return_buf[lid] = 1; \
990 if (check (digest_tp8, \
991 bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, \
992 bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, \
997 int hash_pos = find_hash (digest_tp8, digests_cnt, &digests_buf[digests_offset]); \
999 if (hash_pos != -1) \
1001 const u32 final_hash_pos = digests_offset + hash_pos; \
1003 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
1005 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 8); \
1007 d_return_buf[lid] = 1; \
1012 if (check (digest_tp9, \
1013 bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, \
1014 bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, \
1019 int hash_pos = find_hash (digest_tp9, digests_cnt, &digests_buf[digests_offset]); \
1021 if (hash_pos != -1) \
1023 const u32 final_hash_pos = digests_offset + hash_pos; \
1025 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
1027 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 9); \
1029 d_return_buf[lid] = 1; \
1034 if (check (digest_tp10, \
1035 bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, \
1036 bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, \
1041 int hash_pos = find_hash (digest_tp10, digests_cnt, &digests_buf[digests_offset]); \
1043 if (hash_pos != -1) \
1045 const u32 final_hash_pos = digests_offset + hash_pos; \
1047 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
1049 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 10); \
1051 d_return_buf[lid] = 1; \
1056 if (check (digest_tp11, \
1057 bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, \
1058 bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, \
1063 int hash_pos = find_hash (digest_tp11, digests_cnt, &digests_buf[digests_offset]); \
1065 if (hash_pos != -1) \
1067 const u32 final_hash_pos = digests_offset + hash_pos; \
1069 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
1071 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 11); \
1073 d_return_buf[lid] = 1; \
1078 if (check (digest_tp12, \
1079 bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, \
1080 bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, \
1085 int hash_pos = find_hash (digest_tp12, digests_cnt, &digests_buf[digests_offset]); \
1087 if (hash_pos != -1) \
1089 const u32 final_hash_pos = digests_offset + hash_pos; \
1091 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
1093 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 12); \
1095 d_return_buf[lid] = 1; \
1100 if (check (digest_tp13, \
1101 bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, \
1102 bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, \
1107 int hash_pos = find_hash (digest_tp13, digests_cnt, &digests_buf[digests_offset]); \
1109 if (hash_pos != -1) \
1111 const u32 final_hash_pos = digests_offset + hash_pos; \
1113 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
1115 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 13); \
1117 d_return_buf[lid] = 1; \
1122 if (check (digest_tp14, \
1123 bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, \
1124 bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, \
1129 int hash_pos = find_hash (digest_tp14, digests_cnt, &digests_buf[digests_offset]); \
1131 if (hash_pos != -1) \
1133 const u32 final_hash_pos = digests_offset + hash_pos; \
1135 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
1137 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 14); \
1139 d_return_buf[lid] = 1; \
1144 if (check (digest_tp15, \
1145 bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, \
1146 bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, \
1151 int hash_pos = find_hash (digest_tp15, digests_cnt, &digests_buf[digests_offset]); \
1153 if (hash_pos != -1) \
1155 const u32 final_hash_pos = digests_offset + hash_pos; \
1157 if (atomic_add (&hashes_shown[final_hash_pos], 1) == 0) \
1159 mark_hash (plains_buf, hashes_shown, final_hash_pos, gid, il_pos + 15); \
1161 d_return_buf[lid] = 1; \
1169 #define MATCHES_NONE_VV(a,b) !(MATCHES_ONE_VV ((a), (b)))
1170 #define MATCHES_NONE_VS(a,b) !(MATCHES_ONE_VS ((a), (b)))
1174 static inline u32x
w0r_create_bft (__global bf_t
*bfs_buf
, const u32 il_pos
)
1177 const u32x w0r
= (u32x
) (bfs_buf
[il_pos
+ 0].i
);
1178 #elif VECT_SIZE == 2
1179 const u32x w0r
= (u32x
) (bfs_buf
[il_pos
+ 0].i
, bfs_buf
[il_pos
+ 1].i
);
1180 #elif VECT_SIZE == 4
1181 const u32x w0r
= (u32x
) (bfs_buf
[il_pos
+ 0].i
, bfs_buf
[il_pos
+ 1].i
, bfs_buf
[il_pos
+ 2].i
, bfs_buf
[il_pos
+ 3].i
);
1182 #elif VECT_SIZE == 8
1183 const u32x w0r
= (u32x
) (bfs_buf
[il_pos
+ 0].i
, bfs_buf
[il_pos
+ 1].i
, bfs_buf
[il_pos
+ 2].i
, bfs_buf
[il_pos
+ 3].i
, bfs_buf
[il_pos
+ 4].i
, bfs_buf
[il_pos
+ 5].i
, bfs_buf
[il_pos
+ 6].i
, bfs_buf
[il_pos
+ 7].i
);
1184 #elif VECT_SIZE == 16
1185 const u32x w0r
= (u32x
) (bfs_buf
[il_pos
+ 0].i
, bfs_buf
[il_pos
+ 1].i
, bfs_buf
[il_pos
+ 2].i
, bfs_buf
[il_pos
+ 3].i
, bfs_buf
[il_pos
+ 4].i
, bfs_buf
[il_pos
+ 5].i
, bfs_buf
[il_pos
+ 6].i
, bfs_buf
[il_pos
+ 7].i
, bfs_buf
[il_pos
+ 8].i
, bfs_buf
[il_pos
+ 9].i
, bfs_buf
[il_pos
+ 10].i
, bfs_buf
[il_pos
+ 11].i
, bfs_buf
[il_pos
+ 12].i
, bfs_buf
[il_pos
+ 13].i
, bfs_buf
[il_pos
+ 14].i
, bfs_buf
[il_pos
+ 15].i
);
1192 #define packv(arr,var,gid,idx) (u32x) ((arr)[((gid) * 1) + 0].var[(idx)])
1193 #elif VECT_SIZE == 2
1194 #define packv(arr,var,gid,idx) (u32x) ((arr)[((gid) * 2) + 0].var[(idx)], (arr)[((gid) * 2) + 1].var[(idx)])
1195 #elif VECT_SIZE == 4
1196 #define packv(arr,var,gid,idx) (u32x) ((arr)[((gid) * 4) + 0].var[(idx)], (arr)[((gid) * 4) + 1].var[(idx)], (arr)[((gid) * 4) + 2].var[(idx)], (arr)[((gid) * 4) + 3].var[(idx)])
1197 #elif VECT_SIZE == 8
1198 #define packv(arr,var,gid,idx) (u32x) ((arr)[((gid) * 8) + 0].var[(idx)], (arr)[((gid) * 8) + 1].var[(idx)], (arr)[((gid) * 8) + 2].var[(idx)], (arr)[((gid) * 8) + 3].var[(idx)], (arr)[((gid) * 8) + 4].var[(idx)], (arr)[((gid) * 8) + 5].var[(idx)], (arr)[((gid) * 8) + 6].var[(idx)], (arr)[((gid) * 8) + 7].var[(idx)])
1199 #elif VECT_SIZE == 16
1200 #define packv(arr,var,gid,idx) (u32x) ((arr)[((gid) * 8) + 0].var[(idx)], (arr)[((gid) * 8) + 1].var[(idx)], (arr)[((gid) * 8) + 2].var[(idx)], (arr)[((gid) * 8) + 3].var[(idx)], (arr)[((gid) * 8) + 4].var[(idx)], (arr)[((gid) * 8) + 5].var[(idx)], (arr)[((gid) * 8) + 6].var[(idx)], (arr)[((gid) * 8) + 7].var[(idx)], (arr)[((gid) * 8) + 8].var[(idx)], (arr)[((gid) * 8) + 9].var[(idx)], (arr)[((gid) * 8) + 10].var[(idx)], (arr)[((gid) * 8) + 11].var[(idx)], (arr)[((gid) * 8) + 12].var[(idx)], (arr)[((gid) * 8) + 13].var[(idx)], (arr)[((gid) * 8) + 14].var[(idx)], (arr)[((gid) * 8) + 15].var[(idx)])
1204 #define unpackv(arr,var,gid,idx,val) (arr)[((gid) * 1) + 0].var[(idx)] = val;
1205 #elif VECT_SIZE == 2
1206 #define unpackv(arr,var,gid,idx,val) (arr)[((gid) * 2) + 0].var[(idx)] = val.s0; (arr)[((gid) * 2) + 1].var[(idx)] = val.s1;
1207 #elif VECT_SIZE == 4
1208 #define unpackv(arr,var,gid,idx,val) (arr)[((gid) * 4) + 0].var[(idx)] = val.s0; (arr)[((gid) * 4) + 1].var[(idx)] = val.s1; (arr)[((gid) * 4) + 2].var[(idx)] = val.s2; (arr)[((gid) * 4) + 3].var[(idx)] = val.s3;
1209 #elif VECT_SIZE == 8
1210 #define unpackv(arr,var,gid,idx,val) (arr)[((gid) * 8) + 0].var[(idx)] = val.s0; (arr)[((gid) * 8) + 1].var[(idx)] = val.s1; (arr)[((gid) * 8) + 2].var[(idx)] = val.s2; (arr)[((gid) * 8) + 3].var[(idx)] = val.s3; (arr)[((gid) * 8) + 4].var[(idx)] = val.s4; (arr)[((gid) * 8) + 5].var[(idx)] = val.s5; (arr)[((gid) * 8) + 6].var[(idx)] = val.s6; (arr)[((gid) * 8) + 7].var[(idx)] = val.s7;
1211 #elif VECT_SIZE == 16
1212 #define unpackv(arr,var,gid,idx,val) (arr)[((gid) * 8) + 0].var[(idx)] = val.s0; (arr)[((gid) * 8) + 1].var[(idx)] = val.s1; (arr)[((gid) * 8) + 2].var[(idx)] = val.s2; (arr)[((gid) * 8) + 3].var[(idx)] = val.s3; (arr)[((gid) * 8) + 4].var[(idx)] = val.s4; (arr)[((gid) * 8) + 5].var[(idx)] = val.s5; (arr)[((gid) * 8) + 6].var[(idx)] = val.s6; (arr)[((gid) * 8) + 7].var[(idx)] = val.s7; (arr)[((gid) * 8) + 8].var[(idx)] = val.s8; (arr)[((gid) * 8) + 9].var[(idx)] = val.s9; (arr)[((gid) * 8) + 10].var[(idx)] = val.sa; (arr)[((gid) * 8) + 11].var[(idx)] = val.sb; (arr)[((gid) * 8) + 12].var[(idx)] = val.sc; (arr)[((gid) * 8) + 13].var[(idx)] = val.sd; (arr)[((gid) * 8) + 14].var[(idx)] = val.se; (arr)[((gid) * 8) + 15].var[(idx)] = val.sf;