ab20e1f638e9972509d87f9b8215c908af6527f5
[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-2016
5
6     Source code repo: http://github.com/khizmax/libcds/
7     Download: http://sourceforge.net/projects/libcds/files/
8
9     Redistribution and use in source and binary forms, with or without
10     modification, are permitted provided that the following conditions are met:
11
12     * Redistributions of source code must retain the above copyright notice, this
13       list of conditions and the following disclaimer.
14
15     * Redistributions in binary form must reproduce the above copyright notice,
16       this list of conditions and the following disclaimer in the documentation
17       and/or other materials provided with the distribution.
18
19     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21     IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22     DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23     FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24     DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25     SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26     CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27     OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31 #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         template <typename G>
51         struct get_extracted_ptr
52         {
53             typedef typename base_class::guarded_ptr extracted_ptr;
54         };
55
56         template <typename RCU>
57         struct get_extracted_ptr<cds::urcu::gc<RCU>>
58         {
59             typedef typename base_class::exempt_ptr extracted_ptr;
60         };
61
62     public:
63         typedef typename T::hasher hasher;
64         typedef typename get_extracted_ptr<GC>::extracted_ptr extracted_ptr;
65
66         template <typename OtherTraits>
67         struct rebind_traits {
68             typedef FeldmanHashSet<GC, T, OtherTraits > result;
69         };
70
71         template <class Config>
72         FeldmanHashSet( Config const& cfg )
73             : base_class( cfg.s_nFeldmanSet_HeadBits, cfg.s_nFeldmanSet_ArrayBits )
74         {}
75
76         template <typename Q>
77         bool erase( Q const& key )
78         {
79             return base_class::erase( hasher()( key ));
80         }
81
82         template <typename Q, typename Func>
83         bool erase( Q const& key, Func f )
84         {
85             return base_class::erase( hasher()( key ), f );
86         }
87
88         template <typename Q>
89         extracted_ptr extract(Q const& key)
90         {
91             return base_class::extract( hasher()(key));
92         }
93
94         template <typename Q>
95         bool contains( Q const& key )
96         {
97             return base_class::contains( hasher()(key));
98         }
99
100         // for testing
101         static CDS_CONSTEXPR bool const c_bExtractSupported = true;
102         static CDS_CONSTEXPR bool const c_bLoadFactorDepended = false;
103         static CDS_CONSTEXPR bool const c_bEraseExactKey = true;
104     };
105
106     struct tag_FeldmanHashSet;
107
108     template <typename Key, typename Val>
109     struct set_type< tag_FeldmanHashSet, Key, Val >: public set_type_base< Key, Val >
110     {
111         typedef set_type_base< Key, Val > base_class;
112         typedef typename base_class::compare compare;
113         typedef typename base_class::less less;
114         typedef typename base_class::hash hash;
115         typedef typename base_class::key_type   key_type;
116         typedef typename base_class::value_type value_type;
117
118         template <typename Hasher>
119         struct hash_type
120         {
121             typedef Hasher hasher;
122             typedef typename hasher::hash_type type;
123         };
124
125         template <typename TH>
126         struct hash_type<std::hash<TH>>
127         {
128             typedef std::hash<TH> hasher;
129             typedef size_t type;
130         };
131
132         template <typename Hasher>
133         struct key_val: base_class::key_val
134         {
135             typedef typename base_class::key_val base;
136             typedef Hasher hasher;
137             typedef typename hash_type<hasher>::type hash_type;
138
139             hash_type hash;
140
141             explicit key_val( key_type const& k ): base(k), hash( hasher()( k )) {}
142             key_val( key_type const& k, value_type const& v ): base(k, v), hash( hasher()( k )) {}
143
144             template <typename K>
145             explicit key_val( K const& k ): base(k), hash( hasher()( k )) {}
146
147             template <typename K, typename T>
148             key_val( K const& k, T const& v ): base(k, v), hash( hasher()( k )) {}
149         };
150
151         struct default_traits : public cc::feldman_hashset::traits
152         {
153             struct hash_accessor {
154                 template <typename Hasher>
155                 typename key_val<Hasher>::hash_type const& operator()( key_val<Hasher> const& kv )
156                 {
157                     return kv.hash;
158                 }
159             };
160         };
161
162         typedef FeldmanHashSet< cds::gc::HP,  key_val<std::hash<key_type>>, default_traits >    FeldmanHashSet_hp_stdhash;
163         typedef FeldmanHashSet< cds::gc::DHP, key_val<std::hash<key_type>>, default_traits >    FeldmanHashSet_dhp_stdhash;
164         typedef FeldmanHashSet< rcu_gpi, key_val<std::hash<key_type>>, default_traits >    FeldmanHashSet_rcu_gpi_stdhash;
165         typedef FeldmanHashSet< rcu_gpb, key_val<std::hash<key_type>>, default_traits >    FeldmanHashSet_rcu_gpb_stdhash;
166         typedef FeldmanHashSet< rcu_gpt, key_val<std::hash<key_type>>, default_traits >    FeldmanHashSet_rcu_gpt_stdhash;
167 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
168         typedef FeldmanHashSet< rcu_shb, key_val<std::hash<key_type>>, default_traits >    FeldmanHashSet_rcu_shb_stdhash;
169         typedef FeldmanHashSet< rcu_sht, key_val<std::hash<key_type>>, default_traits >    FeldmanHashSet_rcu_sht_stdhash;
170 #endif
171
172         struct traits_FeldmanHashSet_stat: public cc::feldman_hashset::make_traits<
173                 co::type_traits< default_traits >,
174                 co::stat< cc::feldman_hashset::stat<>>
175             >::type
176         {};
177
178         typedef FeldmanHashSet< cds::gc::HP,  key_val<std::hash<key_type>>, traits_FeldmanHashSet_stat >    FeldmanHashSet_hp_stdhash_stat;
179         typedef FeldmanHashSet< cds::gc::DHP, key_val<std::hash<key_type>>, traits_FeldmanHashSet_stat >    FeldmanHashSet_dhp_stdhash_stat;
180         typedef FeldmanHashSet< rcu_gpi, key_val<std::hash<key_type>>, traits_FeldmanHashSet_stat >    FeldmanHashSet_rcu_gpi_stdhash_stat;
181         typedef FeldmanHashSet< rcu_gpb, key_val<std::hash<key_type>>, traits_FeldmanHashSet_stat >    FeldmanHashSet_rcu_gpb_stdhash_stat;
182         typedef FeldmanHashSet< rcu_gpt, key_val<std::hash<key_type>>, traits_FeldmanHashSet_stat >    FeldmanHashSet_rcu_gpt_stdhash_stat;
183 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
184         typedef FeldmanHashSet< rcu_shb, key_val<std::hash<key_type>>, traits_FeldmanHashSet_stat >    FeldmanHashSet_rcu_shb_stdhash_stat;
185         typedef FeldmanHashSet< rcu_sht, key_val<std::hash<key_type>>, traits_FeldmanHashSet_stat >    FeldmanHashSet_rcu_sht_stdhash_stat;
186 #endif
187
188         // CityHash
189 #if CDS_BUILD_BITS == 64
190         struct traits_FeldmanHashSet_city64 : public default_traits
191         {
192             typedef ::cds_test::city64::less less;
193         };
194         typedef FeldmanHashSet< cds::gc::HP,  key_val<::cds_test::city64>, traits_FeldmanHashSet_city64 >    FeldmanHashSet_hp_city64;
195         typedef FeldmanHashSet< cds::gc::DHP, key_val<::cds_test::city64>, traits_FeldmanHashSet_city64 >    FeldmanHashSet_dhp_city64;
196         typedef FeldmanHashSet< rcu_gpi, key_val<::cds_test::city64>, traits_FeldmanHashSet_city64 >    FeldmanHashSet_rcu_gpi_city64;
197         typedef FeldmanHashSet< rcu_gpb, key_val<::cds_test::city64>, traits_FeldmanHashSet_city64 >    FeldmanHashSet_rcu_gpb_city64;
198         typedef FeldmanHashSet< rcu_gpt, key_val<::cds_test::city64>, traits_FeldmanHashSet_city64 >    FeldmanHashSet_rcu_gpt_city64;
199 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
200         typedef FeldmanHashSet< rcu_shb, key_val<::cds_test::city64>, traits_FeldmanHashSet_city64 >    FeldmanHashSet_rcu_shb_city64;
201         typedef FeldmanHashSet< rcu_sht, key_val<::cds_test::city64>, traits_FeldmanHashSet_city64 >    FeldmanHashSet_rcu_sht_city64;
202 #endif
203
204         struct traits_FeldmanHashSet_city64_stat : public traits_FeldmanHashSet_city64
205         {
206             typedef cc::feldman_hashset::stat<> stat;
207         };
208         typedef FeldmanHashSet< cds::gc::HP,  key_val<::cds_test::city64>, traits_FeldmanHashSet_city64_stat >    FeldmanHashSet_hp_city64_stat;
209         typedef FeldmanHashSet< cds::gc::DHP, key_val<::cds_test::city64>, traits_FeldmanHashSet_city64_stat >    FeldmanHashSet_dhp_city64_stat;
210         typedef FeldmanHashSet< rcu_gpi, key_val<::cds_test::city64>, traits_FeldmanHashSet_city64_stat >    FeldmanHashSet_rcu_gpi_city64_stat;
211         typedef FeldmanHashSet< rcu_gpb, key_val<::cds_test::city64>, traits_FeldmanHashSet_city64_stat >    FeldmanHashSet_rcu_gpb_city64_stat;
212         typedef FeldmanHashSet< rcu_gpt, key_val<::cds_test::city64>, traits_FeldmanHashSet_city64_stat >    FeldmanHashSet_rcu_gpt_city64_stat;
213 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
214         typedef FeldmanHashSet< rcu_shb, key_val<::cds_test::city64>, traits_FeldmanHashSet_city64_stat >    FeldmanHashSet_rcu_shb_city64_stat;
215         typedef FeldmanHashSet< rcu_sht, key_val<::cds_test::city64>, traits_FeldmanHashSet_city64_stat >    FeldmanHashSet_rcu_sht_city64_stat;
216 #endif
217
218         struct traits_FeldmanHashSet_city128 : public default_traits
219         {
220             typedef ::cds_test::city128::less less;
221         };
222         typedef FeldmanHashSet< cds::gc::HP,  key_val<::cds_test::city128>, traits_FeldmanHashSet_city128 >    FeldmanHashSet_hp_city128;
223         typedef FeldmanHashSet< cds::gc::DHP, key_val<::cds_test::city128>, traits_FeldmanHashSet_city128 >    FeldmanHashSet_dhp_city128;
224         typedef FeldmanHashSet< rcu_gpi, key_val<::cds_test::city128>, traits_FeldmanHashSet_city128 >    FeldmanHashSet_rcu_gpi_city128;
225         typedef FeldmanHashSet< rcu_gpb, key_val<::cds_test::city128>, traits_FeldmanHashSet_city128 >    FeldmanHashSet_rcu_gpb_city128;
226         typedef FeldmanHashSet< rcu_gpt, key_val<::cds_test::city128>, traits_FeldmanHashSet_city128 >    FeldmanHashSet_rcu_gpt_city128;
227 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
228         typedef FeldmanHashSet< rcu_shb, key_val<::cds_test::city128>, traits_FeldmanHashSet_city128 >    FeldmanHashSet_rcu_shb_city128;
229         typedef FeldmanHashSet< rcu_sht, key_val<::cds_test::city128>, traits_FeldmanHashSet_city128 >    FeldmanHashSet_rcu_sht_city128;
230 #endif
231
232         struct traits_FeldmanHashSet_city128_stat : public traits_FeldmanHashSet_city128
233         {
234             typedef cc::feldman_hashset::stat<> stat;
235         };
236         typedef FeldmanHashSet< cds::gc::HP,  key_val<::cds_test::city128>, traits_FeldmanHashSet_city128_stat >    FeldmanHashSet_hp_city128_stat;
237         typedef FeldmanHashSet< cds::gc::DHP, key_val<::cds_test::city128>, traits_FeldmanHashSet_city128_stat >    FeldmanHashSet_dhp_city128_stat;
238         typedef FeldmanHashSet< rcu_gpi, key_val<::cds_test::city128>, traits_FeldmanHashSet_city128_stat >    FeldmanHashSet_rcu_gpi_city128_stat;
239         typedef FeldmanHashSet< rcu_gpb, key_val<::cds_test::city128>, traits_FeldmanHashSet_city128_stat >    FeldmanHashSet_rcu_gpb_city128_stat;
240         typedef FeldmanHashSet< rcu_gpt, key_val<::cds_test::city128>, traits_FeldmanHashSet_city128_stat >    FeldmanHashSet_rcu_gpt_city128_stat;
241 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
242         typedef FeldmanHashSet< rcu_shb, key_val<::cds_test::city128>, traits_FeldmanHashSet_city128_stat >    FeldmanHashSet_rcu_shb_city128_stat;
243         typedef FeldmanHashSet< rcu_sht, key_val<::cds_test::city128>, traits_FeldmanHashSet_city128_stat >    FeldmanHashSet_rcu_sht_city128_stat;
244 #endif
245
246 #endif // #if CDS_BUILD_BITS == 64
247
248
249         // for fixed-sized key
250         // No hash function is necessary
251
252         struct fixed_sized_key
253         {
254             typedef typename set_type_base< Key, Val >::key_type key_type;
255             struct key_val : public set_type_base< Key, Val >::key_val
256             {
257                 typedef typename set_type_base< Key, Val >::key_val base_class;
258
259                 /*explicit*/ key_val(key_type const& k) : base_class(k) {}
260                 key_val(key_type const& k, value_type const& v) : base_class(k, v) {}
261
262                 template <typename K>
263                 /*explicit*/ key_val(K const& k) : base_class(k) {}
264
265                 template <typename K, typename T>
266                 key_val(K const& k, T const& v) : base_class(k, v) {}
267
268                 // mock hasher
269                 struct hasher {
270                 template <typename Q>
271                     key_type operator()( Q const& k ) const
272                     {
273                         return key_type( k );
274                     }
275                 };
276             };
277
278             struct traits : public cc::feldman_hashset::traits
279             {
280                 struct hash_accessor {
281                     key_type operator()(key_val const& kv)
282                     {
283                         return kv.key;
284                     }
285                 };
286             };
287
288             struct traits_stat : public traits
289             {
290                 typedef cc::feldman_hashset::stat<> stat;
291             };
292         };
293
294         typedef FeldmanHashSet< cds::gc::HP, typename fixed_sized_key::key_val, typename fixed_sized_key::traits >  FeldmanHashSet_hp_fixed;
295         typedef FeldmanHashSet< cds::gc::DHP, typename fixed_sized_key::key_val, typename fixed_sized_key::traits > FeldmanHashSet_dhp_fixed;
296         typedef FeldmanHashSet< rcu_gpi, typename fixed_sized_key::key_val, typename fixed_sized_key::traits >    FeldmanHashSet_rcu_gpi_fixed;
297         typedef FeldmanHashSet< rcu_gpb, typename fixed_sized_key::key_val, typename fixed_sized_key::traits >    FeldmanHashSet_rcu_gpb_fixed;
298         typedef FeldmanHashSet< rcu_gpt, typename fixed_sized_key::key_val, typename fixed_sized_key::traits >    FeldmanHashSet_rcu_gpt_fixed;
299 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
300         typedef FeldmanHashSet< rcu_shb, typename fixed_sized_key::key_val, typename fixed_sized_key::traits >    FeldmanHashSet_rcu_shb_fixed;
301         typedef FeldmanHashSet< rcu_sht, typename fixed_sized_key::key_val, typename fixed_sized_key::traits >    FeldmanHashSet_rcu_sht_fixed;
302 #endif
303
304         typedef FeldmanHashSet< cds::gc::HP, typename fixed_sized_key::key_val, typename fixed_sized_key::traits_stat >    FeldmanHashSet_hp_fixed_stat;
305         typedef FeldmanHashSet< cds::gc::DHP, typename fixed_sized_key::key_val, typename fixed_sized_key::traits_stat >    FeldmanHashSet_dhp_fixed_stat;
306         typedef FeldmanHashSet< rcu_gpi, typename fixed_sized_key::key_val, typename fixed_sized_key::traits_stat >    FeldmanHashSet_rcu_gpi_fixed_stat;
307         typedef FeldmanHashSet< rcu_gpb, typename fixed_sized_key::key_val, typename fixed_sized_key::traits_stat >    FeldmanHashSet_rcu_gpb_fixed_stat;
308         typedef FeldmanHashSet< rcu_gpt, typename fixed_sized_key::key_val, typename fixed_sized_key::traits_stat >    FeldmanHashSet_rcu_gpt_fixed_stat;
309 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
310         typedef FeldmanHashSet< rcu_shb, typename fixed_sized_key::key_val, typename fixed_sized_key::traits_stat >    FeldmanHashSet_rcu_shb_fixed_stat;
311         typedef FeldmanHashSet< rcu_sht, typename fixed_sized_key::key_val, typename fixed_sized_key::traits_stat >    FeldmanHashSet_rcu_sht_fixed_stat;
312 #endif
313
314     };
315
316     template <typename GC, typename T, typename Traits >
317     static inline void print_stat( cds_test::property_stream& o, FeldmanHashSet< GC, T, Traits > const& s )
318     {
319         std::vector< cds::intrusive::feldman_hashset::level_statistics > level_stat;
320         s.get_level_statistics( level_stat );
321
322         o << s.statistics()
323           << level_stat;
324     }
325 } // namespace set
326
327 #define CDSSTRESS_FeldmanHashSet_case( fixture, test_case, feldman_set_type, key_type, value_type ) \
328     TEST_F( fixture, feldman_set_type ) \
329     { \
330         typedef set::set_type< tag_FeldmanHashSet, key_type, value_type >::feldman_set_type set_type; \
331         test_case<set_type>(); \
332     }
333
334 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
335 #   define CDSSTRESS_FeldmanHashSet_fixed_SHRCU( fixture, test_case, key_type, value_type ) \
336         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_shb_fixed,      key_type, value_type ) \
337         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_sht_fixed,      key_type, value_type ) \
338         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_shb_fixed_stat, key_type, value_type ) \
339         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_sht_fixed_stat, key_type, value_type )
340
341 #   define CDSSTRESS_FeldmanHashSet_stdhash_SHRCU( fixture, test_case, key_type, value_type ) \
342         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_shb_stdhash,      key_type, value_type ) \
343         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_sht_stdhash,      key_type, value_type ) \
344         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_shb_stdhash_stat, key_type, value_type ) \
345         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_sht_stdhash_stat, key_type, value_type )
346
347 #   if CDS_BUILD_BITS == 64
348 #       define CDSSTRESS_FeldmanHashSet_city_SHRCU( fixture, test_case, key_type, value_type ) \
349             CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_shb_city64,       key_type, value_type ) \
350             CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_sht_city64,       key_type, value_type ) \
351             CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_shb_city64_stat,  key_type, value_type ) \
352             CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_sht_city64_stat,  key_type, value_type ) \
353             CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_shb_city128,      key_type, value_type ) \
354             CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_sht_city128,      key_type, value_type ) \
355             CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_shb_city128_stat, key_type, value_type ) \
356             CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_sht_city128_stat, key_type, value_type )
357 #   else
358 #       define CDSSTRESS_FeldmanHashSet_city_SHRCU( fixture, test_case, key_type, value_type )
359 #   endif
360
361 #else
362 #   define CDSSTRESS_FeldmanHashSet_fixed_SHRCU( fixture, test_case, key_type, value_type )
363 #   define CDSSTRESS_FeldmanHashSet_stdhash_SHRCU( fixture, test_case, key_type, value_type )
364 #   define CDSSTRESS_FeldmanHashSet_city_SHRCU( fixture, test_case, key_type, value_type )
365 #endif
366
367
368 #define CDSSTRESS_FeldmanHashSet_fixed( fixture, test_case, key_type, value_type ) \
369     CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_hp_fixed,             key_type, value_type ) \
370     CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_dhp_fixed,            key_type, value_type ) \
371     CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpi_fixed,        key_type, value_type ) \
372     CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpb_fixed,        key_type, value_type ) \
373     CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpt_fixed,        key_type, value_type ) \
374     CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_hp_fixed_stat,        key_type, value_type ) \
375     CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_dhp_fixed_stat,       key_type, value_type ) \
376     CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpi_fixed_stat,   key_type, value_type ) \
377     CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpb_fixed_stat,   key_type, value_type ) \
378     CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpt_fixed_stat,   key_type, value_type ) \
379     CDSSTRESS_FeldmanHashSet_fixed_SHRCU( fixture, test_case, key_type, value_type )
380
381 #define CDSSTRESS_FeldmanHashSet_stdhash_rcu_gpi( fixture, test_case, key_type, value_type ) \
382     CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpi_stdhash,      key_type, value_type ) \
383     CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpi_stdhash_stat, key_type, value_type ) \
384
385 #define CDSSTRESS_FeldmanHashSet_stdhash_quick( fixture, test_case, key_type, value_type ) \
386     CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_hp_stdhash,           key_type, value_type ) \
387     CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_dhp_stdhash,          key_type, value_type ) \
388     CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpb_stdhash,      key_type, value_type ) \
389     CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpt_stdhash,      key_type, value_type ) \
390     CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_hp_stdhash_stat,      key_type, value_type ) \
391     CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_dhp_stdhash_stat,     key_type, value_type ) \
392     CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpb_stdhash_stat, key_type, value_type ) \
393     CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpt_stdhash_stat, key_type, value_type ) \
394     CDSSTRESS_FeldmanHashSet_stdhash_SHRCU( fixture, test_case, key_type, value_type )
395
396 #define CDSSTRESS_FeldmanHashSet_stdhash( fixture, test_case, key_type, value_type ) \
397     CDSSTRESS_FeldmanHashSet_stdhash_quick( fixture, test_case, key_type, value_type ) \
398     CDSSTRESS_FeldmanHashSet_stdhash_rcu_gpi( fixture, test_case, key_type, value_type ) \
399
400 #if CDS_BUILD_BITS == 64
401 #   define CDSSTRESS_FeldmanHashSet_city_rcu_gpi( fixture, test_case, key_type, value_type ) \
402         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpi_city64,       key_type, value_type ) \
403         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpi_city64_stat,  key_type, value_type ) \
404         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpi_city128,      key_type, value_type ) \
405         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpi_city128_stat, key_type, value_type ) \
406
407 #   define CDSSTRESS_FeldmanHashSet_city_quick( fixture, test_case, key_type, value_type ) \
408         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_hp_city64,            key_type, value_type ) \
409         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_dhp_city64,           key_type, value_type ) \
410         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpb_city64,       key_type, value_type ) \
411         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpt_city64,       key_type, value_type ) \
412         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_hp_city64_stat,       key_type, value_type ) \
413         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_dhp_city64_stat,      key_type, value_type ) \
414         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpb_city64_stat,  key_type, value_type ) \
415         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpt_city64_stat,  key_type, value_type ) \
416         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_hp_city128,           key_type, value_type ) \
417         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_dhp_city128,          key_type, value_type ) \
418         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpb_city128,      key_type, value_type ) \
419         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpt_city128,      key_type, value_type ) \
420         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_hp_city128_stat,      key_type, value_type ) \
421         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_dhp_city128_stat,     key_type, value_type ) \
422         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpb_city128_stat, key_type, value_type ) \
423         CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpt_city128_stat, key_type, value_type ) \
424         CDSSTRESS_FeldmanHashSet_city_SHRCU( fixture, test_case, key_type, value_type )
425
426 #   define CDSSTRESS_FeldmanHashSet_city( fixture, test_case, key_type, value_type ) \
427         CDSSTRESS_FeldmanHashSet_city_quick( fixture, test_case, key_type, value_type ) \
428         CDSSTRESS_FeldmanHashSet_city_rcu_gpi( fixture, test_case, key_type, value_type ) \
429
430
431 #else
432 #   define CDSSTRESS_FeldmanHashSet_city_rcu_gpi( fixture, test_case, key_type, value_type )
433 #   define CDSSTRESS_FeldmanHashSet_city_quick( fixture, test_case, key_type, value_type )
434 #   define CDSSTRESS_FeldmanHashSet_city( fixture, test_case, key_type, value_type )
435 #endif
436
437 #endif // #ifndef CDSUNIT_SET_TYPE_FELDMAN_HASHSET_H