Changed map_delodd test
[libcds.git] / tests / unit / map2 / map_delodd.h
1 //$$CDS-header$$
2
3 #include "cppunit/thread.h"
4 #include "map2/map_type.h"
5 #include <algorithm> // random_shuffle
6 #include <cds/os/topology.h>
7
8 namespace map2 {
9
10 #   define TEST_MAP(IMPL, C, X)         void C::X() { test<map_type<IMPL, key_type, value_type>::X >(); }
11 #   define TEST_MAP_EXTRACT(IMPL, C, X) void C::X() { test_extract<map_type<IMPL, key_type, value_type>::X >(); }
12 #   define TEST_MAP_NOLF(IMPL, C, X)    void C::X() { test_nolf<map_type<IMPL, key_type, value_type>::X >(); }
13 #   define TEST_MAP_NOLF_EXTRACT(IMPL, C, X) void C::X() { test_nolf_extract<map_type<IMPL, key_type, value_type>::X >(); }
14
15     namespace {
16         struct key_thread
17         {
18             size_t  nKey;
19             size_t  nThread;
20
21             key_thread( size_t key, size_t threadNo )
22                 : nKey( key )
23                 , nThread( threadNo )
24             {}
25
26             key_thread()
27             {}
28         };
29
30         //typedef MapTypes<key_thread, size_t>::key_val     key_value_pair;
31     }
32
33     template <>
34     struct cmp<key_thread> {
35         int operator ()(key_thread const& k1, key_thread const& k2) const
36         {
37             if ( k1.nKey < k2.nKey )
38                 return -1;
39             if ( k1.nKey > k2.nKey )
40                 return 1;
41             if ( k1.nThread < k2.nThread )
42                 return -1;
43             if ( k1.nThread > k2.nThread )
44                 return 1;
45             return 0;
46         }
47         int operator ()(key_thread const& k1, size_t k2) const
48         {
49             if ( k1.nKey < k2 )
50                 return -1;
51             if ( k1.nKey > k2 )
52                 return 1;
53             return 0;
54         }
55         int operator ()(size_t k1, key_thread const& k2) const
56         {
57             if ( k1 < k2.nKey )
58                 return -1;
59             if ( k1 > k2.nKey )
60                 return 1;
61             return 0;
62         }
63     };
64
65 } // namespace map2
66
67 namespace std {
68     template <>
69     struct less<map2::key_thread>
70     {
71         bool operator()(map2::key_thread const& k1, map2::key_thread const& k2) const
72         {
73             if ( k1.nKey <= k2.nKey )
74                 return k1.nKey < k2.nKey || k1.nThread < k2.nThread;
75             return false;
76         }
77     };
78
79     template <>
80     struct hash<map2::key_thread>
81     {
82         typedef size_t              result_type;
83         typedef map2::key_thread    argument_type;
84
85         size_t operator()( map2::key_thread const& k ) const
86         {
87             return std::hash<size_t>()(k.nKey);
88         }
89         size_t operator()( size_t k ) const
90         {
91             return std::hash<size_t>()(k);
92         }
93     };
94 } // namespace std
95
96 namespace boost {
97     inline size_t hash_value( map2::key_thread const& k )
98     {
99         return std::hash<size_t>()( k.nKey );
100     }
101
102     template <>
103     struct hash<map2::key_thread>
104     {
105         typedef size_t              result_type;
106         typedef map2::key_thread    argument_type;
107
108         size_t operator()(map2::key_thread const& k) const
109         {
110             return boost::hash<size_t>()( k.nKey );
111         }
112         size_t operator()(size_t k) const
113         {
114             return boost::hash<size_t>()( k );
115         }
116     };
117 } // namespace boost
118
119 namespace map2 {
120
121     class Map_DelOdd: public CppUnitMini::TestCase
122     {
123         static size_t  c_nMapSize;          // max map size
124         static size_t  c_nInsThreadCount;   // insert thread count
125         static size_t  c_nDelThreadCount;   // delete thread count
126         static size_t  c_nExtractThreadCount;  // extract thread count
127         static size_t  c_nMaxLoadFactor;    // maximum load factor
128         static bool    c_bPrintGCState;
129
130         std::vector<size_t>     m_arrInsert;
131         std::vector<size_t>     m_arrRemove;
132
133     protected:
134         typedef CppUnitMini::TestCase Base;
135
136         typedef key_thread  key_type;
137         typedef size_t      value_type;
138         typedef std::pair<key_type const, value_type> pair_type;
139
140         atomics::atomic<size_t>      m_nInsThreadCount;
141
142         // Inserts keys from [0..N)
143         template <class Map>
144         class InsertThread: public CppUnitMini::TestThread
145         {
146             Map&     m_Map;
147
148             virtual InsertThread *    clone()
149             {
150                 return new InsertThread( *this );
151             }
152
153             struct ensure_func
154             {
155                 template <typename Q>
156                 void operator()( bool /*bNew*/, Q const& )
157                 {}
158                 template <typename Q, typename V>
159                 void operator()( bool /*bNew*/, Q const&, V& )
160                 {}
161             };
162         public:
163             size_t  m_nInsertSuccess;
164             size_t  m_nInsertFailed;
165
166         public:
167             InsertThread( CppUnitMini::ThreadPool& pool, Map& rMap )
168                 : CppUnitMini::TestThread( pool )
169                 , m_Map( rMap )
170             {}
171             InsertThread( InsertThread& src )
172                 : CppUnitMini::TestThread( src )
173                 , m_Map( src.m_Map )
174             {}
175
176             Map_DelOdd&  getTest()
177             {
178                 return reinterpret_cast<Map_DelOdd&>( m_Pool.m_Test );
179             }
180
181             virtual void init() { cds::threading::Manager::attachThread()   ; }
182             virtual void fini() { cds::threading::Manager::detachThread()   ; }
183
184             virtual void test()
185             {
186                 Map& rMap = m_Map;
187
188                 m_nInsertSuccess =
189                     m_nInsertFailed = 0;
190
191                 std::vector<size_t>& arrData = getTest().m_arrInsert;
192                 for ( size_t i = 0; i < arrData.size(); ++i ) {
193                     if ( rMap.insert( key_type( arrData[i], m_nThreadNo )))
194                         ++m_nInsertSuccess;
195                     else
196                         ++m_nInsertFailed;
197                 }
198
199                 ensure_func f;
200                 for ( size_t i = arrData.size() - 1; i > 0; --i ) {
201                     if ( arrData[i] & 1 ) {
202                         rMap.ensure( key_type( arrData[i], m_nThreadNo ), f );
203                     }
204                 }
205
206                 getTest().m_nInsThreadCount.fetch_sub( 1, atomics::memory_order_acquire );
207             }
208         };
209
210         struct key_equal {
211             bool operator()( key_type const& k1, key_type const& k2 ) const
212             {
213                 return k1.nKey == k2.nKey;
214             }
215             bool operator()( size_t k1, key_type const& k2 ) const
216             {
217                 return k1 == k2.nKey;
218             }
219             bool operator()( key_type const& k1, size_t k2 ) const
220             {
221                 return k1.nKey == k2;
222             }
223         };
224
225         struct key_less {
226             bool operator()( key_type const& k1, key_type const& k2 ) const
227             {
228                 return k1.nKey < k2.nKey;
229             }
230             bool operator()( size_t k1, key_type const& k2 ) const
231             {
232                 return k1 < k2.nKey;
233             }
234             bool operator()( key_type const& k1, size_t k2 ) const
235             {
236                 return k1.nKey < k2;
237             }
238
239             typedef key_equal equal_to;
240         };
241
242         // Deletes odd keys from [0..N)
243         template <class Map>
244         class DeleteThread: public CppUnitMini::TestThread
245         {
246             Map&     m_Map;
247
248             virtual DeleteThread *    clone()
249             {
250                 return new DeleteThread( *this );
251             }
252         public:
253             size_t  m_nDeleteSuccess;
254             size_t  m_nDeleteFailed;
255
256         public:
257             DeleteThread( CppUnitMini::ThreadPool& pool, Map& rMap )
258                 : CppUnitMini::TestThread( pool )
259                 , m_Map( rMap )
260             {}
261             DeleteThread( DeleteThread& src )
262                 : CppUnitMini::TestThread( src )
263                 , m_Map( src.m_Map )
264             {}
265
266             Map_DelOdd&  getTest()
267             {
268                 return reinterpret_cast<Map_DelOdd&>( m_Pool.m_Test );
269             }
270
271             virtual void init() { cds::threading::Manager::attachThread()   ; }
272             virtual void fini() { cds::threading::Manager::detachThread()   ; }
273
274             virtual void test()
275             {
276                 Map& rMap = m_Map;
277
278                 m_nDeleteSuccess =
279                     m_nDeleteFailed = 0;
280
281                 for ( size_t pass = 0; pass < 2; pass++ ) {
282                     std::vector<size_t>& arrData = getTest().m_arrRemove;
283                     if ( m_nThreadNo & 1 ) {
284                         for ( size_t k = 0; k < c_nInsThreadCount; ++k ) {
285                             for ( size_t i = 0; i < arrData.size(); ++i ) {
286                                 if ( arrData[i] & 1 ) {
287                                     if ( rMap.erase_with( arrData[i], key_less() ))
288                                         ++m_nDeleteSuccess;
289                                     else
290                                         ++m_nDeleteFailed;
291                                 }
292                             }
293                             if ( getTest().m_nInsThreadCount.load( atomics::memory_order_acquire ) == 0 )
294                                 break;
295                         }
296                     }
297                     else {
298                         for ( size_t k = 0; k < c_nInsThreadCount; ++k ) {
299                             for ( size_t i = arrData.size() - 1; i > 0; --i ) {
300                                 if ( arrData[i] & 1 ) {
301                                     if ( rMap.erase_with( arrData[i], key_less() ))
302                                         ++m_nDeleteSuccess;
303                                     else
304                                         ++m_nDeleteFailed;
305                                 }
306                             }
307                             if ( getTest().m_nInsThreadCount.load( atomics::memory_order_acquire ) == 0 )
308                                 break;
309                         }
310                     }
311                 }
312             }
313         };
314
315         // Deletes odd keys from [0..N)
316         template <class GC, class Map >
317         class ExtractThread: public CppUnitMini::TestThread
318         {
319             Map&     m_Map;
320
321             virtual ExtractThread *    clone()
322             {
323                 return new ExtractThread( *this );
324             }
325         public:
326             size_t  m_nDeleteSuccess;
327             size_t  m_nDeleteFailed;
328
329         public:
330             ExtractThread( CppUnitMini::ThreadPool& pool, Map& rMap )
331                 : CppUnitMini::TestThread( pool )
332                 , m_Map( rMap )
333             {}
334             ExtractThread( ExtractThread& src )
335                 : CppUnitMini::TestThread( src )
336                 , m_Map( src.m_Map )
337             {}
338
339             Map_DelOdd&  getTest()
340             {
341                 return reinterpret_cast<Map_DelOdd&>( m_Pool.m_Test );
342             }
343
344             virtual void init() { cds::threading::Manager::attachThread()   ; }
345             virtual void fini() { cds::threading::Manager::detachThread()   ; }
346
347             virtual void test()
348             {
349                 Map& rMap = m_Map;
350
351                 m_nDeleteSuccess =
352                     m_nDeleteFailed = 0;
353
354                 typename Map::guarded_ptr gp;
355
356                 for ( size_t pass = 0; pass < 2; ++pass ) {
357                     std::vector<size_t>& arrData = getTest().m_arrRemove;
358                     if ( m_nThreadNo & 1 ) {
359                         for ( size_t k = 0; k < c_nInsThreadCount; ++k ) {
360                             for ( size_t i = 0; i < arrData.size(); ++i ) {
361                                 if ( arrData[i] & 1 ) {
362                                     gp = rMap.extract_with( arrData[i], key_less());
363                                     if ( gp )
364                                         ++m_nDeleteSuccess;
365                                     else
366                                         ++m_nDeleteFailed;
367                                     gp.release();
368                                 }
369                             }
370                             if ( getTest().m_nInsThreadCount.load( atomics::memory_order_acquire ) == 0 )
371                                 break;
372                         }
373                     }
374                     else {
375                         for ( size_t k = 0; k < c_nInsThreadCount; ++k ) {
376                             for ( size_t i = arrData.size() - 1; i > 0; --i ) {
377                                 if ( arrData[i] & 1 ) {
378                                     gp = rMap.extract_with( arrData[i], key_less());
379                                     if ( gp )
380                                         ++m_nDeleteSuccess;
381                                     else
382                                         ++m_nDeleteFailed;
383                                     gp.release();
384                                 }
385                             }
386                             if ( getTest().m_nInsThreadCount.load( atomics::memory_order_acquire ) == 0 )
387                                 break;
388                         }
389                     }
390                 }
391             }
392         };
393
394         template <class RCU, class Map >
395         class ExtractThread< cds::urcu::gc<RCU>, Map > : public CppUnitMini::TestThread
396         {
397             Map&     m_Map;
398
399             virtual ExtractThread *    clone()
400             {
401                 return new ExtractThread( *this );
402             }
403         public:
404             size_t  m_nDeleteSuccess;
405             size_t  m_nDeleteFailed;
406
407         public:
408             ExtractThread( CppUnitMini::ThreadPool& pool, Map& rMap )
409                 : CppUnitMini::TestThread( pool )
410                 , m_Map( rMap )
411             {}
412             ExtractThread( ExtractThread& src )
413                 : CppUnitMini::TestThread( src )
414                 , m_Map( src.m_Map )
415             {}
416
417             Map_DelOdd&  getTest()
418             {
419                 return reinterpret_cast<Map_DelOdd&>( m_Pool.m_Test );
420             }
421
422             virtual void init() { cds::threading::Manager::attachThread()   ; }
423             virtual void fini() { cds::threading::Manager::detachThread()   ; }
424
425             virtual void test()
426             {
427                 Map& rMap = m_Map;
428
429                 m_nDeleteSuccess =
430                     m_nDeleteFailed = 0;
431
432                 typename Map::exempt_ptr xp;
433
434                 std::vector<size_t>& arrData = getTest().m_arrRemove;
435                 if ( m_nThreadNo & 1 ) {
436                     for ( size_t k = 0; k < c_nInsThreadCount; ++k ) {
437                         for ( size_t i = 0; i < arrData.size(); ++i ) {
438                             if ( arrData[i] & 1 ) {
439                                 if ( Map::c_bExtractLockExternal ) {
440                                     {
441                                         typename Map::rcu_lock l;
442                                         xp = rMap.extract_with( arrData[i], key_less() );
443                                         if ( xp )
444                                             ++m_nDeleteSuccess;
445                                         else
446                                             ++m_nDeleteFailed;
447                                     }
448                                 }
449                                 else {
450                                     xp = rMap.extract_with( arrData[i], key_less() );
451                                     if ( xp )
452                                         ++m_nDeleteSuccess;
453                                     else
454                                         ++m_nDeleteFailed;
455                                 }
456                                 xp.release();
457                             }
458                         }
459                         if ( getTest().m_nInsThreadCount.load( atomics::memory_order_acquire ) == 0 )
460                             break;
461                     }
462                 }
463                 else {
464                     for ( size_t k = 0; k < c_nInsThreadCount; ++k ) {
465                         for ( size_t i = arrData.size() - 1; i > 0; --i ) {
466                             if ( arrData[i] & 1 ) {
467                                 if ( Map::c_bExtractLockExternal ) {
468                                     {
469                                         typename Map::rcu_lock l;
470                                         xp = rMap.extract_with( arrData[i], key_less() );
471                                         if ( xp )
472                                             ++m_nDeleteSuccess;
473                                         else
474                                             ++m_nDeleteFailed;
475                                     }
476                                 }
477                                 else {
478                                     xp = rMap.extract_with( arrData[i], key_less() );
479                                     if ( xp )
480                                         ++m_nDeleteSuccess;
481                                     else
482                                         ++m_nDeleteFailed;
483                                 }
484                                 xp.release();
485                             }
486                         }
487                         if ( getTest().m_nInsThreadCount.load( atomics::memory_order_acquire ) == 0 )
488                             break;
489                     }
490                 }
491             }
492         };
493
494     protected:
495         template <class Map>
496         void do_test( size_t nLoadFactor )
497         {
498             Map  testMap( c_nMapSize, nLoadFactor );
499             do_test_with( testMap );
500         }
501
502         template <class Map>
503         void do_test_extract( size_t nLoadFactor )
504         {
505             Map  testMap( c_nMapSize, nLoadFactor );
506             do_test_extract_with( testMap );
507         }
508
509         template <class Map>
510         void do_test_with( Map& testMap )
511         {
512             typedef InsertThread<Map> insert_thread;
513             typedef DeleteThread<Map> delete_thread;
514
515             m_nInsThreadCount.store( c_nInsThreadCount, atomics::memory_order_release );
516
517             CppUnitMini::ThreadPool pool( *this );
518             pool.add( new insert_thread( pool, testMap ), c_nInsThreadCount );
519             pool.add( new delete_thread( pool, testMap ), c_nDelThreadCount ? c_nDelThreadCount : cds::OS::topology::processor_count());
520             pool.run();
521             CPPUNIT_MSG( "   Duration=" << pool.avgDuration() );
522
523             size_t nInsertSuccess = 0;
524             size_t nInsertFailed = 0;
525             size_t nDeleteSuccess = 0;
526             size_t nDeleteFailed = 0;
527             for ( CppUnitMini::ThreadPool::iterator it = pool.begin(); it != pool.end(); ++it ) {
528                 insert_thread * pThread = dynamic_cast<insert_thread *>( *it );
529                 if ( pThread ) {
530                     nInsertSuccess += pThread->m_nInsertSuccess;
531                     nInsertFailed += pThread->m_nInsertFailed;
532                 }
533                 else {
534                     delete_thread * p = static_cast<delete_thread *>( *it );
535                     nDeleteSuccess += p->m_nDeleteSuccess;
536                     nDeleteFailed += p->m_nDeleteFailed;
537                 }
538             }
539
540             CPPUNIT_MSG( "  Totals (success/failed): \n\t"
541                 << "      Insert=" << nInsertSuccess << '/' << nInsertFailed << "\n\t"
542                 << "      Delete=" << nDeleteSuccess << '/' << nDeleteFailed << "\n\t"
543                 );
544             CPPUNIT_CHECK( nInsertSuccess == c_nMapSize * c_nInsThreadCount );
545             CPPUNIT_CHECK( nInsertFailed == 0 );
546
547             analyze( testMap );
548         }
549
550         template <class Map>
551         void do_test_extract_with( Map& testMap )
552         {
553             typedef InsertThread<Map> insert_thread;
554             typedef DeleteThread<Map> delete_thread;
555             typedef ExtractThread< typename Map::gc, Map > extract_thread;
556
557             m_nInsThreadCount.store( c_nInsThreadCount, atomics::memory_order_release );
558
559             CppUnitMini::ThreadPool pool( *this );
560             pool.add( new insert_thread( pool, testMap ), c_nInsThreadCount );
561             if ( c_nDelThreadCount )
562                 pool.add( new delete_thread( pool, testMap ), c_nDelThreadCount );
563             if ( c_nExtractThreadCount )
564                 pool.add( new extract_thread( pool, testMap ), c_nExtractThreadCount );
565             pool.run();
566             CPPUNIT_MSG( "   Duration=" << pool.avgDuration() );
567
568             size_t nInsertSuccess = 0;
569             size_t nInsertFailed = 0;
570             size_t nDeleteSuccess = 0;
571             size_t nDeleteFailed = 0;
572             size_t nExtractSuccess = 0;
573             size_t nExtractFailed = 0;
574             for ( CppUnitMini::ThreadPool::iterator it = pool.begin(); it != pool.end(); ++it ) {
575                 insert_thread * pThread = dynamic_cast<insert_thread *>( *it );
576                 if ( pThread ) {
577                     nInsertSuccess += pThread->m_nInsertSuccess;
578                     nInsertFailed += pThread->m_nInsertFailed;
579                 }
580                 else {
581                     delete_thread * p = dynamic_cast<delete_thread *>( *it );
582                     if ( p ) {
583                         nDeleteSuccess += p->m_nDeleteSuccess;
584                         nDeleteFailed += p->m_nDeleteFailed;
585                     }
586                     else {
587                         extract_thread * pExtract = dynamic_cast<extract_thread *>( *it );
588                         assert( pExtract );
589                         nExtractSuccess += pExtract->m_nDeleteSuccess;
590                         nExtractFailed += pExtract->m_nDeleteFailed;
591                     }
592                 }
593             }
594
595             CPPUNIT_MSG( "  Totals (success/failed): \n\t"
596                 << "      Insert=" << nInsertSuccess << '/' << nInsertFailed << "\n\t"
597                 << "      Delete=" << nDeleteSuccess << '/' << nDeleteFailed << "\n\t"
598                 << "      Extract=" << nExtractSuccess << '/' << nExtractFailed << "\n\t"
599                 );
600             CPPUNIT_CHECK( nInsertSuccess == c_nMapSize * c_nInsThreadCount );
601             CPPUNIT_CHECK( nInsertFailed == 0 );
602
603             analyze( testMap );
604         }
605
606         template <class Map>
607         void analyze( Map& testMap )
608         {
609             cds::OS::Timer    timer;
610
611             // All even keys must be in the map
612             {
613                 size_t nErrorCount = 0;
614                 CPPUNIT_MSG( "  Check even keys..." );
615                 for ( size_t n = 0; n < c_nMapSize; n +=2 ) {
616                     for ( size_t i = 0; i < c_nInsThreadCount; ++i ) {
617                         if ( !testMap.find( key_type(n, i) ) ) {
618                             if ( ++nErrorCount < 10 ) {
619                                 CPPUNIT_MSG( "key " << n << "-" << i << " is not found!");
620                             }
621                         }
622                     }
623                 }
624                 CPPUNIT_CHECK_EX( nErrorCount == 0, "Totals: " << nErrorCount << " keys is not found");
625             }
626
627             check_before_cleanup( testMap );
628
629             CPPUNIT_MSG( "  Clear map (single-threaded)..." );
630             timer.reset();
631             testMap.clear();
632             CPPUNIT_MSG( "   Duration=" << timer.duration() );
633             CPPUNIT_CHECK_EX( testMap.empty(), ((long long) testMap.size()) );
634
635             additional_check( testMap );
636             print_stat( testMap );
637
638             additional_cleanup( testMap );
639         }
640
641         template <class Map>
642         void test()
643         {
644             CPPUNIT_MSG( "Insert thread count=" << c_nInsThreadCount
645                 << " delete thread count=" << c_nDelThreadCount
646                 << " set size=" << c_nMapSize
647                 );
648
649             for ( size_t nLoadFactor = 1; nLoadFactor <= c_nMaxLoadFactor; nLoadFactor *= 2 ) {
650                 CPPUNIT_MSG( "Load factor=" << nLoadFactor );
651                 do_test<Map>( nLoadFactor );
652                 if ( c_bPrintGCState )
653                     print_gc_state();
654             }
655         }
656
657         template <class Map>
658         void test_extract()
659         {
660             CPPUNIT_MSG( "Thread count: insert=" << c_nInsThreadCount
661                 << ", delete=" << c_nDelThreadCount
662                 << ", extract=" << c_nExtractThreadCount
663                 << "; set size=" << c_nMapSize
664                 );
665
666             for ( size_t nLoadFactor = 1; nLoadFactor <= c_nMaxLoadFactor; nLoadFactor *= 2 ) {
667                 CPPUNIT_MSG( "Load factor=" << nLoadFactor );
668                 do_test_extract<Map>( nLoadFactor );
669                 if ( c_bPrintGCState )
670                     print_gc_state();
671             }
672         }
673
674         template <class Map>
675         void test_nolf()
676         {
677             CPPUNIT_MSG( "Insert thread count=" << c_nInsThreadCount
678                 << " delete thread count=" << c_nDelThreadCount
679                 << " set size=" << c_nMapSize
680                 );
681
682             Map s;
683             do_test_with( s );
684             if ( c_bPrintGCState )
685                 print_gc_state();
686         }
687
688         template <class Map>
689         void test_nolf_extract()
690         {
691             CPPUNIT_MSG( "Thread count: insert=" << c_nInsThreadCount
692                 << ", delete=" << c_nDelThreadCount
693                 << ", extract=" << c_nExtractThreadCount
694                 << "; set size=" << c_nMapSize
695                 );
696
697             Map s;
698             do_test_extract_with( s );
699             if ( c_bPrintGCState )
700                 print_gc_state();
701         }
702
703         void setUpParams( const CppUnitMini::TestCfg& cfg );
704
705         void run_MichaelMap(const char *in_name, bool invert = false);
706         void run_SplitList(const char *in_name, bool invert = false);
707         //void run_StripedMap(const char *in_name, bool invert = false);
708         //void run_RefinableMap(const char *in_name, bool invert = false);
709         void run_CuckooMap(const char *in_name, bool invert = false);
710         void run_SkipListMap(const char *in_name, bool invert = false);
711         void run_EllenBinTreeMap(const char *in_name, bool invert = false);
712         void run_BronsonAVLTreeMap(const char *in_name, bool invert = false);
713         //void run_StdMap(const char *in_name, bool invert = false);
714
715         virtual void myRun(const char *in_name, bool invert = false);
716
717 #   include "map2/map_defs.h"
718         CDSUNIT_DECLARE_MichaelMap
719         CDSUNIT_DECLARE_SplitList
720         //CDSUNIT_DECLARE_StripedMap
721         //CDSUNIT_DECLARE_RefinableMap
722         CDSUNIT_DECLARE_CuckooMap
723         CDSUNIT_DECLARE_SkipListMap
724         CDSUNIT_DECLARE_EllenBinTreeMap
725         CDSUNIT_DECLARE_BronsonAVLTreeMap
726         //CDSUNIT_DECLARE_StdMap
727     };
728 } // namespace map2