MultiLevelHashSet test, bugfixing
[libcds.git] / tests / test-hdr / set / hdr_intrusive_skiplist_set_rcu.h
1 //$$CDS-header$$
2
3 #ifndef CDSTEST_HDR_INTRUSIVE_SKIPLIST_SET_RCU_H
4 #define CDSTEST_HDR_INTRUSIVE_SKIPLIST_SET_RCU_H
5
6 #include "set/hdr_intrusive_set.h"
7
8 namespace set {
9
10     class IntrusiveSkipListSetRCU: public IntrusiveHashSetHdrTest
11     {
12         typedef IntrusiveHashSetHdrTest base_class;
13
14         static size_t const c_nArrSize = 1000;
15
16         template <typename Set>
17         struct extract_disposer {
18             void operator()( typename Set::value_type * pVal ) const
19             {
20                 pVal->nVal = 0;
21             }
22         };
23
24     protected:
25         struct other_key {
26             int nKey;
27
28             other_key()
29             {}
30
31             other_key( int key )
32                 : nKey(key)
33             {}
34
35             template <typename Q>
36             other_key& operator=( Q const& src )
37             {
38                 nKey = src.nKey;
39                 return *this;
40             }
41         };
42
43         template <typename StoredType>
44         struct other_key_less
45         {
46             bool operator ()( StoredType const& n, other_key k ) const
47             {
48                 return n.nKey < k.nKey;
49             }
50             bool operator ()( other_key k, StoredType const& n ) const
51             {
52                 return k.nKey < n.nKey;
53             }
54         };
55
56         struct copy_other_key
57         {
58             template <typename Q>
59             void operator()( other_key& dest, Q const& src ) const
60             {
61                 dest.nKey = src.nKey;
62             }
63         };
64
65     protected:
66
67         template <class Set, typename PrintStat>
68         void test_skiplist()
69         {
70             {
71                 Set s;
72                 base_class::test_int_with( s );
73             }
74
75             test_skiplist_<Set, PrintStat >();
76         }
77
78         template <class Set, typename PrintStat>
79         void test_skiplist_()
80         {
81             Set s;
82             s.clear();
83             CPPUNIT_ASSERT( s.empty() );
84             CPPUNIT_ASSERT( check_size( s, 0 ));
85
86             typedef typename Set::gc::scoped_lock   rcu_lock;
87             typedef typename Set::value_type        value_type;
88             typedef typename Set::iterator          set_iterator;
89             typedef typename Set::const_iterator    const_set_iterator;
90
91             value_type  v[c_nArrSize];
92             int nCount = 0;
93             int nPrevKey = 0;
94
95             // Test iterator - ascending order
96             for ( int i = 0; i < (int) (sizeof(v)/sizeof(v[0])); ++i ) {
97                 v[i].nKey = i;
98                 v[i].nVal = i * 2;
99
100                 CPPUNIT_ASSERT( s.insert( v[i] ));
101             }
102             CPPUNIT_ASSERT( check_size( s, sizeof(v)/sizeof(v[0]) ));
103
104             //CPPUNIT_MSG( PrintStat()(s, "Iterator test, ascending insert order") );
105
106             nCount = 0;
107             nPrevKey = 0;
108             {
109                 rcu_lock l;
110                 for ( set_iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) {
111                     CPPUNIT_ASSERT( (*it).nKey * 2 == it->nVal );
112                     CPPUNIT_ASSERT( s.contains( it->nKey ));
113                     it->nVal = (*it).nKey;
114                     ++nCount;
115                     if ( it != s.begin() ) {
116                         CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey );
117                     }
118                     nPrevKey = it->nKey;
119                 }
120             }
121             CPPUNIT_ASSERT( check_size( s, sizeof(v)/sizeof(v[0]) ));
122             CPPUNIT_ASSERT( nCount == sizeof(v)/sizeof(v[0]));
123
124             nCount = 0;
125             {
126                 rcu_lock l;
127                 for ( const_set_iterator it = s.cbegin(), itEnd = s.cend(); it != itEnd; ++it ) {
128                     CPPUNIT_ASSERT( (*it).nKey == it->nVal );
129                     ++nCount;
130                     if ( it != s.cbegin() ) {
131                         CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey );
132                     }
133                     nPrevKey = it->nKey;
134                 }
135             }
136             CPPUNIT_CHECK( check_size( s, sizeof(v)/sizeof(v[0]) ));
137             CPPUNIT_CHECK( nCount == sizeof(v)/sizeof(v[0]));
138
139             for ( size_t i = 0; i < sizeof(v)/sizeof(v[0]); ++i ) {
140                 CPPUNIT_ASSERT( v[i].nKey == v[i].nVal );
141                 CPPUNIT_ASSERT( s.contains( v[i].nKey ));
142             }
143
144             s.clear();
145             CPPUNIT_CHECK( s.empty() );
146             CPPUNIT_CHECK( check_size( s, 0));
147             Set::gc::force_dispose();
148
149             for ( size_t i = 0; i < (int) sizeof(v)/sizeof(v[0]); ++i ) {
150                 CPPUNIT_CHECK( v[i].nDisposeCount == 1 );
151             }
152
153             // Test iterator - descending order
154             for ( int i = (int) sizeof(v)/sizeof(v[0]) - 1; i >= 0; --i ) {
155                 v[i].nKey = i;
156                 v[i].nVal = i * 2;
157
158                 CPPUNIT_ASSERT( s.insert( v[i] ));
159             }
160             CPPUNIT_CHECK( check_size( s, sizeof(v)/sizeof(v[0]) ));
161
162             //CPPUNIT_MSG( PrintStat()(s, "Iterator test, descending insert order") );
163
164             nCount = 0;
165             {
166                 rcu_lock l;
167                 for ( set_iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) {
168                     CPPUNIT_ASSERT( (*it).nKey * 2 == it->nVal );
169                     it->nVal = (*it).nKey;
170                     ++nCount;
171                     if ( it != s.begin() ) {
172                         CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey );
173                     }
174                     nPrevKey = it->nKey;
175                 }
176             }
177             CPPUNIT_ASSERT( check_size( s, sizeof(v)/sizeof(v[0]) ));
178             CPPUNIT_ASSERT( nCount == sizeof(v)/sizeof(v[0]));
179
180             nCount = 0;
181             {
182                 rcu_lock l;
183                 for ( const_set_iterator it = s.cbegin(), itEnd = s.cend(); it != itEnd; ++it ) {
184                     CPPUNIT_ASSERT( (*it).nKey == it->nVal );
185                     ++nCount;
186                     if ( it != s.cbegin() ) {
187                         CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey );
188                     }
189                     nPrevKey = it->nKey;
190                 }
191             }
192             CPPUNIT_ASSERT( check_size( s, sizeof(v)/sizeof(v[0]) ));
193             CPPUNIT_ASSERT( nCount == sizeof(v)/sizeof(v[0]));
194
195             for ( size_t i = 0; i < sizeof(v)/sizeof(v[0]); ++i ) {
196                 CPPUNIT_ASSERT( v[i].nKey == v[i].nVal );
197             }
198
199             s.clear();
200             CPPUNIT_ASSERT( s.empty() );
201             CPPUNIT_ASSERT( check_size( s, 0 ));
202             Set::gc::force_dispose();
203
204             for ( size_t i = 0; i < sizeof(v)/sizeof(v[0]); ++i ) {
205                 CPPUNIT_ASSERT( v[i].nDisposeCount == 2 );
206             }
207
208             // Test iterator - random order
209             fill_skiplist( s, v );
210             CPPUNIT_ASSERT( check_size( s, sizeof(v)/sizeof(v[0]) ));
211             //CPPUNIT_MSG( PrintStat()(s, "Iterator test, random insert order") );
212
213             nCount = 0;
214             {
215                 rcu_lock l;
216                 for ( set_iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) {
217                     CPPUNIT_ASSERT( (*it).nKey * 2 == it->nVal );
218                     it->nVal = (*it).nKey;
219                     ++nCount;
220                     if ( it != s.begin() ) {
221                         CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey );
222                     }
223                     nPrevKey = it->nKey;
224                 }
225             }
226             CPPUNIT_ASSERT( check_size( s, sizeof(v)/sizeof(v[0]) ));
227             CPPUNIT_ASSERT( nCount == sizeof(v)/sizeof(v[0]));
228
229             nCount = 0;
230             {
231                 rcu_lock l;
232                 for ( const_set_iterator it = s.cbegin(), itEnd = s.cend(); it != itEnd; ++it ) {
233                     CPPUNIT_ASSERT( (*it).nKey == it->nVal );
234                     ++nCount;
235                     if ( it != s.cbegin() ) {
236                         CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey );
237                     }
238                     nPrevKey = it->nKey;
239                 }
240             }
241             CPPUNIT_ASSERT( check_size( s, sizeof(v)/sizeof(v[0]) ));
242             CPPUNIT_ASSERT( nCount == sizeof(v)/sizeof(v[0]));
243
244             for ( size_t i = 0; i < sizeof(v)/sizeof(v[0]); ++i ) {
245                 CPPUNIT_ASSERT( v[i].nKey == v[i].nVal );
246             }
247
248             s.clear();
249             CPPUNIT_ASSERT( s.empty() );
250             CPPUNIT_ASSERT( check_size( s, 0 ));
251             Set::gc::force_dispose();
252
253             for ( size_t i = 0; i < sizeof(v)/sizeof(v[0]); ++i ) {
254                 CPPUNIT_ASSERT( v[i].nDisposeCount == 3 );
255             }
256
257             // extract/get test
258             {
259                 typename Set::exempt_ptr ep;
260                 typename Set::raw_ptr rp;
261                 // extract
262                 {
263                     fill_skiplist( s, v );
264
265                     for ( int i = c_nArrSize - 1; i >= 0; i -= 1 ) {
266                         {
267                             rcu_lock l;
268                             rp = s.get( i );
269                             CPPUNIT_ASSERT( rp );
270                             CPPUNIT_CHECK( rp->nKey == i );
271                             CPPUNIT_CHECK( rp->nVal == i * 2 );
272                             rp->nVal *= 2;
273                         }
274                         rp.release();
275
276                         ep = s.extract( i );
277                         CPPUNIT_ASSERT( ep );
278                         CPPUNIT_ASSERT( !ep.empty() );
279                         CPPUNIT_CHECK( ep->nKey == i );
280                         CPPUNIT_CHECK( ep->nVal == i * 4 );
281                         ep.release();
282
283                         {
284                             rcu_lock l;
285                             CPPUNIT_CHECK( !s.get( i ));
286                         }
287                         ep = s.extract( i );
288                         CPPUNIT_CHECK( !ep );
289                         CPPUNIT_ASSERT( ep.empty() );
290                     }
291                     CPPUNIT_CHECK( s.empty() );
292                 }
293                 Set::gc::force_dispose();
294
295                 // extract_with
296                 {
297                     fill_skiplist( s, v );
298                     for ( int i = c_nArrSize - 1; i >= 0; i -= 1 ) {
299                         {
300                             rcu_lock l;
301                             rp = s.get_with( other_key(i), other_key_less<typename Set::value_type>() );
302                             CPPUNIT_ASSERT( rp );
303                             CPPUNIT_CHECK( rp->nKey == i );
304                             CPPUNIT_CHECK( rp->nVal == i * 2 );
305                             rp->nVal *= 2;
306                         }
307                         rp.release();
308
309                         ep = s.extract_with( other_key( i ), other_key_less<typename Set::value_type>() );
310                         CPPUNIT_ASSERT( ep );
311                         CPPUNIT_ASSERT( !ep.empty() );
312                         CPPUNIT_CHECK( ep->nKey == i );
313                         CPPUNIT_CHECK( ep->nVal == i * 4 );
314                         ep.release();
315
316                         {
317                             rcu_lock l;
318                             CPPUNIT_CHECK( !s.get_with( other_key( i ), other_key_less<typename Set::value_type>() ));
319                         }
320                         ep = s.extract_with( other_key( i ), other_key_less<typename Set::value_type>() );
321                         CPPUNIT_CHECK( !ep );
322                     }
323                     CPPUNIT_CHECK( s.empty() );
324                 }
325                 Set::gc::force_dispose();
326
327                 // extract_min
328                 {
329                     fill_skiplist( s, v );
330                     int nPrevKey;
331
332                     ep = s.extract_min();
333                     CPPUNIT_ASSERT( ep );
334                     CPPUNIT_ASSERT( !ep.empty());
335                     nPrevKey = ep->nKey;
336                     ep.release();
337
338                     while ( !s.empty() ) {
339                         ep = s.extract_min();
340                         CPPUNIT_ASSERT( ep );
341                         CPPUNIT_ASSERT( !ep.empty());
342                         CPPUNIT_CHECK( ep->nKey == nPrevKey + 1 );
343                         CPPUNIT_CHECK( ep->nVal == (nPrevKey + 1) * 2 );
344                         nPrevKey = ep->nKey;
345                         ep.release();
346                     }
347                     ep = s.extract_min();
348                     CPPUNIT_CHECK( !ep );
349                     CPPUNIT_CHECK( !s.extract_max() );
350                 }
351                 Set::gc::force_dispose();
352
353                 // extract_max
354                 {
355                     fill_skiplist( s, v );
356                     int nPrevKey;
357
358                     ep = s.extract_max();
359                     CPPUNIT_ASSERT( ep );
360                     CPPUNIT_ASSERT( !ep.empty());
361                     nPrevKey = ep->nKey;
362                     ep.release();
363
364                     while ( !s.empty() ) {
365                         ep = s.extract_max();
366                         CPPUNIT_ASSERT( ep );
367                         CPPUNIT_ASSERT( !ep.empty());
368                         CPPUNIT_CHECK( ep->nKey == nPrevKey - 1 );
369                         CPPUNIT_CHECK( ep->nVal == (nPrevKey - 1) * 2 );
370                         nPrevKey = ep->nKey;
371                         ep.release();
372                     }
373                     ep = s.extract_min();
374                     CPPUNIT_CHECK( !ep );
375                     CPPUNIT_CHECK( !s.extract_max() );
376                 }
377                 Set::gc::force_dispose();
378             }
379
380             CPPUNIT_MSG( PrintStat()(s, nullptr) );
381         }
382
383         template <typename Set>
384         void fill_skiplist( Set& s, typename Set::value_type * pArr )
385         {
386             int nRand[c_nArrSize];
387             for ( int i = 0; i < (int) c_nArrSize; ++i ) {
388                 nRand[i] = i;
389             }
390             shuffle( nRand, nRand + c_nArrSize );
391
392             for ( int i = 0; i < (int) c_nArrSize; ++i ) {
393                 pArr[i].nKey = nRand[i];
394                 pArr[i].nVal = nRand[i] * 2;
395                 CPPUNIT_ASSERT( s.insert( pArr[i] ));
396             }
397             CPPUNIT_CHECK( check_size( s, c_nArrSize ));
398         }
399
400     public:
401
402         // Skip-list RCU
403         void skiplist_rcu_gpi_base_cmp();
404         void skiplist_rcu_gpi_base_less();
405         void skiplist_rcu_gpi_base_cmpmix();
406         void skiplist_rcu_gpi_base_cmp_stat();
407         void skiplist_rcu_gpi_base_less_stat();
408         void skiplist_rcu_gpi_base_cmpmix_stat();
409         void skiplist_rcu_gpi_base_cmp_xorshift();
410         void skiplist_rcu_gpi_base_less_xorshift();
411         void skiplist_rcu_gpi_base_cmpmix_xorshift();
412         void skiplist_rcu_gpi_base_cmp_xorshift_stat();
413         void skiplist_rcu_gpi_base_less_xorshift_stat();
414         void skiplist_rcu_gpi_base_cmpmix_xorshift_stat();
415         void skiplist_rcu_gpi_base_cmp_pascal();
416         void skiplist_rcu_gpi_base_less_pascal();
417         void skiplist_rcu_gpi_base_cmpmix_pascal();
418         void skiplist_rcu_gpi_base_cmp_pascal_stat();
419         void skiplist_rcu_gpi_base_less_pascal_stat();
420         void skiplist_rcu_gpi_base_cmpmix_pascal_stat();
421
422         void skiplist_rcu_gpi_member_cmp();
423         void skiplist_rcu_gpi_member_less();
424         void skiplist_rcu_gpi_member_cmpmix();
425         void skiplist_rcu_gpi_member_cmp_stat();
426         void skiplist_rcu_gpi_member_less_stat();
427         void skiplist_rcu_gpi_member_cmpmix_stat();
428         void skiplist_rcu_gpi_member_cmp_xorshift();
429         void skiplist_rcu_gpi_member_less_xorshift();
430         void skiplist_rcu_gpi_member_cmpmix_xorshift();
431         void skiplist_rcu_gpi_member_cmp_xorshift_stat();
432         void skiplist_rcu_gpi_member_less_xorshift_stat();
433         void skiplist_rcu_gpi_member_cmpmix_xorshift_stat();
434         void skiplist_rcu_gpi_member_cmp_pascal();
435         void skiplist_rcu_gpi_member_less_pascal();
436         void skiplist_rcu_gpi_member_cmpmix_pascal();
437         void skiplist_rcu_gpi_member_cmp_pascal_stat();
438         void skiplist_rcu_gpi_member_less_pascal_stat();
439         void skiplist_rcu_gpi_member_cmpmix_pascal_stat();
440
441         // general_buffered
442         void skiplist_rcu_gpb_base_cmp();
443         void skiplist_rcu_gpb_base_less();
444         void skiplist_rcu_gpb_base_cmpmix();
445         void skiplist_rcu_gpb_base_cmp_stat();
446         void skiplist_rcu_gpb_base_less_stat();
447         void skiplist_rcu_gpb_base_cmpmix_stat();
448         void skiplist_rcu_gpb_base_cmp_xorshift();
449         void skiplist_rcu_gpb_base_less_xorshift();
450         void skiplist_rcu_gpb_base_cmpmix_xorshift();
451         void skiplist_rcu_gpb_base_cmp_xorshift_stat();
452         void skiplist_rcu_gpb_base_less_xorshift_stat();
453         void skiplist_rcu_gpb_base_cmpmix_xorshift_stat();
454         void skiplist_rcu_gpb_base_cmp_pascal();
455         void skiplist_rcu_gpb_base_less_pascal();
456         void skiplist_rcu_gpb_base_cmpmix_pascal();
457         void skiplist_rcu_gpb_base_cmp_pascal_stat();
458         void skiplist_rcu_gpb_base_less_pascal_stat();
459         void skiplist_rcu_gpb_base_cmpmix_pascal_stat();
460
461         void skiplist_rcu_gpb_member_cmp();
462         void skiplist_rcu_gpb_member_less();
463         void skiplist_rcu_gpb_member_cmpmix();
464         void skiplist_rcu_gpb_member_cmp_stat();
465         void skiplist_rcu_gpb_member_less_stat();
466         void skiplist_rcu_gpb_member_cmpmix_stat();
467         void skiplist_rcu_gpb_member_cmp_xorshift();
468         void skiplist_rcu_gpb_member_less_xorshift();
469         void skiplist_rcu_gpb_member_cmpmix_xorshift();
470         void skiplist_rcu_gpb_member_cmp_xorshift_stat();
471         void skiplist_rcu_gpb_member_less_xorshift_stat();
472         void skiplist_rcu_gpb_member_cmpmix_xorshift_stat();
473         void skiplist_rcu_gpb_member_cmp_pascal();
474         void skiplist_rcu_gpb_member_less_pascal();
475         void skiplist_rcu_gpb_member_cmpmix_pascal();
476         void skiplist_rcu_gpb_member_cmp_pascal_stat();
477         void skiplist_rcu_gpb_member_less_pascal_stat();
478         void skiplist_rcu_gpb_member_cmpmix_pascal_stat();
479
480         // general_threaded
481         void skiplist_rcu_gpt_base_cmp();
482         void skiplist_rcu_gpt_base_less();
483         void skiplist_rcu_gpt_base_cmpmix();
484         void skiplist_rcu_gpt_base_cmp_stat();
485         void skiplist_rcu_gpt_base_less_stat();
486         void skiplist_rcu_gpt_base_cmpmix_stat();
487         void skiplist_rcu_gpt_base_cmp_xorshift();
488         void skiplist_rcu_gpt_base_less_xorshift();
489         void skiplist_rcu_gpt_base_cmpmix_xorshift();
490         void skiplist_rcu_gpt_base_cmp_xorshift_stat();
491         void skiplist_rcu_gpt_base_less_xorshift_stat();
492         void skiplist_rcu_gpt_base_cmpmix_xorshift_stat();
493         void skiplist_rcu_gpt_base_cmp_pascal();
494         void skiplist_rcu_gpt_base_less_pascal();
495         void skiplist_rcu_gpt_base_cmpmix_pascal();
496         void skiplist_rcu_gpt_base_cmp_pascal_stat();
497         void skiplist_rcu_gpt_base_less_pascal_stat();
498         void skiplist_rcu_gpt_base_cmpmix_pascal_stat();
499
500         void skiplist_rcu_gpt_member_cmp();
501         void skiplist_rcu_gpt_member_less();
502         void skiplist_rcu_gpt_member_cmpmix();
503         void skiplist_rcu_gpt_member_cmp_stat();
504         void skiplist_rcu_gpt_member_less_stat();
505         void skiplist_rcu_gpt_member_cmpmix_stat();
506         void skiplist_rcu_gpt_member_cmp_xorshift();
507         void skiplist_rcu_gpt_member_less_xorshift();
508         void skiplist_rcu_gpt_member_cmpmix_xorshift();
509         void skiplist_rcu_gpt_member_cmp_xorshift_stat();
510         void skiplist_rcu_gpt_member_less_xorshift_stat();
511         void skiplist_rcu_gpt_member_cmpmix_xorshift_stat();
512         void skiplist_rcu_gpt_member_cmp_pascal();
513         void skiplist_rcu_gpt_member_less_pascal();
514         void skiplist_rcu_gpt_member_cmpmix_pascal();
515         void skiplist_rcu_gpt_member_cmp_pascal_stat();
516         void skiplist_rcu_gpt_member_less_pascal_stat();
517         void skiplist_rcu_gpt_member_cmpmix_pascal_stat();
518
519         // signal_buffered
520         void skiplist_rcu_shb_base_cmp();
521         void skiplist_rcu_shb_base_less();
522         void skiplist_rcu_shb_base_cmpmix();
523         void skiplist_rcu_shb_base_cmp_stat();
524         void skiplist_rcu_shb_base_less_stat();
525         void skiplist_rcu_shb_base_cmpmix_stat();
526         void skiplist_rcu_shb_base_cmp_xorshift();
527         void skiplist_rcu_shb_base_less_xorshift();
528         void skiplist_rcu_shb_base_cmpmix_xorshift();
529         void skiplist_rcu_shb_base_cmp_xorshift_stat();
530         void skiplist_rcu_shb_base_less_xorshift_stat();
531         void skiplist_rcu_shb_base_cmpmix_xorshift_stat();
532         void skiplist_rcu_shb_base_cmp_pascal();
533         void skiplist_rcu_shb_base_less_pascal();
534         void skiplist_rcu_shb_base_cmpmix_pascal();
535         void skiplist_rcu_shb_base_cmp_pascal_stat();
536         void skiplist_rcu_shb_base_less_pascal_stat();
537         void skiplist_rcu_shb_base_cmpmix_pascal_stat();
538
539         void skiplist_rcu_shb_member_cmp();
540         void skiplist_rcu_shb_member_less();
541         void skiplist_rcu_shb_member_cmpmix();
542         void skiplist_rcu_shb_member_cmp_stat();
543         void skiplist_rcu_shb_member_less_stat();
544         void skiplist_rcu_shb_member_cmpmix_stat();
545         void skiplist_rcu_shb_member_cmp_xorshift();
546         void skiplist_rcu_shb_member_less_xorshift();
547         void skiplist_rcu_shb_member_cmpmix_xorshift();
548         void skiplist_rcu_shb_member_cmp_xorshift_stat();
549         void skiplist_rcu_shb_member_less_xorshift_stat();
550         void skiplist_rcu_shb_member_cmpmix_xorshift_stat();
551         void skiplist_rcu_shb_member_cmp_pascal();
552         void skiplist_rcu_shb_member_less_pascal();
553         void skiplist_rcu_shb_member_cmpmix_pascal();
554         void skiplist_rcu_shb_member_cmp_pascal_stat();
555         void skiplist_rcu_shb_member_less_pascal_stat();
556         void skiplist_rcu_shb_member_cmpmix_pascal_stat();
557
558         // signal_threaded
559         void skiplist_rcu_sht_base_cmp();
560         void skiplist_rcu_sht_base_less();
561         void skiplist_rcu_sht_base_cmpmix();
562         void skiplist_rcu_sht_base_cmp_stat();
563         void skiplist_rcu_sht_base_less_stat();
564         void skiplist_rcu_sht_base_cmpmix_stat();
565         void skiplist_rcu_sht_base_cmp_xorshift();
566         void skiplist_rcu_sht_base_less_xorshift();
567         void skiplist_rcu_sht_base_cmpmix_xorshift();
568         void skiplist_rcu_sht_base_cmp_xorshift_stat();
569         void skiplist_rcu_sht_base_less_xorshift_stat();
570         void skiplist_rcu_sht_base_cmpmix_xorshift_stat();
571         void skiplist_rcu_sht_base_cmp_pascal();
572         void skiplist_rcu_sht_base_less_pascal();
573         void skiplist_rcu_sht_base_cmpmix_pascal();
574         void skiplist_rcu_sht_base_cmp_pascal_stat();
575         void skiplist_rcu_sht_base_less_pascal_stat();
576         void skiplist_rcu_sht_base_cmpmix_pascal_stat();
577
578         void skiplist_rcu_sht_member_cmp();
579         void skiplist_rcu_sht_member_less();
580         void skiplist_rcu_sht_member_cmpmix();
581         void skiplist_rcu_sht_member_cmp_stat();
582         void skiplist_rcu_sht_member_less_stat();
583         void skiplist_rcu_sht_member_cmpmix_stat();
584         void skiplist_rcu_sht_member_cmp_xorshift();
585         void skiplist_rcu_sht_member_less_xorshift();
586         void skiplist_rcu_sht_member_cmpmix_xorshift();
587         void skiplist_rcu_sht_member_cmp_xorshift_stat();
588         void skiplist_rcu_sht_member_less_xorshift_stat();
589         void skiplist_rcu_sht_member_cmpmix_xorshift_stat();
590         void skiplist_rcu_sht_member_cmp_pascal();
591         void skiplist_rcu_sht_member_less_pascal();
592         void skiplist_rcu_sht_member_cmpmix_pascal();
593         void skiplist_rcu_sht_member_cmp_pascal_stat();
594         void skiplist_rcu_sht_member_less_pascal_stat();
595         void skiplist_rcu_sht_member_cmpmix_pascal_stat();
596
597         CPPUNIT_TEST_SUITE(IntrusiveSkipListSetRCU)
598             CPPUNIT_TEST(skiplist_rcu_gpi_base_cmp)
599             CPPUNIT_TEST(skiplist_rcu_gpi_base_less)
600             CPPUNIT_TEST(skiplist_rcu_gpi_base_cmpmix)
601             CPPUNIT_TEST(skiplist_rcu_gpi_base_cmp_stat)
602             CPPUNIT_TEST(skiplist_rcu_gpi_base_less_stat)
603             CPPUNIT_TEST(skiplist_rcu_gpi_base_cmpmix_stat)
604             CPPUNIT_TEST(skiplist_rcu_gpi_base_cmp_xorshift)
605             CPPUNIT_TEST(skiplist_rcu_gpi_base_less_xorshift)
606             CPPUNIT_TEST(skiplist_rcu_gpi_base_cmpmix_xorshift)
607             CPPUNIT_TEST(skiplist_rcu_gpi_base_cmp_xorshift_stat)
608             CPPUNIT_TEST(skiplist_rcu_gpi_base_less_xorshift_stat)
609             CPPUNIT_TEST(skiplist_rcu_gpi_base_cmpmix_xorshift_stat)
610             CPPUNIT_TEST(skiplist_rcu_gpi_base_cmp_pascal)
611             CPPUNIT_TEST(skiplist_rcu_gpi_base_less_pascal)
612             CPPUNIT_TEST(skiplist_rcu_gpi_base_cmpmix_pascal)
613             CPPUNIT_TEST(skiplist_rcu_gpi_base_cmp_pascal_stat)
614             CPPUNIT_TEST(skiplist_rcu_gpi_base_less_pascal_stat)
615             CPPUNIT_TEST(skiplist_rcu_gpi_base_cmpmix_pascal_stat)
616
617             CPPUNIT_TEST(skiplist_rcu_gpi_member_cmp)
618             CPPUNIT_TEST(skiplist_rcu_gpi_member_less)
619             CPPUNIT_TEST(skiplist_rcu_gpi_member_cmpmix)
620             CPPUNIT_TEST(skiplist_rcu_gpi_member_cmp_stat)
621             CPPUNIT_TEST(skiplist_rcu_gpi_member_less_stat)
622             CPPUNIT_TEST(skiplist_rcu_gpi_member_cmpmix_stat)
623             CPPUNIT_TEST(skiplist_rcu_gpi_member_cmp_xorshift)
624             CPPUNIT_TEST(skiplist_rcu_gpi_member_less_xorshift)
625             CPPUNIT_TEST(skiplist_rcu_gpi_member_cmpmix_xorshift)
626             CPPUNIT_TEST(skiplist_rcu_gpi_member_cmp_xorshift_stat)
627             CPPUNIT_TEST(skiplist_rcu_gpi_member_less_xorshift_stat)
628             CPPUNIT_TEST(skiplist_rcu_gpi_member_cmpmix_xorshift_stat)
629             CPPUNIT_TEST(skiplist_rcu_gpi_member_cmp_pascal)
630             CPPUNIT_TEST(skiplist_rcu_gpi_member_less_pascal)
631             CPPUNIT_TEST(skiplist_rcu_gpi_member_cmpmix_pascal)
632             CPPUNIT_TEST(skiplist_rcu_gpi_member_cmp_pascal_stat)
633             CPPUNIT_TEST(skiplist_rcu_gpi_member_less_pascal_stat)
634             CPPUNIT_TEST(skiplist_rcu_gpi_member_cmpmix_pascal_stat)
635
636             //
637             CPPUNIT_TEST(skiplist_rcu_gpb_base_cmp)
638             CPPUNIT_TEST(skiplist_rcu_gpb_base_less)
639             CPPUNIT_TEST(skiplist_rcu_gpb_base_cmpmix)
640             CPPUNIT_TEST(skiplist_rcu_gpb_base_cmp_stat)
641             CPPUNIT_TEST(skiplist_rcu_gpb_base_less_stat)
642             CPPUNIT_TEST(skiplist_rcu_gpb_base_cmpmix_stat)
643             CPPUNIT_TEST(skiplist_rcu_gpb_base_cmp_xorshift)
644             CPPUNIT_TEST(skiplist_rcu_gpb_base_less_xorshift)
645             CPPUNIT_TEST(skiplist_rcu_gpb_base_cmpmix_xorshift)
646             CPPUNIT_TEST(skiplist_rcu_gpb_base_cmp_xorshift_stat)
647             CPPUNIT_TEST(skiplist_rcu_gpb_base_less_xorshift_stat)
648             CPPUNIT_TEST(skiplist_rcu_gpb_base_cmpmix_xorshift_stat)
649             CPPUNIT_TEST(skiplist_rcu_gpb_base_cmp_pascal)
650             CPPUNIT_TEST(skiplist_rcu_gpb_base_less_pascal)
651             CPPUNIT_TEST(skiplist_rcu_gpb_base_cmpmix_pascal)
652             CPPUNIT_TEST(skiplist_rcu_gpb_base_cmp_pascal_stat)
653             CPPUNIT_TEST(skiplist_rcu_gpb_base_less_pascal_stat)
654             CPPUNIT_TEST(skiplist_rcu_gpb_base_cmpmix_pascal_stat)
655
656             CPPUNIT_TEST(skiplist_rcu_gpb_member_cmp)
657             CPPUNIT_TEST(skiplist_rcu_gpb_member_less)
658             CPPUNIT_TEST(skiplist_rcu_gpb_member_cmpmix)
659             CPPUNIT_TEST(skiplist_rcu_gpb_member_cmp_stat)
660             CPPUNIT_TEST(skiplist_rcu_gpb_member_less_stat)
661             CPPUNIT_TEST(skiplist_rcu_gpb_member_cmpmix_stat)
662             CPPUNIT_TEST(skiplist_rcu_gpb_member_cmp_xorshift)
663             CPPUNIT_TEST(skiplist_rcu_gpb_member_less_xorshift)
664             CPPUNIT_TEST(skiplist_rcu_gpb_member_cmpmix_xorshift)
665             CPPUNIT_TEST(skiplist_rcu_gpb_member_cmp_xorshift_stat)
666             CPPUNIT_TEST(skiplist_rcu_gpb_member_less_xorshift_stat)
667             CPPUNIT_TEST(skiplist_rcu_gpb_member_cmpmix_xorshift_stat)
668             CPPUNIT_TEST(skiplist_rcu_gpb_member_cmp_pascal)
669             CPPUNIT_TEST(skiplist_rcu_gpb_member_less_pascal)
670             CPPUNIT_TEST(skiplist_rcu_gpb_member_cmpmix_pascal)
671             CPPUNIT_TEST(skiplist_rcu_gpb_member_cmp_pascal_stat)
672             CPPUNIT_TEST(skiplist_rcu_gpb_member_less_pascal_stat)
673             CPPUNIT_TEST(skiplist_rcu_gpb_member_cmpmix_pascal_stat)
674
675             //
676             CPPUNIT_TEST(skiplist_rcu_gpt_base_cmp)
677             CPPUNIT_TEST(skiplist_rcu_gpt_base_less)
678             CPPUNIT_TEST(skiplist_rcu_gpt_base_cmpmix)
679             CPPUNIT_TEST(skiplist_rcu_gpt_base_cmp_stat)
680             CPPUNIT_TEST(skiplist_rcu_gpt_base_less_stat)
681             CPPUNIT_TEST(skiplist_rcu_gpt_base_cmpmix_stat)
682             CPPUNIT_TEST(skiplist_rcu_gpt_base_cmp_xorshift)
683             CPPUNIT_TEST(skiplist_rcu_gpt_base_less_xorshift)
684             CPPUNIT_TEST(skiplist_rcu_gpt_base_cmpmix_xorshift)
685             CPPUNIT_TEST(skiplist_rcu_gpt_base_cmp_xorshift_stat)
686             CPPUNIT_TEST(skiplist_rcu_gpt_base_less_xorshift_stat)
687             CPPUNIT_TEST(skiplist_rcu_gpt_base_cmpmix_xorshift_stat)
688             CPPUNIT_TEST(skiplist_rcu_gpt_base_cmp_pascal)
689             CPPUNIT_TEST(skiplist_rcu_gpt_base_less_pascal)
690             CPPUNIT_TEST(skiplist_rcu_gpt_base_cmpmix_pascal)
691             CPPUNIT_TEST(skiplist_rcu_gpt_base_cmp_pascal_stat)
692             CPPUNIT_TEST(skiplist_rcu_gpt_base_less_pascal_stat)
693             CPPUNIT_TEST(skiplist_rcu_gpt_base_cmpmix_pascal_stat)
694
695             CPPUNIT_TEST(skiplist_rcu_gpt_member_cmp)
696             CPPUNIT_TEST(skiplist_rcu_gpt_member_less)
697             CPPUNIT_TEST(skiplist_rcu_gpt_member_cmpmix)
698             CPPUNIT_TEST(skiplist_rcu_gpt_member_cmp_stat)
699             CPPUNIT_TEST(skiplist_rcu_gpt_member_less_stat)
700             CPPUNIT_TEST(skiplist_rcu_gpt_member_cmpmix_stat)
701             CPPUNIT_TEST(skiplist_rcu_gpt_member_cmp_xorshift)
702             CPPUNIT_TEST(skiplist_rcu_gpt_member_less_xorshift)
703             CPPUNIT_TEST(skiplist_rcu_gpt_member_cmpmix_xorshift)
704             CPPUNIT_TEST(skiplist_rcu_gpt_member_cmp_xorshift_stat)
705             CPPUNIT_TEST(skiplist_rcu_gpt_member_less_xorshift_stat)
706             CPPUNIT_TEST(skiplist_rcu_gpt_member_cmpmix_xorshift_stat)
707             CPPUNIT_TEST(skiplist_rcu_gpt_member_cmp_pascal)
708             CPPUNIT_TEST(skiplist_rcu_gpt_member_less_pascal)
709             CPPUNIT_TEST(skiplist_rcu_gpt_member_cmpmix_pascal)
710             CPPUNIT_TEST(skiplist_rcu_gpt_member_cmp_pascal_stat)
711             CPPUNIT_TEST(skiplist_rcu_gpt_member_less_pascal_stat)
712             CPPUNIT_TEST(skiplist_rcu_gpt_member_cmpmix_pascal_stat)
713
714             //
715             CPPUNIT_TEST(skiplist_rcu_shb_base_cmp)
716             CPPUNIT_TEST(skiplist_rcu_shb_base_less)
717             CPPUNIT_TEST(skiplist_rcu_shb_base_cmpmix)
718             CPPUNIT_TEST(skiplist_rcu_shb_base_cmp_stat)
719             CPPUNIT_TEST(skiplist_rcu_shb_base_less_stat)
720             CPPUNIT_TEST(skiplist_rcu_shb_base_cmpmix_stat)
721             CPPUNIT_TEST(skiplist_rcu_shb_base_cmp_xorshift)
722             CPPUNIT_TEST(skiplist_rcu_shb_base_less_xorshift)
723             CPPUNIT_TEST(skiplist_rcu_shb_base_cmpmix_xorshift)
724             CPPUNIT_TEST(skiplist_rcu_shb_base_cmp_xorshift_stat)
725             CPPUNIT_TEST(skiplist_rcu_shb_base_less_xorshift_stat)
726             CPPUNIT_TEST(skiplist_rcu_shb_base_cmpmix_xorshift_stat)
727             CPPUNIT_TEST(skiplist_rcu_shb_base_cmp_pascal)
728             CPPUNIT_TEST(skiplist_rcu_shb_base_less_pascal)
729             CPPUNIT_TEST(skiplist_rcu_shb_base_cmpmix_pascal)
730             CPPUNIT_TEST(skiplist_rcu_shb_base_cmp_pascal_stat)
731             CPPUNIT_TEST(skiplist_rcu_shb_base_less_pascal_stat)
732             CPPUNIT_TEST(skiplist_rcu_shb_base_cmpmix_pascal_stat)
733
734             CPPUNIT_TEST(skiplist_rcu_shb_member_cmp)
735             CPPUNIT_TEST(skiplist_rcu_shb_member_less)
736             CPPUNIT_TEST(skiplist_rcu_shb_member_cmpmix)
737             CPPUNIT_TEST(skiplist_rcu_shb_member_cmp_stat)
738             CPPUNIT_TEST(skiplist_rcu_shb_member_less_stat)
739             CPPUNIT_TEST(skiplist_rcu_shb_member_cmpmix_stat)
740             CPPUNIT_TEST(skiplist_rcu_shb_member_cmp_xorshift)
741             CPPUNIT_TEST(skiplist_rcu_shb_member_less_xorshift)
742             CPPUNIT_TEST(skiplist_rcu_shb_member_cmpmix_xorshift)
743             CPPUNIT_TEST(skiplist_rcu_shb_member_cmp_xorshift_stat)
744             CPPUNIT_TEST(skiplist_rcu_shb_member_less_xorshift_stat)
745             CPPUNIT_TEST(skiplist_rcu_shb_member_cmpmix_xorshift_stat)
746             CPPUNIT_TEST(skiplist_rcu_shb_member_cmp_pascal)
747             CPPUNIT_TEST(skiplist_rcu_shb_member_less_pascal)
748             CPPUNIT_TEST(skiplist_rcu_shb_member_cmpmix_pascal)
749             CPPUNIT_TEST(skiplist_rcu_shb_member_cmp_pascal_stat)
750             CPPUNIT_TEST(skiplist_rcu_shb_member_less_pascal_stat)
751             CPPUNIT_TEST(skiplist_rcu_shb_member_cmpmix_pascal_stat)
752
753             //
754             CPPUNIT_TEST(skiplist_rcu_sht_base_cmp)
755             CPPUNIT_TEST(skiplist_rcu_sht_base_less)
756             CPPUNIT_TEST(skiplist_rcu_sht_base_cmpmix)
757             CPPUNIT_TEST(skiplist_rcu_sht_base_cmp_stat)
758             CPPUNIT_TEST(skiplist_rcu_sht_base_less_stat)
759             CPPUNIT_TEST(skiplist_rcu_sht_base_cmpmix_stat)
760             CPPUNIT_TEST(skiplist_rcu_sht_base_cmp_xorshift)
761             CPPUNIT_TEST(skiplist_rcu_sht_base_less_xorshift)
762             CPPUNIT_TEST(skiplist_rcu_sht_base_cmpmix_xorshift)
763             CPPUNIT_TEST(skiplist_rcu_sht_base_cmp_xorshift_stat)
764             CPPUNIT_TEST(skiplist_rcu_sht_base_less_xorshift_stat)
765             CPPUNIT_TEST(skiplist_rcu_sht_base_cmpmix_xorshift_stat)
766             CPPUNIT_TEST(skiplist_rcu_sht_base_cmp_pascal)
767             CPPUNIT_TEST(skiplist_rcu_sht_base_less_pascal)
768             CPPUNIT_TEST(skiplist_rcu_sht_base_cmpmix_pascal)
769             CPPUNIT_TEST(skiplist_rcu_sht_base_cmp_pascal_stat)
770             CPPUNIT_TEST(skiplist_rcu_sht_base_less_pascal_stat)
771             CPPUNIT_TEST(skiplist_rcu_sht_base_cmpmix_pascal_stat)
772
773             CPPUNIT_TEST(skiplist_rcu_sht_member_cmp)
774             CPPUNIT_TEST(skiplist_rcu_sht_member_less)
775             CPPUNIT_TEST(skiplist_rcu_sht_member_cmpmix)
776             CPPUNIT_TEST(skiplist_rcu_sht_member_cmp_stat)
777             CPPUNIT_TEST(skiplist_rcu_sht_member_less_stat)
778             CPPUNIT_TEST(skiplist_rcu_sht_member_cmpmix_stat)
779             CPPUNIT_TEST(skiplist_rcu_sht_member_cmp_xorshift)
780             CPPUNIT_TEST(skiplist_rcu_sht_member_less_xorshift)
781             CPPUNIT_TEST(skiplist_rcu_sht_member_cmpmix_xorshift)
782             CPPUNIT_TEST(skiplist_rcu_sht_member_cmp_xorshift_stat)
783             CPPUNIT_TEST(skiplist_rcu_sht_member_less_xorshift_stat)
784             CPPUNIT_TEST(skiplist_rcu_sht_member_cmpmix_xorshift_stat)
785             CPPUNIT_TEST(skiplist_rcu_sht_member_cmp_pascal)
786             CPPUNIT_TEST(skiplist_rcu_sht_member_less_pascal)
787             CPPUNIT_TEST(skiplist_rcu_sht_member_cmpmix_pascal)
788             CPPUNIT_TEST(skiplist_rcu_sht_member_cmp_pascal_stat)
789             CPPUNIT_TEST(skiplist_rcu_sht_member_less_pascal_stat)
790             CPPUNIT_TEST(skiplist_rcu_sht_member_cmpmix_pascal_stat)
791
792         CPPUNIT_TEST_SUITE_END()
793     };
794 } // namespace set
795
796 #endif // #ifndef CDSTEST_HDR_INTRUSIVE_SKIPLIST_SET_RCU_H