3 #include "set/hdr_cuckoo_set.h"
4 #include <cds/container/cuckoo_set.h>
8 void CuckooSetHdrTest::Cuckoo_Striped_list_unord()
10 struct set_traits : public cc::cuckoo::traits {
11 typedef equal<item> equal_to;
12 typedef co::hash_tuple< hash1, hash2 > hash;
15 typedef cc::CuckooSet< item, set_traits > set_t;
16 // cc::cuckoo::make_traits<
17 // co::equal_to< equal< item > >
18 // ,co::hash< std::tuple< hash1, hash2 > >
22 test_int<set_t, equal< item > >();
25 void CuckooSetHdrTest::Cuckoo_Striped_list_unord_storehash()
27 typedef cc::CuckooSet< item,
28 cc::cuckoo::make_traits<
29 co::mutex_policy< cc::cuckoo::striping<> >
30 ,co::equal_to< equal< item > >
31 ,cc::cuckoo::store_hash< true >
32 ,cc::cuckoo::probeset_type< cc::cuckoo::list >
33 ,co::hash< std::tuple< hash1, hash2 > >
37 test_int<set_t, equal< item > >();
40 void CuckooSetHdrTest::Cuckoo_Striped_list_cmp()
42 typedef cc::CuckooSet< item,
43 cc::cuckoo::make_traits<
44 co::compare< cmp< item > >
45 ,cc::cuckoo::store_hash< false >
46 ,cc::cuckoo::probeset_type< cc::cuckoo::list >
47 ,co::hash< std::tuple< hash1, hash2 > >
51 test_int<set_t, less< item > >();
54 void CuckooSetHdrTest::Cuckoo_Striped_list_cmp_storehash()
56 typedef cc::CuckooSet< item,
57 cc::cuckoo::make_traits<
58 co::mutex_policy< cc::cuckoo::striping<> >
59 ,co::compare< cmp< item > >
60 ,cc::cuckoo::store_hash< true >
61 ,cc::cuckoo::probeset_type< cc::cuckoo::list >
62 ,co::hash< std::tuple< hash1, hash2 > >
66 test_int<set_t, less< item > >();
69 void CuckooSetHdrTest::Cuckoo_Striped_list_less()
71 typedef cc::CuckooSet< item,
72 cc::cuckoo::make_traits<
73 co::less< less< item > >
74 ,co::hash< std::tuple< hash1, hash2 > >
75 ,co::mutex_policy< cc::cuckoo::striping<> >
76 ,cc::cuckoo::store_hash< false >
77 ,cc::cuckoo::probeset_type< cc::cuckoo::list >
81 test_int<set_t, less< item > >();
84 void CuckooSetHdrTest::Cuckoo_Striped_list_less_storehash()
86 typedef cc::CuckooSet< item,
87 cc::cuckoo::make_traits<
88 co::mutex_policy< cc::cuckoo::striping<> >
89 ,co::less< less< item > >
90 ,cc::cuckoo::store_hash< true >
91 ,cc::cuckoo::probeset_type< cc::cuckoo::list >
92 ,co::hash< std::tuple< hash1, hash2 > >
96 test_int<set_t, less< item > >();
99 void CuckooSetHdrTest::Cuckoo_Striped_list_less_cmp()
101 typedef cc::CuckooSet< item,
102 cc::cuckoo::make_traits<
103 co::less< less< item > >
104 ,co::compare< cmp< item > >
105 ,co::hash< std::tuple< hash1, hash2 > >
106 ,co::mutex_policy< cc::cuckoo::striping<> >
107 ,cc::cuckoo::store_hash< false >
108 ,cc::cuckoo::probeset_type< cc::cuckoo::list >
112 test_int<set_t, less< item > >();
115 void CuckooSetHdrTest::Cuckoo_Striped_list_less_cmp_storehash()
117 typedef cc::CuckooSet< item,
118 cc::cuckoo::make_traits<
119 co::mutex_policy< cc::cuckoo::striping<> >
120 ,co::less< less< item > >
121 ,co::hash< std::tuple< hash1, hash2 > >
122 ,co::compare< cmp< item > >
123 ,cc::cuckoo::store_hash< true >
124 ,cc::cuckoo::probeset_type< cc::cuckoo::list >
128 test_int<set_t, less<item> >();
131 void CuckooSetHdrTest::Cuckoo_Striped_list_less_cmp_eq()
133 typedef cc::CuckooSet< item,
134 cc::cuckoo::make_traits<
135 co::less< less< item > >
136 ,co::compare< cmp< item > >
137 ,co::equal_to< equal< item > >
138 ,co::hash< std::tuple< hash1, hash2 > >
139 ,co::mutex_policy< cc::cuckoo::striping<> >
140 ,cc::cuckoo::store_hash< false >
141 ,cc::cuckoo::probeset_type< cc::cuckoo::list >
145 test_int<set_t, less<item> >();
148 void CuckooSetHdrTest::Cuckoo_Striped_list_less_cmp_eq_storehash()
150 typedef cc::CuckooSet< item,
151 cc::cuckoo::make_traits<
152 co::mutex_policy< cc::cuckoo::striping<> >
153 ,co::less< less< item > >
154 ,co::compare< cmp< item > >
155 ,co::equal_to< equal< item > >
156 ,cc::cuckoo::store_hash< true >
157 ,cc::cuckoo::probeset_type< cc::cuckoo::list >
158 ,co::hash< std::tuple< hash1, hash2 > >
162 test_int<set_t, less<item> >();
167 void CuckooSetHdrTest::Cuckoo_Striped_vector_unord()
169 typedef cc::CuckooSet< item,
170 cc::cuckoo::make_traits<
171 co::equal_to< equal< item > >
172 ,co::hash< std::tuple< hash1, hash2 > >
173 ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
177 test_int<set_t, equal< item > >();
180 void CuckooSetHdrTest::Cuckoo_Striped_vector_unord_storehash()
182 typedef cc::CuckooSet< item,
183 cc::cuckoo::make_traits<
184 co::mutex_policy< cc::cuckoo::striping<> >
185 ,co::equal_to< equal< item > >
186 ,cc::cuckoo::store_hash< true >
187 ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
188 ,co::hash< std::tuple< hash1, hash2 > >
192 test_int<set_t, equal< item > >();
195 void CuckooSetHdrTest::Cuckoo_Striped_vector_cmp()
197 typedef cc::CuckooSet< item,
198 cc::cuckoo::make_traits<
199 co::compare< cmp< item > >
200 ,cc::cuckoo::store_hash< false >
201 ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
202 ,co::hash< std::tuple< hash1, hash2 > >
206 test_int<set_t, less< item > >();
209 void CuckooSetHdrTest::Cuckoo_Striped_vector_cmp_storehash()
211 typedef cc::CuckooSet< item,
212 cc::cuckoo::make_traits<
213 co::mutex_policy< cc::cuckoo::striping<> >
214 ,co::compare< cmp< item > >
215 ,cc::cuckoo::store_hash< true >
216 ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
217 ,co::hash< std::tuple< hash1, hash2 > >
221 test_int<set_t, less< item > >();
224 void CuckooSetHdrTest::Cuckoo_Striped_vector_less()
226 typedef cc::CuckooSet< item,
227 cc::cuckoo::make_traits<
228 co::less< less< item > >
229 ,co::hash< std::tuple< hash1, hash2 > >
230 ,co::mutex_policy< cc::cuckoo::striping<> >
231 ,cc::cuckoo::store_hash< false >
232 ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
236 test_int<set_t, less< item > >();
239 void CuckooSetHdrTest::Cuckoo_Striped_vector_less_storehash()
241 typedef cc::CuckooSet< item,
242 cc::cuckoo::make_traits<
243 co::mutex_policy< cc::cuckoo::striping<> >
244 ,co::less< less< item > >
245 ,cc::cuckoo::store_hash< true >
246 ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
247 ,co::hash< std::tuple< hash1, hash2 > >
251 test_int<set_t, less< item > >();
254 void CuckooSetHdrTest::Cuckoo_Striped_vector_less_cmp()
256 typedef cc::CuckooSet< item,
257 cc::cuckoo::make_traits<
258 co::less< less< item > >
259 ,co::compare< cmp< item > >
260 ,co::hash< std::tuple< hash1, hash2 > >
261 ,co::mutex_policy< cc::cuckoo::striping<> >
262 ,cc::cuckoo::store_hash< false >
263 ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
267 test_int<set_t, less< item > >();
270 void CuckooSetHdrTest::Cuckoo_Striped_vector_less_cmp_storehash()
272 typedef cc::CuckooSet< item,
273 cc::cuckoo::make_traits<
274 co::mutex_policy< cc::cuckoo::striping<> >
275 ,co::less< less< item > >
276 ,co::hash< std::tuple< hash1, hash2 > >
277 ,co::compare< cmp< item > >
278 ,cc::cuckoo::store_hash< true >
279 ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
283 test_int<set_t, less<item> >();
286 void CuckooSetHdrTest::Cuckoo_Striped_vector_less_cmp_eq()
288 typedef cc::CuckooSet< item,
289 cc::cuckoo::make_traits<
290 co::less< less< item > >
291 ,co::compare< cmp< item > >
292 ,co::equal_to< equal< item > >
293 ,co::hash< std::tuple< hash1, hash2 > >
294 ,co::mutex_policy< cc::cuckoo::striping<> >
295 ,cc::cuckoo::store_hash< false >
296 ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
300 test_int<set_t, less<item> >();
303 void CuckooSetHdrTest::Cuckoo_Striped_vector_less_cmp_eq_storehash()
305 typedef cc::CuckooSet< item,
306 cc::cuckoo::make_traits<
307 co::mutex_policy< cc::cuckoo::striping<> >
308 ,co::less< less< item > >
309 ,co::compare< cmp< item > >
310 ,co::equal_to< equal< item > >
311 ,cc::cuckoo::store_hash< true >
312 ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
313 ,co::hash< std::tuple< hash1, hash2 > >
317 test_int<set_t, less<item> >();
321 void CuckooSetHdrTest::Cuckoo_Refinable_list_unord()
323 typedef cc::CuckooSet< item,
324 cc::cuckoo::make_traits<
325 co::equal_to< equal< item > >
326 ,co::hash< std::tuple< hash1, hash2 > >
327 ,co::mutex_policy< cc::cuckoo::refinable<> >
331 test_int<set_t, equal< item > >();
334 void CuckooSetHdrTest::Cuckoo_Refinable_list_unord_storehash()
336 typedef cc::CuckooSet< item,
337 cc::cuckoo::make_traits<
338 co::mutex_policy< cc::cuckoo::refinable<> >
339 ,co::equal_to< equal< item > >
340 ,cc::cuckoo::store_hash< true >
341 ,cc::cuckoo::probeset_type< cc::cuckoo::list >
342 ,co::hash< std::tuple< hash1, hash2 > >
346 test_int<set_t, equal< item > >();
349 void CuckooSetHdrTest::Cuckoo_Refinable_list_cmp()
351 typedef cc::CuckooSet< item,
352 cc::cuckoo::make_traits<
353 co::compare< cmp< item > >
354 ,cc::cuckoo::store_hash< false >
355 ,cc::cuckoo::probeset_type< cc::cuckoo::list >
356 ,co::hash< std::tuple< hash1, hash2 > >
357 ,co::mutex_policy< cc::cuckoo::refinable<> >
361 test_int<set_t, less< item > >();
364 void CuckooSetHdrTest::Cuckoo_Refinable_list_cmp_storehash()
366 typedef cc::CuckooSet< item,
367 cc::cuckoo::make_traits<
368 co::mutex_policy< cc::cuckoo::refinable<> >
369 ,co::compare< cmp< item > >
370 ,cc::cuckoo::store_hash< true >
371 ,cc::cuckoo::probeset_type< cc::cuckoo::list >
372 ,co::hash< std::tuple< hash1, hash2 > >
376 test_int<set_t, less< item > >();
379 void CuckooSetHdrTest::Cuckoo_Refinable_list_less()
381 typedef cc::CuckooSet< item,
382 cc::cuckoo::make_traits<
383 co::less< less< item > >
384 ,co::hash< std::tuple< hash1, hash2 > >
385 ,co::mutex_policy< cc::cuckoo::refinable<> >
386 ,cc::cuckoo::store_hash< false >
387 ,cc::cuckoo::probeset_type< cc::cuckoo::list >
391 test_int<set_t, less< item > >();
394 void CuckooSetHdrTest::Cuckoo_Refinable_list_less_storehash()
396 typedef cc::CuckooSet< item,
397 cc::cuckoo::make_traits<
398 co::mutex_policy< cc::cuckoo::refinable<> >
399 ,co::less< less< item > >
400 ,cc::cuckoo::store_hash< true >
401 ,cc::cuckoo::probeset_type< cc::cuckoo::list >
402 ,co::hash< std::tuple< hash1, hash2 > >
406 test_int<set_t, less< item > >();
409 void CuckooSetHdrTest::Cuckoo_Refinable_list_less_cmp()
411 typedef cc::CuckooSet< item,
412 cc::cuckoo::make_traits<
413 co::less< less< item > >
414 ,co::compare< cmp< item > >
415 ,co::hash< std::tuple< hash1, hash2 > >
416 ,co::mutex_policy< cc::cuckoo::refinable<> >
417 ,cc::cuckoo::store_hash< false >
418 ,cc::cuckoo::probeset_type< cc::cuckoo::list >
422 test_int<set_t, less< item > >();
425 void CuckooSetHdrTest::Cuckoo_Refinable_list_less_cmp_storehash()
427 typedef cc::CuckooSet< item,
428 cc::cuckoo::make_traits<
429 co::mutex_policy< cc::cuckoo::refinable<> >
430 ,co::less< less< item > >
431 ,co::hash< std::tuple< hash1, hash2 > >
432 ,co::compare< cmp< item > >
433 ,cc::cuckoo::store_hash< true >
434 ,cc::cuckoo::probeset_type< cc::cuckoo::list >
438 test_int<set_t, less<item> >();
441 void CuckooSetHdrTest::Cuckoo_Refinable_list_less_cmp_eq()
443 typedef cc::CuckooSet< item,
444 cc::cuckoo::make_traits<
445 co::less< less< item > >
446 ,co::compare< cmp< item > >
447 ,co::equal_to< equal< item > >
448 ,co::hash< std::tuple< hash1, hash2 > >
449 ,co::mutex_policy< cc::cuckoo::refinable<> >
450 ,cc::cuckoo::store_hash< false >
451 ,cc::cuckoo::probeset_type< cc::cuckoo::list >
455 test_int<set_t, less<item> >();
458 void CuckooSetHdrTest::Cuckoo_Refinable_list_less_cmp_eq_storehash()
460 typedef cc::CuckooSet< item,
461 cc::cuckoo::make_traits<
462 co::mutex_policy< cc::cuckoo::refinable<> >
463 ,co::less< less< item > >
464 ,co::compare< cmp< item > >
465 ,co::equal_to< equal< item > >
466 ,cc::cuckoo::store_hash< true >
467 ,cc::cuckoo::probeset_type< cc::cuckoo::list >
468 ,co::hash< std::tuple< hash1, hash2 > >
472 test_int<set_t, less<item> >();
478 void CuckooSetHdrTest::Cuckoo_Refinable_vector_unord()
480 typedef cc::CuckooSet< item,
481 cc::cuckoo::make_traits<
482 co::equal_to< equal< item > >
483 ,co::hash< std::tuple< hash1, hash2 > >
484 ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
485 ,co::mutex_policy< cc::cuckoo::refinable<> >
489 test_int<set_t, equal< item > >();
492 void CuckooSetHdrTest::Cuckoo_Refinable_vector_unord_storehash()
494 typedef cc::CuckooSet< item,
495 cc::cuckoo::make_traits<
496 co::mutex_policy< cc::cuckoo::refinable<> >
497 ,co::equal_to< equal< item > >
498 ,cc::cuckoo::store_hash< true >
499 ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
500 ,co::hash< std::tuple< hash1, hash2 > >
504 test_int<set_t, equal< item > >();
507 void CuckooSetHdrTest::Cuckoo_Refinable_vector_cmp()
509 typedef cc::CuckooSet< item,
510 cc::cuckoo::make_traits<
511 co::compare< cmp< item > >
512 ,cc::cuckoo::store_hash< false >
513 ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
514 ,co::hash< std::tuple< hash1, hash2 > >
515 ,co::mutex_policy< cc::cuckoo::refinable<> >
519 test_int<set_t, less< item > >();
522 void CuckooSetHdrTest::Cuckoo_Refinable_vector_cmp_storehash()
524 typedef cc::CuckooSet< item,
525 cc::cuckoo::make_traits<
526 co::mutex_policy< cc::cuckoo::refinable<> >
527 ,co::compare< cmp< item > >
528 ,cc::cuckoo::store_hash< true >
529 ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
530 ,co::hash< std::tuple< hash1, hash2 > >
534 test_int<set_t, less< item > >();
537 void CuckooSetHdrTest::Cuckoo_Refinable_vector_less()
539 typedef cc::CuckooSet< item,
540 cc::cuckoo::make_traits<
541 co::less< less< item > >
542 ,co::hash< std::tuple< hash1, hash2 > >
543 ,co::mutex_policy< cc::cuckoo::refinable<> >
544 ,cc::cuckoo::store_hash< false >
545 ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
549 test_int<set_t, less< item > >();
552 void CuckooSetHdrTest::Cuckoo_Refinable_vector_less_storehash()
554 typedef cc::CuckooSet< item,
555 cc::cuckoo::make_traits<
556 co::mutex_policy< cc::cuckoo::refinable<> >
557 ,co::less< less< item > >
558 ,cc::cuckoo::store_hash< true >
559 ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
560 ,co::hash< std::tuple< hash1, hash2 > >
564 test_int<set_t, less< item > >();
567 void CuckooSetHdrTest::Cuckoo_Refinable_vector_less_cmp()
569 typedef cc::CuckooSet< item,
570 cc::cuckoo::make_traits<
571 co::less< less< item > >
572 ,co::compare< cmp< item > >
573 ,co::hash< std::tuple< hash1, hash2 > >
574 ,co::mutex_policy< cc::cuckoo::refinable<> >
575 ,cc::cuckoo::store_hash< false >
576 ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
580 test_int<set_t, less< item > >();
583 void CuckooSetHdrTest::Cuckoo_Refinable_vector_less_cmp_storehash()
585 typedef cc::CuckooSet< item,
586 cc::cuckoo::make_traits<
587 co::mutex_policy< cc::cuckoo::refinable<> >
588 ,co::less< less< item > >
589 ,co::hash< std::tuple< hash1, hash2 > >
590 ,co::compare< cmp< item > >
591 ,cc::cuckoo::store_hash< true >
592 ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
596 test_int<set_t, less<item> >();
599 void CuckooSetHdrTest::Cuckoo_Refinable_vector_less_cmp_eq()
601 typedef cc::CuckooSet< item,
602 cc::cuckoo::make_traits<
603 co::less< less< item > >
604 ,co::compare< cmp< item > >
605 ,co::equal_to< equal< item > >
606 ,co::hash< std::tuple< hash1, hash2 > >
607 ,co::mutex_policy< cc::cuckoo::refinable<> >
608 ,cc::cuckoo::store_hash< false >
609 ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
613 test_int<set_t, less<item> >();
616 void CuckooSetHdrTest::Cuckoo_Refinable_vector_less_cmp_eq_storehash()
618 typedef cc::CuckooSet< item,
619 cc::cuckoo::make_traits<
620 co::mutex_policy< cc::cuckoo::refinable<> >
621 ,co::less< less< item > >
622 ,co::compare< cmp< item > >
623 ,co::equal_to< equal< item > >
624 ,cc::cuckoo::store_hash< true >
625 ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
626 ,co::hash< std::tuple< hash1, hash2 > >
630 test_int<set_t, less<item> >();
635 CPPUNIT_TEST_SUITE_REGISTRATION(set::CuckooSetHdrTest);