Fixed container::StripedSet::emplace() bug
[libcds.git] / tests / test-hdr / set / hdr_intrusive_cuckoo_set.cpp
1 /*
2     This file is a part of libcds - Concurrent Data Structures library
3
4     (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016
5
6     Source code repo: http://github.com/khizmax/libcds/
7     Download: http://sourceforge.net/projects/libcds/files/
8     
9     Redistribution and use in source and binary forms, with or without
10     modification, are permitted provided that the following conditions are met:
11
12     * Redistributions of source code must retain the above copyright notice, this
13       list of conditions and the following disclaimer.
14
15     * Redistributions in binary form must reproduce the above copyright notice,
16       this list of conditions and the following disclaimer in the documentation
17       and/or other materials provided with the distribution.
18
19     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21     IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22     DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23     FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24     DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25     SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26     CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27     OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.     
29 */
30
31 #include "set/hdr_intrusive_cuckoo_set.h"
32 #include <cds/intrusive/cuckoo_set.h>
33
34 #include "set/intrusive_cuckoo_set_common.h"
35 #include "../unit/print_cuckoo_stat.h"
36
37 namespace set {
38
39     void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_basehook_equal()
40     {
41         typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::list, 0 > >  item_type;
42         struct set_traits : public ci::cuckoo::traits {
43             typedef co::hash_tuple< hash1, hash2 > hash;
44             typedef set::equal_to<item_type> equal_to;
45         };
46         typedef ci::CuckooSet< item_type, set_traits > set_type;
47
48         test_cuckoo<set_type>();
49     }
50
51     void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_basehook_equal()
52     {
53         typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 0 > >  item_type;
54
55         struct set_traits : public ci::cuckoo::traits {
56             typedef ci::cuckoo::base_hook< ci::cuckoo::probeset_type< item_type::probeset_type >> hook;
57             typedef co::hash_tuple< hash1, hash2 > hash;
58             typedef set::equal_to<item_type> equal_to;
59         };
60         typedef ci::CuckooSet< item_type, set_traits > set_type;
61
62         test_cuckoo<set_type>();
63     }
64
65     void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_basehook_sort_cmp()
66     {
67         typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::list, 0 > >  item_type;
68
69         typedef ci::CuckooSet< item_type
70             ,ci::cuckoo::make_traits<
71                 ci::opt::hook< ci::cuckoo::base_hook<
72                     ci::cuckoo::probeset_type< item_type::probeset_type >
73                 > >
74                 ,co::hash< std::tuple< hash1, hash2 > >
75                 ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
76             >::type
77         > set_type;
78
79         test_cuckoo<set_type>();
80     }
81
82     void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_basehook_sort_cmp()
83     {
84         typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 0 > >  item_type;
85
86         typedef ci::CuckooSet< item_type
87             ,ci::cuckoo::make_traits<
88                 ci::opt::hook< ci::cuckoo::base_hook<
89                     ci::cuckoo::probeset_type< item_type::probeset_type >
90                 > >
91                 ,co::hash< std::tuple< hash1, hash2 > >
92                 ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
93             >::type
94         > set_type;
95
96         test_cuckoo<set_type>();
97     }
98
99     void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_basehook_sort_less()
100     {
101         typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::list, 0 > >  item_type;
102
103         typedef ci::CuckooSet< item_type
104             ,ci::cuckoo::make_traits<
105                 ci::opt::hook< ci::cuckoo::base_hook<
106                     ci::cuckoo::probeset_type< item_type::probeset_type >
107                 > >
108                 ,co::hash< std::tuple< hash1, hash2 > >
109                 ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
110             >::type
111         > set_type;
112
113         test_cuckoo<set_type>();
114     }
115
116     void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_basehook_sort_less()
117     {
118         typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 0 > >  item_type;
119
120         typedef ci::CuckooSet< item_type
121             ,ci::cuckoo::make_traits<
122                 ci::opt::hook< ci::cuckoo::base_hook<
123                     ci::cuckoo::probeset_type< item_type::probeset_type >
124                 > >
125                 ,co::hash< std::tuple< hash1, hash2 > >
126                 ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
127             >::type
128         > set_type;
129
130         test_cuckoo<set_type>();
131     }
132
133     void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_basehook_sort_cmpmix()
134     {
135         typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::list, 0 > >  item_type;
136
137         typedef ci::CuckooSet< item_type
138             ,ci::cuckoo::make_traits<
139                 ci::opt::hook< ci::cuckoo::base_hook<
140                     ci::cuckoo::probeset_type< item_type::probeset_type >
141                 > >
142                 ,co::hash< std::tuple< hash1, hash2 > >
143                 ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
144                 ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
145             >::type
146         > set_type;
147
148         test_cuckoo<set_type>();
149     }
150
151     void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_basehook_sort_cmpmix()
152     {
153         typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<8>, 0 > >  item_type;
154
155         typedef ci::CuckooSet< item_type
156             ,ci::cuckoo::make_traits<
157                 ci::opt::hook< ci::cuckoo::base_hook<
158                     ci::cuckoo::probeset_type< item_type::probeset_type >
159                 > >
160                 ,co::hash< std::tuple< hash1, hash2 > >
161                 ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
162                 ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
163             >::type
164         > set_type;
165
166         test_cuckoo<set_type>();
167     }
168
169     void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_basehook_sort_cmpmix_stat()
170     {
171         typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<8>, 0 > >  item_type;
172
173         typedef ci::CuckooSet< item_type
174             ,ci::cuckoo::make_traits<
175                 ci::opt::hook< ci::cuckoo::base_hook<
176                     ci::cuckoo::probeset_type< item_type::probeset_type >
177                 > >
178                 ,co::hash< std::tuple< hash1, hash2 > >
179                 ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
180                 ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
181                 ,co::stat< ci::cuckoo::stat >
182             >::type
183         > set_type;
184
185         unsigned int nProbesetSize = set_type::node_type::probeset_size ? set_type::node_type::probeset_size : 4;
186         set_type s( 256, nProbesetSize, nProbesetSize / 2 );
187         test_with( s );
188         CPPUNIT_MSG( s.statistics() << s.mutex_policy_statistics() );
189     }
190
191
192     // base hook, store hash
193     void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_basehook_equal_storehash()
194     {
195         typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::list, 2 > >  item_type;
196         typedef ci::CuckooSet< item_type
197             ,ci::cuckoo::make_traits<
198                 ci::opt::hook< ci::cuckoo::base_hook<
199                     ci::cuckoo::probeset_type< item_type::probeset_type >
200                     ,ci::cuckoo::store_hash< item_type::hash_array_size >
201                 > >
202                 ,co::hash< std::tuple< hash1, hash2 > >
203                 ,co::equal_to< equal_to<item_type> >
204             >::type
205         > set_type;
206
207         test_cuckoo<set_type>();
208     }
209
210     void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_basehook_equal_storehash()
211     {
212         typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 2 > >  item_type;
213
214         typedef ci::CuckooSet< item_type
215             ,ci::cuckoo::make_traits<
216                 ci::opt::hook< ci::cuckoo::base_hook<
217                     ci::cuckoo::probeset_type< item_type::probeset_type >
218                     ,ci::cuckoo::store_hash< item_type::hash_array_size >
219                 > >
220                 ,co::hash< std::tuple< hash1, hash2 > >
221                 ,co::equal_to< equal_to<item_type> >
222             >::type
223         > set_type;
224
225         test_cuckoo<set_type>();
226     }
227
228     void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_basehook_sort_cmp_storehash()
229     {
230         typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::list, 2 > >  item_type;
231
232         typedef ci::CuckooSet< item_type
233             ,ci::cuckoo::make_traits<
234                 ci::opt::hook< ci::cuckoo::base_hook<
235                     ci::cuckoo::probeset_type< item_type::probeset_type >
236                     ,ci::cuckoo::store_hash< item_type::hash_array_size >
237                 > >
238                 ,co::hash< std::tuple< hash1, hash2 > >
239                 ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
240             >::type
241         > set_type;
242
243         test_cuckoo<set_type>();
244     }
245
246     void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_basehook_sort_cmp_storehash()
247     {
248         typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 2 > >  item_type;
249
250         typedef ci::CuckooSet< item_type
251             ,ci::cuckoo::make_traits<
252                 ci::opt::hook< ci::cuckoo::base_hook<
253                     ci::cuckoo::probeset_type< item_type::probeset_type >
254                     ,ci::cuckoo::store_hash< item_type::hash_array_size >
255                 > >
256                 ,co::hash< std::tuple< hash1, hash2 > >
257                 ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
258             >::type
259         > set_type;
260
261         test_cuckoo<set_type>();
262     }
263
264     void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_basehook_sort_less_storehash()
265     {
266         typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::list, 2 > >  item_type;
267
268         typedef ci::CuckooSet< item_type
269             ,ci::cuckoo::make_traits<
270                 ci::opt::hook< ci::cuckoo::base_hook<
271                     ci::cuckoo::probeset_type< item_type::probeset_type >
272                     ,ci::cuckoo::store_hash< item_type::hash_array_size >
273                 > >
274                 ,co::hash< std::tuple< hash1, hash2 > >
275                 ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
276             >::type
277         > set_type;
278
279         test_cuckoo<set_type>();
280     }
281
282     void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_basehook_sort_less_storehash()
283     {
284         typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 2 > >  item_type;
285
286         typedef ci::CuckooSet< item_type
287             ,ci::cuckoo::make_traits<
288                 ci::opt::hook< ci::cuckoo::base_hook<
289                     ci::cuckoo::probeset_type< item_type::probeset_type >
290                     ,ci::cuckoo::store_hash< item_type::hash_array_size >
291                 > >
292                 ,co::hash< std::tuple< hash1, hash2 > >
293                 ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
294             >::type
295         > set_type;
296
297         test_cuckoo<set_type>();
298     }
299
300     void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_basehook_sort_cmpmix_storehash()
301     {
302         typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::list, 2 > >  item_type;
303
304         typedef ci::CuckooSet< item_type
305             ,ci::cuckoo::make_traits<
306                 ci::opt::hook< ci::cuckoo::base_hook<
307                     ci::cuckoo::probeset_type< item_type::probeset_type >
308                     ,ci::cuckoo::store_hash< item_type::hash_array_size >
309                 > >
310                 ,co::hash< std::tuple< hash1, hash2 > >
311                 ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
312                 ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
313             >::type
314         > set_type;
315
316         test_cuckoo<set_type>();
317     }
318
319     void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_basehook_sort_cmpmix_storehash()
320     {
321         typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<8>, 2 > >  item_type;
322
323         typedef ci::CuckooSet< item_type
324             ,ci::cuckoo::make_traits<
325                 ci::opt::hook< ci::cuckoo::base_hook<
326                     ci::cuckoo::probeset_type< item_type::probeset_type >
327                     ,ci::cuckoo::store_hash< item_type::hash_array_size >
328                 > >
329                 ,co::hash< std::tuple< hash1, hash2 > >
330                 ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
331                 ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
332             >::type
333         > set_type;
334
335         test_cuckoo<set_type>();
336     }
337
338
339     // Member hook
340     void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_memberhook_equal()
341     {
342         typedef IntrusiveCuckooSetHdrTest::member_item< ci::cuckoo::node< ci::cuckoo::list, 0 > >  item_type;
343         typedef ci::CuckooSet< item_type
344             ,ci::cuckoo::make_traits<
345                 ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember)> >
346                 ,co::hash< std::tuple< hash1, hash2 > >
347                 ,co::equal_to< equal_to<item_type> >
348             >::type
349         > set_type;
350
351         test_cuckoo<set_type>();
352     }
353
354     void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_memberhook_equal()
355     {
356         typedef ci::cuckoo::node< ci::cuckoo::vector<4>, 0 > node_type;
357         typedef IntrusiveCuckooSetHdrTest::member_item< node_type >  item_type;
358
359         typedef ci::CuckooSet< item_type
360             ,ci::cuckoo::make_traits<
361                 ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
362                     ci::cuckoo::probeset_type< node_type::probeset_type >
363                 > >
364                 ,co::hash< std::tuple< hash1, hash2 > >
365                 ,co::equal_to< equal_to<item_type> >
366             >::type
367         > set_type;
368
369         test_cuckoo<set_type>();
370     }
371
372     void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_memberhook_sort_cmp()
373     {
374         typedef ci::cuckoo::node< ci::cuckoo::list, 0 > node_type;
375         typedef IntrusiveCuckooSetHdrTest::member_item< node_type >  item_type;
376
377         typedef ci::CuckooSet< item_type
378             ,ci::cuckoo::make_traits<
379                 ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
380                     ci::cuckoo::probeset_type< node_type::probeset_type >
381                 > >
382                 ,co::hash< std::tuple< hash1, hash2 > >
383                 ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
384             >::type
385         > set_type;
386
387         test_cuckoo<set_type>();
388     }
389
390     void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_memberhook_sort_cmp()
391     {
392         typedef ci::cuckoo::node< ci::cuckoo::vector<4>, 0 > node_type;
393         typedef IntrusiveCuckooSetHdrTest::member_item< node_type >  item_type;
394
395         typedef ci::CuckooSet< item_type
396             ,ci::cuckoo::make_traits<
397                 ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
398                     ci::cuckoo::probeset_type< node_type::probeset_type >
399                 > >
400                 ,co::hash< std::tuple< hash1, hash2 > >
401                 ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
402             >::type
403         > set_type;
404
405         test_cuckoo<set_type>();
406     }
407
408     void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_memberhook_sort_less()
409     {
410         typedef ci::cuckoo::node< ci::cuckoo::list, 0 > node_type;
411         typedef IntrusiveCuckooSetHdrTest::member_item< node_type >  item_type;
412
413         typedef ci::CuckooSet< item_type
414             ,ci::cuckoo::make_traits<
415                 ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
416                     ci::cuckoo::probeset_type< node_type::probeset_type >
417                 > >
418                 ,co::hash< std::tuple< hash1, hash2 > >
419                 ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
420             >::type
421         > set_type;
422
423         test_cuckoo<set_type>();
424     }
425
426     void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_memberhook_sort_less()
427     {
428         typedef ci::cuckoo::node< ci::cuckoo::vector<4>, 0 > node_type;
429         typedef IntrusiveCuckooSetHdrTest::member_item< node_type >  item_type;
430
431         typedef ci::CuckooSet< item_type
432             ,ci::cuckoo::make_traits<
433                 ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
434                     ci::cuckoo::probeset_type< node_type::probeset_type >
435                 > >
436                 ,co::hash< std::tuple< hash1, hash2 > >
437                 ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
438             >::type
439         > set_type;
440
441         test_cuckoo<set_type>();
442     }
443
444     void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_memberhook_sort_cmpmix()
445     {
446         typedef ci::cuckoo::node< ci::cuckoo::list, 0 > node_type;
447         typedef IntrusiveCuckooSetHdrTest::member_item< node_type >  item_type;
448
449         typedef ci::CuckooSet< item_type
450             ,ci::cuckoo::make_traits<
451                 ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
452                     ci::cuckoo::probeset_type< node_type::probeset_type >
453                 > >
454                 ,co::hash< std::tuple< hash1, hash2 > >
455                 ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
456                 ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
457             >::type
458         > set_type;
459
460         test_cuckoo<set_type>();
461     }
462
463     void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_memberhook_sort_cmpmix()
464     {
465         typedef ci::cuckoo::node< ci::cuckoo::vector<8>, 0 > node_type;
466         typedef IntrusiveCuckooSetHdrTest::member_item< node_type >  item_type;
467
468         typedef ci::CuckooSet< item_type
469             ,ci::cuckoo::make_traits<
470                 ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
471                     ci::cuckoo::probeset_type< node_type::probeset_type >
472                 > >
473                 ,co::hash< std::tuple< hash1, hash2 > >
474                 ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
475                 ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
476             >::type
477         > set_type;
478
479         test_cuckoo<set_type>();
480     }
481
482
483     // member hook, store hash
484     void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_memberhook_equal_storehash()
485     {
486         typedef ci::cuckoo::node< ci::cuckoo::list, 2 > node_type;
487         typedef IntrusiveCuckooSetHdrTest::member_item< node_type >  item_type;
488         typedef ci::CuckooSet< item_type
489             ,ci::cuckoo::make_traits<
490                 ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
491                     ci::cuckoo::probeset_type< node_type::probeset_type >
492                     ,ci::cuckoo::store_hash< node_type::hash_array_size >
493                 > >
494                 ,co::hash< std::tuple< hash1, hash2 > >
495                 ,co::equal_to< equal_to<item_type> >
496             >::type
497         > set_type;
498
499         test_cuckoo<set_type>();
500     }
501
502     void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_memberhook_equal_storehash()
503     {
504         typedef ci::cuckoo::node< ci::cuckoo::vector<4>, 2 > node_type;
505         typedef IntrusiveCuckooSetHdrTest::member_item< node_type >  item_type;
506
507         typedef ci::CuckooSet< item_type
508             ,ci::cuckoo::make_traits<
509                 ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
510                     ci::cuckoo::probeset_type< node_type::probeset_type >
511                     ,ci::cuckoo::store_hash< node_type::hash_array_size >
512                 > >
513                 ,co::hash< std::tuple< hash1, hash2 > >
514                 ,co::equal_to< equal_to<item_type> >
515             >::type
516         > set_type;
517
518         test_cuckoo<set_type>();
519     }
520
521     void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_memberhook_sort_cmp_storehash()
522     {
523         typedef ci::cuckoo::node< ci::cuckoo::list, 2 > node_type;
524         typedef IntrusiveCuckooSetHdrTest::member_item< node_type >  item_type;
525
526         typedef ci::CuckooSet< item_type
527             ,ci::cuckoo::make_traits<
528                 ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
529                     ci::cuckoo::probeset_type< node_type::probeset_type >
530                     ,ci::cuckoo::store_hash< node_type::hash_array_size >
531                 > >
532                 ,co::hash< std::tuple< hash1, hash2 > >
533                 ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
534             >::type
535         > set_type;
536
537         test_cuckoo<set_type>();
538     }
539
540     void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_memberhook_sort_cmp_storehash()
541     {
542         typedef ci::cuckoo::node< ci::cuckoo::vector<4>, 2 > node_type;
543         typedef IntrusiveCuckooSetHdrTest::member_item< node_type >  item_type;
544
545         typedef ci::CuckooSet< item_type
546             ,ci::cuckoo::make_traits<
547                 ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
548                     ci::cuckoo::probeset_type< node_type::probeset_type >
549                     ,ci::cuckoo::store_hash< node_type::hash_array_size >
550                 > >
551                 ,co::hash< std::tuple< hash1, hash2 > >
552                 ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
553             >::type
554         > set_type;
555
556         test_cuckoo<set_type>();
557     }
558
559     void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_memberhook_sort_less_storehash()
560     {
561         typedef ci::cuckoo::node< ci::cuckoo::list, 2 > node_type;
562         typedef IntrusiveCuckooSetHdrTest::member_item< node_type >  item_type;
563
564         typedef ci::CuckooSet< item_type
565             ,ci::cuckoo::make_traits<
566                 ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
567                     ci::cuckoo::probeset_type< node_type::probeset_type >
568                     ,ci::cuckoo::store_hash< node_type::hash_array_size >
569                 > >
570                 ,co::hash< std::tuple< hash1, hash2 > >
571                 ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
572             >::type
573         > set_type;
574
575         test_cuckoo<set_type>();
576     }
577
578     void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_memberhook_sort_less_storehash()
579     {
580         typedef ci::cuckoo::node< ci::cuckoo::vector<4>, 2 > node_type;
581         typedef IntrusiveCuckooSetHdrTest::member_item< node_type >  item_type;
582
583         typedef ci::CuckooSet< item_type
584             ,ci::cuckoo::make_traits<
585                 ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
586                     ci::cuckoo::probeset_type< node_type::probeset_type >
587                     ,ci::cuckoo::store_hash< node_type::hash_array_size >
588                 > >
589                 ,co::hash< std::tuple< hash1, hash2 > >
590                 ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
591             >::type
592         > set_type;
593
594         test_cuckoo<set_type>();
595     }
596
597     void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_memberhook_sort_cmpmix_storehash()
598     {
599         typedef ci::cuckoo::node< ci::cuckoo::list, 2 > node_type;
600         typedef IntrusiveCuckooSetHdrTest::member_item< node_type >  item_type;
601
602         typedef ci::CuckooSet< item_type
603             ,ci::cuckoo::make_traits<
604                 ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
605                     ci::cuckoo::probeset_type< node_type::probeset_type >
606                     ,ci::cuckoo::store_hash< node_type::hash_array_size >
607                 > >
608                 ,co::hash< std::tuple< hash1, hash2 > >
609                 ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
610                 ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
611             >::type
612         > set_type;
613
614         test_cuckoo<set_type>();
615     }
616
617     void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_memberhook_sort_cmpmix_storehash()
618     {
619         typedef ci::cuckoo::node< ci::cuckoo::vector<8>, 2 > node_type;
620         typedef IntrusiveCuckooSetHdrTest::member_item< node_type >  item_type;
621
622         typedef ci::CuckooSet< item_type
623             ,ci::cuckoo::make_traits<
624                 ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
625                     ci::cuckoo::probeset_type< node_type::probeset_type >
626                     ,ci::cuckoo::store_hash< node_type::hash_array_size >
627                 > >
628                 ,co::hash< std::tuple< hash1, hash2 > >
629                 ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
630                 ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
631             >::type
632         > set_type;
633
634         test_cuckoo<set_type>();
635     }
636
637 }   // namespace set
638
639 CPPUNIT_TEST_SUITE_REGISTRATION(set::IntrusiveCuckooSetHdrTest);