{
uint32_t nKey;
uint16_t nThread;
- uint16_t pad_;
key_thread( size_t key, size_t threadNo )
: nKey( static_cast<uint32_t>(key))
, nThread( static_cast<uint16_t>(threadNo))
- , pad_(0)
{}
key_thread()
: nKey()
, nThread()
- , pad_( 0 )
{}
};
namespace map {
- CDSSTRESS_FeldmanHashMap_fixed( Map_DelOdd, run_test_extract, key_thread, size_t )
+ namespace {
+ class Map_DelOdd2: public map::Map_DelOdd {
+ public:
+ template <typename Map>
+ void run()
+ {
+ typedef typename Map::traits original_traits;
+ struct traits: public original_traits {
+ enum { hash_size = sizeof( uint32_t ) + sizeof( uint16_t ) };
+ };
+ typedef typename Map::template rebind_traits< traits >::result map_type;
+
+ run_test_extract<map_type>();
+ }
+ };
+
+ CDSSTRESS_FeldmanHashMap_fixed( Map_DelOdd2, run, key_thread, size_t )
+ }
} // namespace map
{
typedef cc::FeldmanHashMap< GC, Key, T, Traits > base_class;
public:
+
+ template <typename OtherTraits>
+ struct rebind_traits {
+ typedef FeldmanHashMap<GC, Key, T, OtherTraits > result;
+ };
+
template <typename Config>
FeldmanHashMap( Config const& cfg)
: base_class( cfg.s_nFeldmanMap_HeadBits, cfg.s_nFeldmanMap_ArrayBits )
{
uint32_t nKey;
uint16_t nThread;
- uint16_t pad_;
key_thread( size_t key, size_t threadNo )
: nKey( static_cast<uint32_t>(key))
, nThread( static_cast<uint16_t>(threadNo))
- , pad_(0)
{}
key_thread()
: nKey()
, nThread()
- , pad_( 0 )
{}
};
namespace set {
- CDSSTRESS_FeldmanHashSet_fixed( Set_DelOdd, run_test_extract, key_thread, size_t )
+ namespace {
+ class Set_DelOdd2: public set::Set_DelOdd
+ {
+ public:
+ template <typename Set>
+ void run()
+ {
+ typedef typename Set::traits original_traits;
+ struct traits: public original_traits
+ {
+ enum { hash_size = sizeof(uint32_t) + sizeof(uint16_t) };
+ };
+
+ typedef typename Set::template rebind_traits< traits >::result set_type;
+ run_test_extract< set_type >();
+ }
+ };
+
+ CDSSTRESS_FeldmanHashSet_fixed( Set_DelOdd2, run, key_thread, size_t )
+ }
} // namespace set
typedef typename T::hasher hasher;
typedef typename get_extracted_ptr<GC>::extracted_ptr extracted_ptr;
+ template <typename OtherTraits>
+ struct rebind_traits {
+ typedef FeldmanHashSet<GC, T, OtherTraits > result;
+ };
+
template <class Config>
FeldmanHashSet( Config const& cfg )
: base_class( cfg.s_nFeldmanSet_HeadBits, cfg.s_nFeldmanSet_ArrayBits )