CDSUNIT_DECLARE_EllenBinTreeMap
CDSUNIT_DECLARE_BronsonAVLTreeMap
CDSUNIT_DECLARE_FeldmanHashMap_fixed
- CDSUNIT_DECLARE_FeldmanHashMap_city
+ //CDSUNIT_DECLARE_FeldmanHashMap_city
CDSUNIT_DECLARE_CuckooMap
CPPUNIT_TEST_SUITE(Map_DelOdd)
CDSUNIT_TEST_EllenBinTreeMap
CDSUNIT_TEST_BronsonAVLTreeMap
CDSUNIT_TEST_FeldmanHashMap_fixed
- CDSUNIT_TEST_FeldmanHashMap_city
+ //CDSUNIT_TEST_FeldmanHashMap_city
CDSUNIT_TEST_CuckooMap
CPPUNIT_TEST_SUITE_END();
namespace map2 {
CDSUNIT_DECLARE_FeldmanHashMap_fixed
- CDSUNIT_DECLARE_FeldmanHashMap_city
+ //CDSUNIT_DECLARE_FeldmanHashMap_city
} // namespace map2
template <typename Val>
void operator()( Val& cur, Val * old )
{
- if ( old )
+ if ( old ) {
+ cur.second.nKey = cur.first;
+ cur.second.nData = cur.first * 8;
cur.second.bInitialized.store( true, atomics::memory_order_release );
+ }
operator()( old == nullptr, cur.first, cur.second );
}
{
while ( true ) {
if ( v.bInitialized.load( atomics::memory_order_relaxed )) {
- std::unique_lock< typename value_type::lock_type> ac( v.m_access );
+ std::unique_lock< typename value_type::lock_type> ac( v.m_access );
if ( m_cnt.nKeyExpected == v.nKey && m_cnt.nKeyExpected * 8 == v.nData )
++m_cnt.nSuccessItem;
std::vector< cds::intrusive::feldman_hashset::level_statistics > level_stat;
m.get_level_statistics( level_stat );
+ CPPUNIT_MSG( level_stat );
+ /*
CPPUNIT_MSG( "Level statistics, height=" << level_stat.size());
size_t i = 0;
CPPUNIT_MSG( " i node_count capacity data_cell array_cell empty_cell" );
<< std::setw(12) << it->empty_cell_count << std::setw(0)
);
}
+ */
}
} // namespace map2
return o;
}
+ static inline ostream& operator<<( ostream& o, std::vector< cds::intrusive::feldman_hashset::level_statistics > const& level_stat )
+ {
+ o << "Level statistics, height=" << level_stat.size() << "\n";
+ size_t i = 0;
+ o << " i node_count capacity data_cell array_cell empty_cell\n";
+ for ( auto it = level_stat.begin(); it != level_stat.end(); ++it, ++i ) {
+ o << std::setw( 3 ) << i << std::setw( 0 ) << " "
+ << std::setw( 12 ) << it->array_node_count << std::setw( 0 ) << " "
+ << std::setw( 8 ) << it->node_capacity << std::setw( 0 ) << " "
+ << std::setw( 12 ) << it->data_cell_count << std::setw( 0 ) << " "
+ << std::setw( 12 ) << it->array_cell_count << std::setw( 0 ) << " "
+ << std::setw( 12 ) << it->empty_cell_count << std::setw( 0 )
+ << "\n";
+ }
+ return o;
+ }
+
} // namespace std
#endif // #ifndef CDSUNIT_PRINT_FELDMAN_HASHSET_STAT_H
static inline void print_stat( FeldmanHashSet< GC, T, Traits > const& s )
{
CPPUNIT_MSG( s.statistics() );
+
+ std::vector< cds::intrusive::feldman_hashset::level_statistics > level_stat;
+ s.get_level_statistics( level_stat );
+ CPPUNIT_MSG( level_stat );
}
} // namespace set2