Fixed GCC warnings
[libcds.git] / test / stress / set / set_type_feldman_hashset.h
1 /*
2     This file is a part of libcds - Concurrent Data Structures library
3
4     (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2017
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 #ifndef CDSUNIT_SET_TYPE_FELDMAN_HASHSET_H
32 #define CDSUNIT_SET_TYPE_FELDMAN_HASHSET_H
33
34 #include "set/set_type.h"
35
36 #include <cds/container/feldman_hashset_hp.h>
37 #include <cds/container/feldman_hashset_dhp.h>
38 #include <cds/container/feldman_hashset_rcu.h>
39
40 #include <cds_test/stat_feldman_hashset_out.h>
41 #include <cds_test/hash_func.h>
42
43 namespace set {
44
45     template <class GC, typename T, typename Traits = cc::feldman_hashset::traits>
46     class FeldmanHashSet : public cc::FeldmanHashSet< GC, T, Traits >
47     {
48         typedef cc::FeldmanHashSet< GC, T, Traits > base_class;
49
50         
51         template <typename GC2>
52         struct get_extracted_ptr
53         {
54             typedef typename base_class::guarded_ptr extracted_ptr;
55         };
56
57         template <typename RCU>
58         struct get_extracted_ptr<cds::urcu::gc<RCU>>
59         {
60             typedef typename base_class::exempt_ptr extracted_ptr;
61         };
62
63     public:
64         typedef typename T::hasher hasher;
65         typedef typename get_extracted_ptr<GC>::extracted_ptr extracted_ptr;
66
67         template <typename OtherTraits>
68         struct rebind_traits {
69             typedef FeldmanHashSet<GC, T, OtherTraits > result;
70         };
71
72         template <class Config>
73         FeldmanHashSet( Config const& cfg )
74             : base_class( cfg.s_nFeldmanSet_HeadBits, cfg.s_nFeldmanSet_ArrayBits )
75         {}
76
77         template <typename Q>
78         bool erase( Q const& key )
79         {
80             return base_class::erase( hasher()( key ));
81         }
82
83         template <typename Q, typename Func>
84         bool erase( Q const& key, Func f )
85         {
86             return base_class::erase( hasher()( key ), f );
87         }
88
89         template <typename Q>
90         extracted_ptr extract(Q const& key)
91         {
92             return base_class::extract( hasher()(key));
93         }
94
95         template <typename Q>
96         bool contains( Q const& key )
97         {
98             return base_class::contains( hasher()(key));
99         }
100
101         template <typename Iterator>
102         typename std::enable_if< std::is_same< Iterator, typename base_class::iterator>::value, Iterator>::type
103         get_begin()
104         {
105             return base_class::begin();
106         }
107
108         template <typename Iterator>
109         typename std::enable_if< std::is_same< Iterator, typename base_class::iterator>::value, Iterator>::type
110         get_end()
111         {
112             return base_class::end();
113         }
114
115         template <typename Iterator>
116         typename std::enable_if< std::is_same< Iterator, typename base_class::reverse_iterator>::value, Iterator>::type
117         get_begin()
118         {
119             return base_class::rbegin();
120         }
121
122         template <typename Iterator>
123         typename std::enable_if< std::is_same< Iterator, typename base_class::reverse_iterator>::value, Iterator>::type
124         get_end()
125         {
126             return base_class::rend();
127         }
128
129         // for testing
130         static CDS_CONSTEXPR bool const c_bExtractSupported = true;
131         static CDS_CONSTEXPR bool const c_bLoadFactorDepended = false;
132         static CDS_CONSTEXPR bool const c_bEraseExactKey = true;
133     };
134
135     struct tag_FeldmanHashSet;
136
137     template <typename Key, typename Val>
138     struct set_type< tag_FeldmanHashSet, Key, Val >: public set_type_base< Key, Val >
139     {
140         typedef set_type_base< Key, Val > base_class;
141         typedef typename base_class::compare compare;
142         typedef typename base_class::less less;
143         typedef typename base_class::hash hash;
144         typedef typename base_class::key_type   key_type;
145         typedef typename base_class::value_type value_type;
146
147         template <typename Hasher>
148         struct hash_type
149         {
150             typedef Hasher hasher;
151             typedef typename hasher::hash_type type;
152         };
153
154         template <typename TH>
155         struct hash_type<std::hash<TH>>
156         {
157             typedef std::hash<TH> hasher;
158             typedef size_t type;
159         };
160
161         template <typename Hasher>
162         struct key_val: base_class::key_val
163         {
164             typedef typename base_class::key_val base;
165             typedef Hasher hasher;
166             typedef typename hash_type<hasher>::type hash_type;
167
168             hash_type hash;
169
170             explicit key_val( key_type const& k ): base(k), hash( hasher()( k )) {}
171             key_val( key_type const& k, value_type const& v ): base(k, v), hash( hasher()( k )) {}
172
173             template <typename K>
174             explicit key_val( K const& k ): base(k), hash( hasher()( k )) {}
175
176             template <typename K, typename T>
177             key_val( K const& k, T const& v ): base(k, v), hash( hasher()( k )) {}
178         };
179
180         struct default_traits : public cc::feldman_hashset::traits
181         {
182             struct hash_accessor {
183                 template <typename Hasher>
184                 typename key_val<Hasher>::hash_type const& operator()( key_val<Hasher> const& kv )
185                 {
186                     return kv.hash;
187                 }
188             };
189         };
190
191         typedef FeldmanHashSet< cds::gc::HP,  key_val<std::hash<key_type>>, default_traits >    FeldmanHashSet_hp_stdhash;
192         typedef FeldmanHashSet< cds::gc::DHP, key_val<std::hash<key_type>>, default_traits >    FeldmanHashSet_dhp_stdhash;
193         typedef FeldmanHashSet< rcu_gpi, key_val<std::hash<key_type>>, default_traits >    FeldmanHashSet_rcu_gpi_stdhash;
194         typedef FeldmanHashSet< rcu_gpb, key_val<std::hash<key_type>>, default_traits >    FeldmanHashSet_rcu_gpb_stdhash;
195         typedef FeldmanHashSet< rcu_gpt, key_val<std::hash<key_type>>, default_traits >    FeldmanHashSet_rcu_gpt_stdhash;
196 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
197         typedef FeldmanHashSet< rcu_shb, key_val<std::hash<key_type>>, default_traits >    FeldmanHashSet_rcu_shb_stdhash;
198         typedef FeldmanHashSet< rcu_sht, key_val<std::hash<key_type>>, default_traits >    FeldmanHashSet_rcu_sht_stdhash;
199 #endif
200
201         struct traits_FeldmanHashSet_stat: public cc::feldman_hashset::make_traits<
202                 co::type_traits< default_traits >,
203                 co::stat< cc::feldman_hashset::stat<>>
204             >::type
205         {};
206
207         typedef FeldmanHashSet< cds::gc::HP,  key_val<std::hash<key_type>>, traits_FeldmanHashSet_stat >    FeldmanHashSet_hp_stdhash_stat;
208         typedef FeldmanHashSet< cds::gc::DHP, key_val<std::hash<key_type>>, traits_FeldmanHashSet_stat >    FeldmanHashSet_dhp_stdhash_stat;
209         typedef FeldmanHashSet< rcu_gpi, key_val<std::hash<key_type>>, traits_FeldmanHashSet_stat >    FeldmanHashSet_rcu_gpi_stdhash_stat;
210         typedef FeldmanHashSet< rcu_gpb, key_val<std::hash<key_type>>, traits_FeldmanHashSet_stat >    FeldmanHashSet_rcu_gpb_stdhash_stat;
211         typedef FeldmanHashSet< rcu_gpt, key_val<std::hash<key_type>>, traits_FeldmanHashSet_stat >    FeldmanHashSet_rcu_gpt_stdhash_stat;
212 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
213         typedef FeldmanHashSet< rcu_shb, key_val<std::hash<key_type>>, traits_FeldmanHashSet_stat >    FeldmanHashSet_rcu_shb_stdhash_stat;
214         typedef FeldmanHashSet< rcu_sht, key_val<std::hash<key_type>>, traits_FeldmanHashSet_stat >    FeldmanHashSet_rcu_sht_stdhash_stat;
215 #endif
216
217         // CityHash
218 #if CDS_BUILD_BITS == 64
219         struct traits_FeldmanHashSet_city64 : public default_traits
220         {
221             typedef ::cds_test::city64::less less;
222         };
223         typedef FeldmanHashSet< cds::gc::HP,  key_val<::cds_test::city64>, traits_FeldmanHashSet_city64 >    FeldmanHashSet_hp_city64;
224         typedef FeldmanHashSet< cds::gc::DHP, key_val<::cds_test::city64>, traits_FeldmanHashSet_city64 >    FeldmanHashSet_dhp_city64;
225         typedef FeldmanHashSet< rcu_gpi, key_val<::cds_test::city64>, traits_FeldmanHashSet_city64 >    FeldmanHashSet_rcu_gpi_city64;
226         typedef FeldmanHashSet< rcu_gpb, key_val<::cds_test::city64>, traits_FeldmanHashSet_city64 >    FeldmanHashSet_rcu_gpb_city64;
227         typedef FeldmanHashSet< rcu_gpt, key_val<::cds_test::city64>, traits_FeldmanHashSet_city64 >    FeldmanHashSet_rcu_gpt_city64;
228 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
229         typedef FeldmanHashSet< rcu_shb, key_val<::cds_test::city64>, traits_FeldmanHashSet_city64 >    FeldmanHashSet_rcu_shb_city64;
230         typedef FeldmanHashSet< rcu_sht, key_val<::cds_test::city64>, traits_FeldmanHashSet_city64 >    FeldmanHashSet_rcu_sht_city64;
231 #endif
232
233         struct traits_FeldmanHashSet_city64_stat : public traits_FeldmanHashSet_city64
234         {
235             typedef cc::feldman_hashset::stat<> stat;
236         };
237         typedef FeldmanHashSet< cds::gc::HP,  key_val<::cds_test::city64>, traits_FeldmanHashSet_city64_stat >    FeldmanHashSet_hp_city64_stat;
238         typedef FeldmanHashSet< cds::gc::DHP, key_val<::cds_test::city64>, traits_FeldmanHashSet_city64_stat >    FeldmanHashSet_dhp_city64_stat;
239         typedef FeldmanHashSet< rcu_gpi, key_val<::cds_test::city64>, traits_FeldmanHashSet_city64_stat >    FeldmanHashSet_rcu_gpi_city64_stat;
240         typedef FeldmanHashSet< rcu_gpb, key_val<::cds_test::city64>, traits_FeldmanHashSet_city64_stat >    FeldmanHashSet_rcu_gpb_city64_stat;
241         typedef FeldmanHashSet< rcu_gpt, key_val<::cds_test::city64>, traits_FeldmanHashSet_city64_stat >    FeldmanHashSet_rcu_gpt_city64_stat;
242 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
243         typedef FeldmanHashSet< rcu_shb, key_val<::cds_test::city64>, traits_FeldmanHashSet_city64_stat >    FeldmanHashSet_rcu_shb_city64_stat;
244         typedef FeldmanHashSet< rcu_sht, key_val<::cds_test::city64>, traits_FeldmanHashSet_city64_stat >    FeldmanHashSet_rcu_sht_city64_stat;
245 #endif
246
247         struct traits_FeldmanHashSet_city128 : public default_traits
248         {
249             typedef ::cds_test::city128::less less;
250         };
251         typedef FeldmanHashSet< cds::gc::HP,  key_val<::cds_test::city128>, traits_FeldmanHashSet_city128 >    FeldmanHashSet_hp_city128;
252         typedef FeldmanHashSet< cds::gc::DHP, key_val<::cds_test::city128>, traits_FeldmanHashSet_city128 >    FeldmanHashSet_dhp_city128;
253         typedef FeldmanHashSet< rcu_gpi, key_val<::cds_test::city128>, traits_FeldmanHashSet_city128 >    FeldmanHashSet_rcu_gpi_city128;
254         typedef FeldmanHashSet< rcu_gpb, key_val<::cds_test::city128>, traits_FeldmanHashSet_city128 >    FeldmanHashSet_rcu_gpb_city128;
255         typedef FeldmanHashSet< rcu_gpt, key_val<::cds_test::city128>, traits_FeldmanHashSet_city128 >    FeldmanHashSet_rcu_gpt_city128;
256 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
257         typedef FeldmanHashSet< rcu_shb, key_val<::cds_test::city128>, traits_FeldmanHashSet_city128 >    FeldmanHashSet_rcu_shb_city128;
258         typedef FeldmanHashSet< rcu_sht, key_val<::cds_test::city128>, traits_FeldmanHashSet_city128 >    FeldmanHashSet_rcu_sht_city128;
259 #endif
260
261         struct traits_FeldmanHashSet_city128_stat : public traits_FeldmanHashSet_city128
262         {
263             typedef cc::feldman_hashset::stat<> stat;
264         };
265         typedef FeldmanHashSet< cds::gc::HP,  key_val<::cds_test::city128>, traits_FeldmanHashSet_city128_stat >    FeldmanHashSet_hp_city128_stat;
266         typedef FeldmanHashSet< cds::gc::DHP, key_val<::cds_test::city128>, traits_FeldmanHashSet_city128_stat >    FeldmanHashSet_dhp_city128_stat;
267         typedef FeldmanHashSet< rcu_gpi, key_val<::cds_test::city128>, traits_FeldmanHashSet_city128_stat >    FeldmanHashSet_rcu_gpi_city128_stat;
268         typedef FeldmanHashSet< rcu_gpb, key_val<::cds_test::city128>, traits_FeldmanHashSet_city128_stat >    FeldmanHashSet_rcu_gpb_city128_stat;
269         typedef FeldmanHashSet< rcu_gpt, key_val<::cds_test::city128>, traits_FeldmanHashSet_city128_stat >    FeldmanHashSet_rcu_gpt_city128_stat;
270 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
271         typedef FeldmanHashSet< rcu_shb, key_val<::cds_test::city128>, traits_FeldmanHashSet_city128_stat >    FeldmanHashSet_rcu_shb_city128_stat;
272         typedef FeldmanHashSet< rcu_sht, key_val<::cds_test::city128>, traits_FeldmanHashSet_city128_stat >    FeldmanHashSet_rcu_sht_city128_stat;
273 #endif
274
275 #endif // #if CDS_BUILD_BITS == 64
276
277
278         // for fixed-sized key
279         // No hash function is necessary
280
281         struct fixed_sized_key
282         {
283             typedef typename set_type_base< Key, Val >::key_type key_type;
284             struct key_val : public set_type_base< Key, Val >::key_val
285             {
286                 typedef typename set_type_base< Key, Val >::key_val base_class;
287
288                 explicit key_val(key_type const& k) : base_class(k) {}
289                 key_val(key_type const& k, value_type const& v) : base_class(k, v) {}
290
291                 template <typename K>
292                 explicit key_val(K const& k) : base_class(k) {}
293
294                 template <typename K, typename T>
295                 key_val(K const& k, T const& v) : base_class(k, v) {}
296
297                 // mock hasher
298                 struct hasher {
299                 template <typename Q>
300                     key_type operator()( Q const& k ) const
301                     {
302                         return key_type( k );
303                     }
304
305                     key_type const& operator()( key_val const& kv ) const
306                     {
307                         return kv.key;
308                     }
309
310                     key_type const& operator()( key_type const& k ) const
311                     {
312                         return k;
313                     }
314                 };
315             };
316
317             struct traits : public cc::feldman_hashset::traits
318             {
319                 struct hash_accessor {
320                     key_type const& operator()( key_val const& kv ) const
321                     {
322                         return kv.key;
323                     }
324
325                     key_type const& operator()( key_type const& k ) const
326                     {
327                         return k;
328                     }
329                 };
330
331                 typedef set::cmp<Key>   compare;
332             };
333
334             struct traits_stat : public traits
335             {
336                 typedef cc::feldman_hashset::stat<> stat;
337             };
338         };
339
340         typedef FeldmanHashSet< cds::gc::HP, typename fixed_sized_key::key_val, typename fixed_sized_key::traits >  FeldmanHashSet_hp_fixed;
341         typedef FeldmanHashSet< cds::gc::DHP, typename fixed_sized_key::key_val, typename fixed_sized_key::traits > FeldmanHashSet_dhp_fixed;
342         typedef FeldmanHashSet< rcu_gpi, typename fixed_sized_key::key_val, typename fixed_sized_key::traits >    FeldmanHashSet_rcu_gpi_fixed;
343         typedef FeldmanHashSet< rcu_gpb, typename fixed_sized_key::key_val, typename fixed_sized_key::traits >    FeldmanHashSet_rcu_gpb_fixed;
344         typedef FeldmanHashSet< rcu_gpt, typename fixed_sized_key::key_val, typename fixed_sized_key::traits >    FeldmanHashSet_rcu_gpt_fixed;
345 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
346         typedef FeldmanHashSet< rcu_shb, typename fixed_sized_key::key_val, typename fixed_sized_key::traits >    FeldmanHashSet_rcu_shb_fixed;
347         typedef FeldmanHashSet< rcu_sht, typename fixed_sized_key::key_val, typename fixed_sized_key::traits >    FeldmanHashSet_rcu_sht_fixed;
348 #endif
349
350         typedef FeldmanHashSet< cds::gc::HP, typename fixed_sized_key::key_val, typename fixed_sized_key::traits_stat >    FeldmanHashSet_hp_fixed_stat;
351         typedef FeldmanHashSet< cds::gc::DHP, typename fixed_sized_key::key_val, typename fixed_sized_key::traits_stat >    FeldmanHashSet_dhp_fixed_stat;
352         typedef FeldmanHashSet< rcu_gpi, typename fixed_sized_key::key_val, typename fixed_sized_key::traits_stat >    FeldmanHashSet_rcu_gpi_fixed_stat;
353         typedef FeldmanHashSet< rcu_gpb, typename fixed_sized_key::key_val, typename fixed_sized_key::traits_stat >    FeldmanHashSet_rcu_gpb_fixed_stat;
354         typedef FeldmanHashSet< rcu_gpt, typename fixed_sized_key::key_val, typename fixed_sized_key::traits_stat >    FeldmanHashSet_rcu_gpt_fixed_stat;
355 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
356         typedef FeldmanHashSet< rcu_shb, typename fixed_sized_key::key_val, typename fixed_sized_key::traits_stat >    FeldmanHashSet_rcu_shb_fixed_stat;
357         typedef FeldmanHashSet< rcu_sht, typename fixed_sized_key::key_val, typename fixed_sized_key::traits_stat >    FeldmanHashSet_rcu_sht_fixed_stat;
358 #endif
359
360     };
361
362     template <typename GC, typename T, typename Traits >
363     static inline void print_stat( cds_test::property_stream& o, FeldmanHashSet< GC, T, Traits > const& s )
364     {
365         std::vector< cds::intrusive::feldman_hashset::level_statistics > level_stat;
366         s.get_level_statistics( level_stat );
367
368         o << s.statistics()
369           << level_stat;
370     }
371 } // namespace set
372
373 #define CDSSTRESS_FeldmanHashSet_case( fixture, test_case, feldman_set_type, key_type, value_type ) \
374     TEST_F( fixture, feldman_set_type ) \
375     { \
376         typedef set::set_type< tag_FeldmanHashSet, key_type, value_type >::feldman_set_type set_type; \
377         test_case<set_type>(); \
378     }
379
380 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
381 #   define CDSSTRESS_FeldmanHashSet_fixed_SHRCU( fixture, test_case, key_type, value_type ) \
382         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_shb_fixed,      key_type, value_type ) \
383         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_sht_fixed,      key_type, value_type ) \
384         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_shb_fixed_stat, key_type, value_type ) \
385         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_sht_fixed_stat, key_type, value_type )
386
387 #   define CDSSTRESS_FeldmanHashSet_stdhash_SHRCU( fixture, test_case, key_type, value_type ) \
388         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_shb_stdhash,      key_type, value_type ) \
389         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_sht_stdhash,      key_type, value_type ) \
390         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_shb_stdhash_stat, key_type, value_type ) \
391         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_sht_stdhash_stat, key_type, value_type )
392
393 #   if CDS_BUILD_BITS == 64
394 #       define CDSSTRESS_FeldmanHashSet_city_SHRCU( fixture, test_case, key_type, value_type ) \
395             CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_shb_city64,       key_type, value_type ) \
396             CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_sht_city64,       key_type, value_type ) \
397             CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_shb_city64_stat,  key_type, value_type ) \
398             CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_sht_city64_stat,  key_type, value_type ) \
399             CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_shb_city128,      key_type, value_type ) \
400             CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_sht_city128,      key_type, value_type ) \
401             CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_shb_city128_stat, key_type, value_type ) \
402             CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_sht_city128_stat, key_type, value_type )
403 #   else
404 #       define CDSSTRESS_FeldmanHashSet_city_SHRCU( fixture, test_case, key_type, value_type )
405 #   endif
406
407 #else
408 #   define CDSSTRESS_FeldmanHashSet_fixed_SHRCU( fixture, test_case, key_type, value_type )
409 #   define CDSSTRESS_FeldmanHashSet_stdhash_SHRCU( fixture, test_case, key_type, value_type )
410 #   define CDSSTRESS_FeldmanHashSet_city_SHRCU( fixture, test_case, key_type, value_type )
411 #endif
412
413
414 #define CDSSTRESS_FeldmanHashSet_fixed_RCU( fixture, test_case, key_type, value_type ) \
415     CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpi_fixed,        key_type, value_type ) \
416     CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpb_fixed,        key_type, value_type ) \
417     CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpt_fixed,        key_type, value_type ) \
418     CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpi_fixed_stat,   key_type, value_type ) \
419     CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpb_fixed_stat,   key_type, value_type ) \
420     CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpt_fixed_stat,   key_type, value_type ) \
421
422   //CDSSTRESS_FeldmanHashSet_fixed_SHRCU( fixture, test_case, key_type, value_type )
423
424 #define CDSSTRESS_FeldmanHashSet_fixed_HP( fixture, test_case, key_type, value_type ) \
425     CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_hp_fixed,             key_type, value_type ) \
426     CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_dhp_fixed,            key_type, value_type ) \
427     CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_hp_fixed_stat,        key_type, value_type ) \
428     CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_dhp_fixed_stat,       key_type, value_type ) \
429
430 #define CDSSTRESS_FeldmanHashSet_fixed( fixture, test_case, key_type, value_type ) \
431     CDSSTRESS_FeldmanHashSet_fixed_HP( fixture, test_case, key_type, value_type ) \
432     CDSSTRESS_FeldmanHashSet_fixed_RCU( fixture, test_case, key_type, value_type ) \
433
434 #define CDSSTRESS_FeldmanHashSet_stdhash_rcu_gpi( fixture, test_case, key_type, value_type ) \
435     CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpi_stdhash,      key_type, value_type ) \
436     CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpi_stdhash_stat, key_type, value_type ) \
437
438 #define CDSSTRESS_FeldmanHashSet_stdhash_HP( fixture, test_case, key_type, value_type ) \
439     CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_hp_stdhash,           key_type, value_type ) \
440     CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_dhp_stdhash,          key_type, value_type ) \
441     CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_hp_stdhash_stat,      key_type, value_type ) \
442     CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_dhp_stdhash_stat,     key_type, value_type ) \
443
444 #define CDSSTRESS_FeldmanHashSet_stdhash_RCU( fixture, test_case, key_type, value_type ) \
445     CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpb_stdhash,      key_type, value_type ) \
446     CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpt_stdhash,      key_type, value_type ) \
447     CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpb_stdhash_stat, key_type, value_type ) \
448     CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpt_stdhash_stat, key_type, value_type ) \
449
450     //CDSSTRESS_FeldmanHashSet_stdhash_SHRCU( fixture, test_case, key_type, value_type )
451
452 #define CDSSTRESS_FeldmanHashSet_stdhash( fixture, test_case, key_type, value_type ) \
453     CDSSTRESS_FeldmanHashSet_stdhash_HP( fixture, test_case, key_type, value_type ) \
454     CDSSTRESS_FeldmanHashSet_stdhash_RCU( fixture, test_case, key_type, value_type ) \
455
456 #if CDS_BUILD_BITS == 64
457 #   define CDSSTRESS_FeldmanHashSet_city_rcu_gpi( fixture, test_case, key_type, value_type ) \
458         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpi_city64,       key_type, value_type ) \
459         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpi_city64_stat,  key_type, value_type ) \
460         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpi_city128,      key_type, value_type ) \
461         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpi_city128_stat, key_type, value_type ) \
462
463 #   define CDSSTRESS_FeldmanHashSet_city_HP( fixture, test_case, key_type, value_type ) \
464         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_hp_city64,            key_type, value_type ) \
465         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_dhp_city64,           key_type, value_type ) \
466         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_hp_city64_stat,       key_type, value_type ) \
467         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_dhp_city64_stat,      key_type, value_type ) \
468         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_hp_city128,           key_type, value_type ) \
469         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_dhp_city128,          key_type, value_type ) \
470         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_hp_city128_stat,      key_type, value_type ) \
471         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_dhp_city128_stat,     key_type, value_type ) \
472
473 #   define CDSSTRESS_FeldmanHashSet_city_RCU( fixture, test_case, key_type, value_type ) \
474         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpb_city64,       key_type, value_type ) \
475         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpt_city64,       key_type, value_type ) \
476         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpb_city64_stat,  key_type, value_type ) \
477         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpt_city64_stat,  key_type, value_type ) \
478         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpb_city128,      key_type, value_type ) \
479         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpt_city128,      key_type, value_type ) \
480         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpb_city128_stat, key_type, value_type ) \
481         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpt_city128_stat, key_type, value_type ) \
482
483         //CDSSTRESS_FeldmanHashSet_city_SHRCU( fixture, test_case, key_type, value_type )
484
485 #   define CDSSTRESS_FeldmanHashSet_city( fixture, test_case, key_type, value_type ) \
486         CDSSTRESS_FeldmanHashSet_city_HP( fixture, test_case, key_type, value_type ) \
487         CDSSTRESS_FeldmanHashSet_city_RCU( fixture, test_case, key_type, value_type ) \
488
489
490 #else
491 #   define CDSSTRESS_FeldmanHashSet_city_rcu_gpi( fixture, test_case, key_type, value_type )
492 #   define CDSSTRESS_FeldmanHashSet_city_HP( fixture, test_case, key_type, value_type )
493 #   define CDSSTRESS_FeldmanHashSet_city_RCU( fixture, test_case, key_type, value_type )
494 #   define CDSSTRESS_FeldmanHashSet_city( fixture, test_case, key_type, value_type )
495 #endif
496
497 #endif // #ifndef CDSUNIT_SET_TYPE_FELDMAN_HASHSET_H