}
struct node_disposer {
- void operator()( intrusive_node_type * pNode ) const {}
+ void operator()( intrusive_node_type * /*pNode*/ ) const {}
};
};
template <typename K, typename Less>
bool erase_with( K const& key, Less pred )
{
+ CDS_UNUSED( pred );
return base_class::erase_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::key_accessor >());
}
template <typename K, typename Less, typename Func>
bool erase_with( K const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return base_class::erase_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::key_accessor >(),
[&f]( leaf_node& node) { f( node.m_Value ); } );
}
template <typename Q, typename Less>
exempt_ptr extract_with( Q const& val, Less pred )
{
+ CDS_UNUSED( pred );
return exempt_ptr( base_class::extract_with_( val,
cds::details::predicate_wrapper< leaf_node, Less, typename maker::key_accessor >() ));
}
template <typename K, typename Less, typename Func>
bool find_with( K const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return base_class::find_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::key_accessor >(),
[&f](leaf_node& item, K const& ) { f( item.m_Value );});
}
template <typename K, typename Less>
bool find_with( K const& key, Less pred )
{
+ CDS_UNUSED( pred );
return base_class::find_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::key_accessor >() );
}
template <typename Q, typename Less>
value_type * get_with( Q const& key, Less pred ) const
{
+ CDS_UNUSED( pred );
leaf_node * pNode = base_class::get_with( key,
cds::details::predicate_wrapper< leaf_node, Less, typename maker::key_accessor >());
return pNode ? &pNode->m_Value : nullptr;
template <typename Q, typename Less>
bool erase_with( Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return base_class::erase_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >());
}
template <typename Q, typename Less, typename Func>
bool erase_with( Q const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return base_class::erase_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >(),
[&f]( leaf_node const& node) { f( node.m_Value ); } );
}
template <typename Q, typename Less>
exempt_ptr extract_with( Q const& val, Less pred )
{
+ CDS_UNUSED( pred );
return exempt_ptr( base_class::extract_with_( val,
cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >() ));
}
template <typename Q, typename Less, typename Func>
bool find_with( Q& key, Less pred, Func f ) const
{
+ CDS_UNUSED( pred );
return base_class::find_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >(),
[&f]( leaf_node& node, Q& v ) { f( node.m_Value, v ); } );
}
template <typename Q, typename Less, typename Func>
bool find_with( Q const& key, Less pred, Func f ) const
{
+ CDS_UNUSED( pred );
return base_class::find_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >(),
[&f]( leaf_node& node, Q const& v ) { f( node.m_Value, v ); } );
}
template <typename Q, typename Less>
bool find_with( Q const& key, Less pred ) const
{
+ CDS_UNUSED( pred );
return base_class::find_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >());
}
template <typename Q, typename Less>
value_type * get_with( Q const& key, Less pred ) const
{
+ CDS_UNUSED( pred );
leaf_node * pNode = base_class::get_with( key,
cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >());
return pNode ? &pNode->m_Value : nullptr;
template <typename K, typename Less>
bool erase_with( K const& key, Less pred )
{
+ CDS_UNUSED( pred );
return base_class::erase_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::key_accessor >());
}
template <typename K, typename Less, typename Func>
bool erase_with( K const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return base_class::erase_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::key_accessor >(),
[&f]( leaf_node& node) { f( node.m_Value ); } );
}
template <typename Q, typename Less>
bool extract_with( guarded_ptr& result, Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return base_class::extract_with_( result.guard(), key,
cds::details::predicate_wrapper< leaf_node, Less, typename maker::key_accessor >());
}
template <typename K, typename Less, typename Func>
bool find_with( K const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return base_class::find_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::key_accessor >(),
[&f](leaf_node& item, K const& ) { f( item.m_Value );});
}
template <typename K, typename Less>
bool find_with( K const& key, Less pred )
{
+ CDS_UNUSED( pred );
return base_class::find_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::key_accessor >() );
}
template <typename Q, typename Less>
bool get_with( guarded_ptr& result, Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return base_class::get_with_( result.guard(), key,
cds::details::predicate_wrapper< leaf_node, Less, typename maker::key_accessor >() );
}
template <typename Q, typename Less>
bool erase_with( Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return base_class::erase_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >());
}
template <typename Q, typename Less, typename Func>
bool erase_with( Q const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return base_class::erase_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >(),
[&f]( leaf_node const& node) { f( node.m_Value ); } );
}
template <typename Q, typename Less>
bool extract_with( guarded_ptr& result, Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return base_class::extract_with_( result.guard(), key,
cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >());
}
template <typename Q, typename Less, typename Func>
bool find_with( Q& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return base_class::find_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >(),
[&f]( leaf_node& node, Q& v ) { f( node.m_Value, v ); } );
}
template <typename Q, typename Less, typename Func>
bool find_with( Q const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return base_class::find_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >(),
[&f]( leaf_node& node, Q const& v ) { f( node.m_Value, v ); } );
}
template <typename Q, typename Less>
bool find_with( Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return base_class::find_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >());
}
template <typename Q, typename Less>
bool get_with( guarded_ptr& result, Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return base_class::get_with_( result.guard(), key,
cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >() );
}
template <typename K, typename Less>
bool erase_with( K const& key, Less pred )
{
+ CDS_UNUSED( pred );
return erase_at( head(), key, typename maker::template less_wrapper<Less>::type() );
}
template <typename K, typename Less, typename Func>
bool erase_with( K const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return erase_at( head(), key, typename maker::template less_wrapper<Less>::type(), f );
}
template <typename K, typename Less>
bool extract_with( guarded_ptr& dest, K const& key, Less pred )
{
+ CDS_UNUSED( pred );
return extract_at( head(), dest.guard(), key, typename maker::template less_wrapper<Less>::type() );
}
template <typename Q, typename Less>
bool find_with( Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return find_at( head(), key, typename maker::template less_wrapper<Less>::type() );
}
template <typename Q, typename Less, typename Func>
bool find_with( Q const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return find_at( head(), key, typename maker::template less_wrapper<Less>::type(), f );
}
template <typename K, typename Less>
bool get_with( guarded_ptr& ptr, K const& key, Less pred )
{
+ CDS_UNUSED( pred );
return get_at( head(), ptr.guard(), key, typename maker::template less_wrapper<Less>::type() );
}
template <typename Q, typename Less>
bool erase_with( Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return erase_at( head(), key, typename maker::template less_wrapper<Less>::type(), [](value_type const&){} );
}
template <typename Q, typename Less, typename Func>
bool erase_with( Q const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return erase_at( head(), key, typename maker::template less_wrapper<Less>::type(), f );
}
template <typename Q, typename Less>
bool extract_with( guarded_ptr& dest, Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return extract_at( head(), dest.guard(), key, typename maker::template less_wrapper<Less>::type() );
}
template <typename Q, typename Less>
bool find_with( Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return find_at( head(), key, typename maker::template less_wrapper<Less>::type() );
}
template <typename Q, typename Less, typename Func>
bool find_with( Q& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return find_at( head(), key, typename maker::template less_wrapper<Less>::type(), f );
}
//@cond
template <typename Q, typename Less, typename Func>
bool find_with( Q const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return find_at( head(), key, typename maker::template less_wrapper<Less>::type(), f );
}
//@endcond
template <typename Q, typename Less>
bool get_with( guarded_ptr& ptr, Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return get_at( head(), ptr.guard(), key, typename maker::template less_wrapper<Less>::type() );
}
template <typename K, typename Less>
bool erase_with( K const& key, Less pred )
{
+ CDS_UNUSED( pred );
return erase_at( head(), key, typename maker::template less_wrapper<Less>::type() );
}
template <typename K, typename Less, typename Func>
bool erase_with( K const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return erase_at( head(), key, typename maker::template less_wrapper<Less>::type(), f );
}
template <typename K, typename Less>
bool extract_with( guarded_ptr& dest, K const& key, Less pred )
{
+ CDS_UNUSED( pred );
return extract_at( head(), dest.guard(), key, typename maker::template less_wrapper<Less>::type() );
}
template <typename Q, typename Less>
bool find_with( Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return find_at( head(), key, typename maker::template less_wrapper<Less>::type() );
}
template <typename Q, typename Less, typename Func>
bool find_with( Q const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return find_at( head(), key, typename maker::template less_wrapper<Less>::type(), f );
}
template <typename K, typename Less>
bool get_with( guarded_ptr& ptr, K const& key, Less pred )
{
+ CDS_UNUSED( pred );
return get_at( head(), ptr.guard(), key, typename maker::template less_wrapper<Less>::type() );
}
template <typename Q, typename Less>
bool erase_with( Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return erase_at( head(), key, typename maker::template less_wrapper<Less>::type(), [](value_type const&){} );
}
template <typename Q, typename Less, typename Func>
bool erase_with( Q const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return erase_at( head(), key, typename maker::template less_wrapper<Less>::type(), f );
}
template <typename Q, typename Less>
bool extract_with( guarded_ptr& dest, Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return extract_at( head(), dest.guard(), key, typename maker::template less_wrapper<Less>::type() );
}
template <typename Q, typename Less>
bool find_with( Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return find_at( head(), key, typename maker::template less_wrapper<Less>::type() );
}
template <typename Q, typename Less, typename Func>
bool find_with( Q& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return find_at( head(), key, typename maker::template less_wrapper<Less>::type(), f );
}
//@cond
template <typename Q, typename Less, typename Func>
bool find_with( Q const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return find_at( head(), key, typename maker::template less_wrapper<Less>::type(), f );
}
//@endcond
template <typename Q, typename Less>
bool get_with( guarded_ptr& ptr, Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return get_at( head(), ptr.guard(), key, typename maker::template less_wrapper<Less>::type() );
}
template <typename K, typename Less>
bool erase_with( K const& key, Less pred )
{
+ CDS_UNUSED( pred );
return base_class::erase_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::key_accessor >());
}
template <typename K, typename Less, typename Func>
bool erase_with( K const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return base_class::erase_with( key,
cds::details::predicate_wrapper< node_type, Less, typename maker::key_accessor >(),
[&f]( node_type& node) { f( node.m_Value ); } );
template <typename K, typename Less>
bool extract_with( guarded_ptr& ptr, K const& key, Less pred )
{
+ CDS_UNUSED( pred );
typedef cds::details::predicate_wrapper< node_type, Less, typename maker::key_accessor > wrapped_less;
return base_class::extract_( ptr.guard(), key, cds::opt::details::make_comparator_from_less<wrapped_less>() );
}
template <typename K, typename Less, typename Func>
bool find_with( K const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return base_class::find_with( key,
cds::details::predicate_wrapper< node_type, Less, typename maker::key_accessor >(),
[&f](node_type& item, K const& ) { f( item.m_Value );});
template <typename K, typename Less>
bool find_with( K const& key, Less pred )
{
+ CDS_UNUSED( pred );
return base_class::find_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::key_accessor >() );
}
template <typename K, typename Less>
bool get_with( guarded_ptr& ptr, K const& key, Less pred )
{
+ CDS_UNUSED( pred );
typedef cds::details::predicate_wrapper< node_type, Less, typename maker::key_accessor > wrapped_less;
return base_class::get_with_( ptr.guard(), key, cds::opt::details::make_comparator_from_less< wrapped_less >());
}
template <typename Q, typename Less>
bool erase_with( Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return base_class::erase_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor >() );
}
template <typename Q, typename Less, typename Func>
bool erase_with( Q const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return base_class::erase_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor >(),
[&f]( node_type const& node) { f( node.m_Value ); } );
}
template <typename Q, typename Less>
bool extract_with( guarded_ptr& ptr, Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
typedef cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor > wrapped_less;
return base_class::extract_( ptr.guard(), key, cds::opt::details::make_comparator_from_less<wrapped_less>() );
}
template <typename Q, typename Less, typename Func>
bool find_with( Q& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return base_class::find_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor >(),
[&f]( node_type& node, Q& v ) { f( node.m_Value, v ); } );
}
template <typename Q, typename Less, typename Func>
bool find_with( Q const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return base_class::find_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor >(),
[&f]( node_type& node, Q& v ) { f( node.m_Value, v ); } );
}
template <typename Q, typename Less>
bool find_with( Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return base_class::find_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor >());
}
template <typename Q, typename Less>
bool get_with( guarded_ptr& result, Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
typedef cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor > wrapped_less;
return base_class::get_with_( result.guard(), key, cds::opt::details::make_comparator_from_less< wrapped_less >());
}
template <typename Q, typename Less>
iterator find_with( Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return node_to_iterator( find_at( head(), key, typename maker::template less_wrapper<Less>::type() ) );
}
template <typename K, typename Less>
bool erase_with( K const& key, Less pred )
{
+ CDS_UNUSED( pred );
return erase_at( head(), key, typename maker::template less_wrapper<Less>::type() );
}
template <typename K, typename Less, typename Func>
bool erase_with( K const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return erase_at( head(), key, typename maker::template less_wrapper<Less>::type(), f );
}
template <typename K, typename Less>
exempt_ptr extract_with( K const& key, Less pred )
{
+ CDS_UNUSED( pred );
return exempt_ptr( extract_at( head(), key, typename maker::template less_wrapper<Less>::type() ));
}
template <typename Q, typename Less>
bool find_with( Q const& key, Less pred ) const
{
+ CDS_UNUSED( pred );
return find_at( head(), key, typename maker::template less_wrapper<Less>::type() );
}
template <typename Q, typename Less, typename Func>
bool find_with( Q const& key, Less pred, Func f ) const
{
+ CDS_UNUSED( pred );
return find_at( head(), key, typename maker::template less_wrapper<Less>::type(), f );
}
template <typename K, typename Less>
value_type * get_with( K const& key, Less pred ) const
{
+ CDS_UNUSED( pred );
return get_at( head(), key, typename maker::template less_wrapper<Less>::type());
}
template <typename Q, typename Less>
iterator find_with( Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return node_to_iterator( find_at( head(), key, typename maker::template less_wrapper<Less>::type() ));
}
template <typename Q, typename Less>
bool erase_with( Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return erase_at( head(), key, typename maker::template less_wrapper<Less>::type(), [](value_type const&){} );
}
template <typename Q, typename Less, typename Func>
bool erase_with( Q const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return erase_at( head(), key, typename maker::template less_wrapper<Less>::type(), f );
}
template <typename Q, typename Less>
exempt_ptr extract_with( Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return exempt_ptr( extract_at( head(), key, typename maker::template less_wrapper<Less>::type()));
}
template <typename Q, typename Less>
bool find_with( Q const& key, Less pred ) const
{
+ CDS_UNUSED( pred );
return find_at( head(), key, typename maker::template less_wrapper<Less>::type() );
}
template <typename Q, typename Less, typename Func>
bool find_with( Q& key, Less pred, Func f ) const
{
+ CDS_UNUSED( pred );
return find_at( head(), key, typename maker::template less_wrapper<Less>::type(), f );
}
//@cond
template <typename Q, typename Less, typename Func>
bool find_with( Q const& key, Less pred, Func f ) const
{
+ CDS_UNUSED( pred );
return find_at( head(), key, typename maker::template less_wrapper<Less>::type(), f );
}
//@endcond
template <typename Q, typename Less>
value_type * get_with( Q const& key, Less pred ) const
{
+ CDS_UNUSED( pred );
return get_at( head(), key, typename maker::template less_wrapper<Less>::type());
}
template <typename Q, typename Less>
iterator find_with( Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return node_to_iterator( find_at( head(), key, typename maker::template less_wrapper<Less>::type() ) );
}
template <typename K, typename Less>
bool erase_with( K const& key, Less pred )
{
+ CDS_UNUSED( pred );
return erase_at( head(), key, typename maker::template less_wrapper<Less>::type() );
}
template <typename K, typename Less, typename Func>
bool erase_with( K const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return erase_at( head(), key, typename maker::template less_wrapper<Less>::type(), f );
}
template <typename K, typename Less>
exempt_ptr extract_with( K const& key, Less pred )
{
+ CDS_UNUSED( pred );
return exempt_ptr( extract_at( head(), key, typename maker::template less_wrapper<Less>::type() ));
}
template <typename Q, typename Less>
bool find_with( Q const& key, Less pred ) const
{
+ CDS_UNUSED( pred );
return find_at( head(), key, typename maker::template less_wrapper<Less>::type() );
}
template <typename Q, typename Less, typename Func>
bool find_with( Q const& key, Less pred, Func f ) const
{
+ CDS_UNUSED( pred );
return find_at( head(), key, typename maker::template less_wrapper<Less>::type(), f );
}
template <typename K, typename Less>
value_type * get_with( K const& key, Less pred ) const
{
+ CDS_UNUSED( pred );
return get_at( head(), key, typename maker::template less_wrapper<Less>::type() );
}
template <typename Q, typename Less>
iterator find_with( Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return node_to_iterator( find_at( head(), key, typename maker::template less_wrapper<Less>::type() ) );
}
template <typename Q, typename Less>
bool erase_with( Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return erase_at( head(), key, typename maker::template less_wrapper<Less>::type(), [](value_type const&){} );
}
template <typename Q, typename Less, typename Func>
bool erase_with( Q const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return erase_at( head(), key, typename maker::template less_wrapper<Less>::type(), f );
}
template <typename Q, typename Less>
exempt_ptr extract_with( Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return exempt_ptr( extract_at( head(), key, typename maker::template less_wrapper<Less>::type() ));
}
template <typename Q, typename Less>
bool find_with( Q const& key, Less pred ) const
{
+ CDS_UNUSED( pred );
return find_at( head(), key, typename maker::template less_wrapper<Less>::type() );
}
template <typename Q, typename Less, typename Func>
bool find_with( Q& key, Less pred, Func f ) const
{
+ CDS_UNUSED( pred );
return find_at( head(), key, typename maker::template less_wrapper<Less>::type(), f );
}
//@cond
template <typename Q, typename Less, typename Func>
bool find_with( Q const& key, Less pred, Func f ) const
{
+ CDS_UNUSED( pred );
return find_at( head(), key, typename maker::template less_wrapper<Less>::type(), f );
}
//@endcond
template <typename Q, typename Less>
value_type * get_with( Q const& key, Less pred ) const
{
+ CDS_UNUSED( pred );
return get_at( head(), key, typename maker::template less_wrapper<Less>::type());
}
template <typename K, typename Less>
bool erase_with( K const& key, Less pred )
{
+ CDS_UNUSED( pred );
return base_class::erase_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::key_accessor >());
}
template <typename K, typename Less, typename Func>
bool erase_with( K const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return base_class::erase_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::key_accessor >(),
[&f]( node_type& node) { f( node.m_Value ); } );
}
template <typename K, typename Less>
exempt_ptr extract_with( K const& key, Less pred )
{
+ CDS_UNUSED( pred );
return exempt_ptr( base_class::do_extract_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::key_accessor >()));
}
template <typename K, typename Less, typename Func>
bool find_with( K const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return base_class::find_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::key_accessor >(),
[&f](node_type& item, K const& ) { f( item.m_Value );});
}
template <typename K, typename Less>
bool find_with( K const& key, Less pred )
{
+ CDS_UNUSED( pred );
return base_class::find_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::key_accessor >() );
}
template <typename K, typename Less>
value_type * get_with( K const& key, Less pred )
{
+ CDS_UNUSED( pred );
return to_value_ptr( base_class::get_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::key_accessor >() ));
}
template <typename Q, typename Less>
iterator find_with( Q const& key, Less pred ) const
{
+ CDS_UNUSED( pred );
node_type * pNode = base_class::find_with( key, cds::details::predicate_wrapper< node_type, Less, key_accessor>() );
if ( pNode )
return node_to_iterator( pNode );
template <typename Q, typename Less>
bool erase_with( Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return base_class::erase_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor >());
}
template <typename Q, typename Less, typename Func>
bool erase_with( Q const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return base_class::erase_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor >(),
[&f]( node_type const& node) { f( node.m_Value ); } );
}
template <typename Q, typename Less>
exempt_ptr extract_with( Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return exempt_ptr( base_class::do_extract_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor >()));
}
template <typename Q, typename Less, typename Func>
bool find_with( Q& val, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return base_class::find_with( val, cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor >(),
[&f]( node_type& node, Q& v ) { f( node.m_Value, v ); } );
}
template <typename Q, typename Less, typename Func>
bool find_with( Q const& val, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return base_class::find_with( val, cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor >(),
[&f]( node_type& node, Q& v ) { f( node.m_Value, v ); } );
}
template <typename Q, typename Less>
bool find_with( Q const& val, Less pred )
{
+ CDS_UNUSED( pred );
return base_class::find_with( val, cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor >());
}
template <typename Q, typename Less>
value_type * get_with( Q const& val, Less pred )
{
+ CDS_UNUSED( pred );
return to_value_ptr( base_class::get_with( val, cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor >() ));
}
template <typename K, typename Less>
bool erase_with( K const& key, Less pred )
{
+ CDS_UNUSED( pred );
return base_class::erase_with( key, cds::details::predicate_wrapper<value_type, Less, key_accessor>() );
}
template <typename K, typename Less, typename Func>
bool erase_with( K const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return base_class::erase_with( key, cds::details::predicate_wrapper<value_type, Less, key_accessor>(), f );
}
template <typename K, typename Less>
bool extract_with( guarded_ptr& dest, K const& key, Less pred )
{
+ CDS_UNUSED( pred );
return base_class::extract_with_( dest.guard(), key, cds::details::predicate_wrapper<value_type, Less, key_accessor>() );
}
template <typename K, typename Less, typename Func>
bool find_with( K const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return base_class::find_with( key,
cds::details::predicate_wrapper<value_type, Less, key_accessor>(),
[&f](value_type& pair, K const&){ f( pair ); } );
template <typename K, typename Less>
bool find_with( K const& key, Less pred )
{
+ CDS_UNUSED( pred );
return base_class::find( key, cds::details::predicate_wrapper<value_type, Less, key_accessor>() );
}
template <typename K, typename Less>
bool get_with( guarded_ptr& ptr, K const& key, Less pred )
{
+ CDS_UNUSED( pred );
return base_class::get_with_( ptr.guard(), key, cds::details::predicate_wrapper<value_type, Less, key_accessor>() );
}
template <typename K, typename Less>
iterator find_with( K const& key, Less pred )
{
+ CDS_UNUSED( pred );
return base_class::find_with( key, cds::details::predicate_wrapper<value_type, Less, key_accessor>() );
}
template <typename K, typename Less>
bool erase_with( K const& key, Less pred )
{
+ CDS_UNUSED( pred );
return base_class::erase_with( key, cds::details::predicate_wrapper<value_type, Less, key_accessor>() );
}
template <typename K, typename Less, typename Func>
bool erase_with( K const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return base_class::erase_with( key, cds::details::predicate_wrapper<value_type, Less, key_accessor>(), f );
}
template <typename K, typename Less>
exempt_ptr extract_with( K const& key, Less pred )
{
+ CDS_UNUSED( pred );
return base_class::extract_with( key, cds::details::predicate_wrapper<value_type, Less, key_accessor>());
}
template <typename K, typename Less, typename Func>
bool find_with( K const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return base_class::find_with( key,
cds::details::predicate_wrapper<value_type, Less, key_accessor>(),
[&f](value_type& pair, K const&){ f( pair ); } );
template <typename K, typename Less>
bool find_with( K const& key, Less pred )
{
+ CDS_UNUSED( pred );
return base_class::find_with( key, cds::details::predicate_wrapper<value_type, Less, key_accessor>() );
}
template <typename K, typename Less>
value_type * get_with( K const& key, Less pred )
{
+ CDS_UNUSED( pred );
return base_class::get_with( key, cds::details::predicate_wrapper<value_type, Less, key_accessor>());
}
template <typename Q, typename Less, typename Func>
bool find_with_( Q& val, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return base_class::find_with( val, typename maker::template predicate_wrapper<Less>::type(),
[&f]( node_type& item, Q& val ) { f(item.m_Value, val) ; } );
}
template <typename Q, typename Less>
bool erase_with( Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return base_class::erase_with( key, typename maker::template predicate_wrapper<Less>::type() );
}
template <typename Q, typename Less, typename Func>
bool erase_with( Q const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return base_class::erase_with( key, typename maker::template predicate_wrapper<Less>::type(),
[&f](node_type& node) { f( node.m_Value ); } );
}
template <typename Q, typename Less>
bool find_with( Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return base_class::find_with( key, typename maker::template predicate_wrapper<Less>::type() );
}
template <typename Q, typename Less>
bool extract_with_( typename gc::Guard& guard, Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return base_class::extract_with_( guard, key, typename maker::template predicate_wrapper<Less>::type() );
}
template <typename Q, typename Less>
bool get_with_( typename gc::Guard& guard, Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return base_class::get_with_( guard, key, typename maker::template predicate_wrapper<Less>::type() );
}
template <typename Q, typename Less>
iterator find_with( Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return iterator( base_class::find_with_( key, typename maker::template predicate_wrapper<Less>::type() ));
}
template <typename Q, typename Less, typename Func>
bool find_with_( Q& val, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return base_class::find_with( val, typename maker::template predicate_wrapper<Less>::type(),
[&f]( node_type& item, Q& val ) { f(item.m_Value, val) ; } );
}
template <typename Q, typename Less>
bool erase_with( Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return base_class::erase_with( key, typename maker::template predicate_wrapper<Less>::type() );
}
template <typename Q, typename Less, typename Func>
bool erase_with( Q const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return base_class::erase_with( key, typename maker::template predicate_wrapper<Less>::type(),
[&f](node_type& node) { f( node.m_Value ); } );
}
template <typename Q, typename Less>
exempt_ptr extract_with( Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return exempt_ptr( base_class::extract_with_( key, typename maker::template predicate_wrapper<Less>::type()));
}
template <typename Q, typename Less>
bool find_with( Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return base_class::find_with( key, typename maker::template predicate_wrapper<Less>::type() );
}
template <typename Q, typename Less>
value_type * get_with( Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
node_type * pNode = base_class::get_with( key, typename maker::template predicate_wrapper<Less>::type());
return pNode ? &pNode->m_Value : nullptr;
}
,typename Bucket = bucket_type, typename = typename std::enable_if< Bucket::has_erase_with >::type >
bool erase_with( K const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return base_class::erase_with( key, cds::details::predicate_wrapper< value_type, Less, key_accessor >(), f );
}
,typename Bucket = bucket_type, typename = typename std::enable_if< Bucket::has_find_with >::type >
bool find_with( K const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return base_class::find_with( key, cds::details::predicate_wrapper< value_type, Less, key_accessor >(),
[&f]( value_type& pair, K const& ) mutable { f(pair); } );
}
,typename Bucket = bucket_type, typename = typename std::enable_if< Bucket::has_find_with >::type >
bool find_with( K const& key, Less pred )
{
+ CDS_UNUSED( pred );
return base_class::find_with( key, cds::details::predicate_wrapper< value_type, Less, key_accessor >() );
}
assert( m_nTop < capacity() );
hp.clear();
++m_nTop;
- CDS_COMPILER_RW_BARRIER ; // ???
}
/// Allocates hazard pointers array
template <size_t Count>
void free( hp_array<Count> const& arr ) CDS_NOEXCEPT
{
+ CDS_UNUSED( arr );
+
assert( m_nTop + Count <= capacity());
for ( size_t i = m_nTop; i < m_nTop + Count; ++i )
- m_arrHazardPtr[ i ].clear();
+ m_arrHazardPtr[i].clear();
m_nTop += Count;
}
void make_free() CDS_NOEXCEPT
{
for ( size_t i = 0; i < capacity(); ++i )
- m_arrHazardPtr[ i ].clear();
+ m_arrHazardPtr[i].clear();
m_nTop = capacity();
}
/// \p SkipListSet empty internal statistics
struct empty_stat {
//@cond
- void onAddNode( unsigned int nHeight ) const {}
- void onRemoveNode( unsigned int nHeight ) const {}
+ void onAddNode( unsigned int /*nHeight*/ ) const {}
+ void onRemoveNode( unsigned int /*nHeight*/ ) const {}
void onInsertSuccess() const {}
void onInsertFailed() const {}
void onInsertRetry() const {}
template <typename Q, typename Less>
bool extract_with( guarded_ptr& dest, Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return extract_( dest.guard(), key, cds::opt::details::make_comparator_from_less<Less>() );
}
template <typename Q, typename Less>
bool erase_with( Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return erase_( key, cds::opt::details::make_comparator_from_less<Less>(), [](value_type const&) {} );
}
template <typename Q, typename Less, typename Func>
bool erase_with( Q const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return erase_( key, cds::opt::details::make_comparator_from_less<Less>(), f );
}
template <typename Q, typename Less, typename Func>
bool find_with( Q& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return find_with_( key, cds::opt::details::make_comparator_from_less<Less>(), f );
}
//@cond
template <typename Q, typename Less, typename Func>
bool find_with( Q const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return find_with_( key, cds::opt::details::make_comparator_from_less<Less>(), f );
}
//@endcond
template <typename Q, typename Less>
bool find_with( Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return find_with_( key, cds::opt::details::make_comparator_from_less<Less>(), [](value_type& , Q const& ) {} );
}
template <typename Q, typename Less>
bool get_with( guarded_ptr& ptr, Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return get_with_( ptr.guard(), key, cds::opt::details::make_comparator_from_less<Less>() );
}
*/
void clear()
{
- clear_with( []( value_type const& src ) {} );
+ clear_with( []( value_type const& /*src*/ ) {} );
}
/// Clears the queue (not atomic)
void onBadTail() {}
void reset() {}
- empty_stat& operator +=( empty_stat const& s )
+ empty_stat& operator +=( empty_stat const& )
{
return *this;
}
//@cond
typedef Node node_type;
- static void is_empty( const node_type * pNode )
+ static void is_empty( const node_type * /*pNode*/ )
{}
//@endcond
};
template <typename Q, typename Less, typename Func>
bool find_with( Q& key, Less pred, Func f ) const
{
+ CDS_UNUSED( pred );
return find_with_( key, cds::opt::details::make_comparator_from_less<Less>(), f ) != nullptr;
}
//@cond
template <typename Q, typename Less, typename Func>
bool find_with( Q const& key, Less pred, Func f ) const
{
+ CDS_UNUSED( pred );
return find_with_( key, cds::opt::details::make_comparator_from_less<Less>(), f ) != nullptr;
}
//@endcond
template <typename Q, typename Less>
value_type * find_with( Q const& key, Less pred ) const
{
+ CDS_UNUSED( pred );
node_type * pNode = find_with_( key, cds::opt::details::make_comparator_from_less<Less>(), [](value_type& , Q const& ) {} );
if ( pNode )
return node_traits::to_value_ptr( pNode );
template <typename Q, typename Less>
value_type * do_extract_with( Q const& key, Less pred )
{
+ CDS_UNUSED(pred);
check_deadlock_policy::check();
value_type * pDel = nullptr;
template <typename Q, typename Less>
bool erase_with( const Q& key, Less pred )
{
+ CDS_UNUSED( pred );
return do_erase( key, cds::opt::details::make_comparator_from_less<Less>(), [](value_type const&) {} );
}
template <typename Q, typename Less, typename Func>
bool erase_with( Q const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return do_erase( key, cds::opt::details::make_comparator_from_less<Less>(), f );
}
template <typename Q, typename Less, typename Func>
bool find_with( Q& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return do_find_with( key, cds::opt::details::make_comparator_from_less<Less>(), f );
}
//@cond
template <typename Q, typename Less, typename Func>
bool find_with( Q const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return do_find_with( key, cds::opt::details::make_comparator_from_less<Less>(), f );
}
//@endcond
template <typename Q, typename Less>
bool find_with( Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return do_find_with( key, cds::opt::details::make_comparator_from_less<Less>(), [](value_type& , Q const& ) {} );
}
template <typename Q, typename Less>
value_type * get_with( Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
assert( gc::is_locked());
value_type * pFound;
template <typename Q, typename Less>
bool erase_with( const Q& key, Less pred )
{
+ CDS_UNUSED( pred );
return erase_( key, typename wrapped_ordered_list::template make_compare_from_less<Less>() );
}
template <typename Q, typename Less, typename Func>
bool erase_with( Q const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return erase_( key, typename wrapped_ordered_list::template make_compare_from_less<Less>(), f );
}
template <typename Q, typename Less, typename Func>
bool find_with( Q& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return find_( key, typename wrapped_ordered_list::template make_compare_from_less<Less>(), f );
}
//@cond
template <typename Q, typename Less, typename Func>
bool find_with( Q const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return find_( key, typename wrapped_ordered_list::template make_compare_from_less<Less>(), f );
}
//@endcond
template <typename Q, typename Less>
bool find_with( Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return find_( key, typename wrapped_ordered_list::template make_compare_from_less<Less>() );
}
template <typename Q, typename Less, typename Func>
bool find_with( Q& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return find_( key, typename wrapped_ordered_list::template make_compare_from_less<Less>(), f );
}
//@cond
template <typename Q, typename Less, typename Func>
bool find_with( Q const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return find_( key, typename wrapped_ordered_list::template make_compare_from_less<Less>(), f );
}
//@endcond
template <typename Q, typename Less >
iterator find_with_( Q& val, Less pred )
{
+ CDS_UNUSED( pred );
size_t nHash = hash_value( val );
split_list::details::search_value_type<Q const> sv( val, split_list::regular_hash( nHash ));
dummy_node_type * pHead = get_bucket( nHash );
template <typename Q, typename Less>
value_type * extract_with_( Q const& val, Less pred )
{
+ CDS_UNUSED( pred );
return extract_( val, typename wrapped_ordered_list::template make_compare_from_less<Less>());
}
template <typename Q, typename Less>
bool erase_with( Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return erase_( key, typename wrapped_ordered_list::template make_compare_from_less<Less>() );
}
template <typename Q, typename Less, typename Func>
bool erase_with( Q const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return erase_( key, typename wrapped_ordered_list::template make_compare_from_less<Less>(), f );
}
template <typename Q, typename Less, typename Func>
bool find_with( Q& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return find_( key, typename wrapped_ordered_list::template make_compare_from_less<Less>(), f );
}
//@cond
template <typename Q, typename Less, typename Func>
bool find_with( Q const& key, Less pred, Func f )
{
+ CDS_UNUSED( pred );
return find_( key, typename wrapped_ordered_list::template make_compare_from_less<Less>(), f );
}
//@endcond
template <typename Q, typename Less>
bool find_with( Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return find_value( key, typename wrapped_ordered_list::template make_compare_from_less<Less>() );
}
template <typename Q, typename Less>
value_type * get_with( Q const& key, Less pred )
{
+ CDS_UNUSED( pred );
return get_( key, typename wrapped_ordered_list::template make_compare_from_less<Less>());
}
}
template <typename Q, typename Less, typename Func>
- value_type * erase( Q const& key, Less pred, Func f )
+ value_type * erase( Q const& key, Less /*pred*/, Func f )
{
return erase_( key, cds::opt::details::make_comparator_from_less<Less>(), f );
}
size_t operator()( size_t nWhat, size_t nCapacity ) const
{
assert( nWhat < nCapacity );
+ CDS_UNUSED( nCapacity );
return nWhat;
}
/// Checks if \p nCapacity is acceptable by policy. For trivial policy, any \p nCapacity is accepted.
static bool is_capacity_accepted( size_t nCapacity )
{
+ CDS_UNUSED( nCapacity );
return true;
}
};
/// Allocates new processor descriptor
processor_desc * new_processor_desc( unsigned int nProcessorId )
{
+ CDS_UNUSED( nProcessorId );
processor_desc * pDesc;
const size_t nPageHeapCount = m_SizeClassSelector.pageTypeCount();
*/
static_buffer( size_t nCapacity )
{
+ CDS_UNUSED( nCapacity );
// Capacity must be power of 2
static_assert( !c_bExp2 || (c_nCapacity & (c_nCapacity - 1)) == 0, "Capacity must be power of two");
//assert( c_nCapacity == nCapacity );
{}
template <typename RCUtag>
- void sh_singleton<RCUtag>::signal_handler( int signo, siginfo_t * sigInfo, void * context )
+ void sh_singleton<RCUtag>::signal_handler( int /*signo*/, siginfo_t * /*sigInfo*/, void * /*context*/ )
{
thread_record * pRec = cds::threading::getRCU<RCUtag>();
if ( pRec ) {
<ClCompile Include="..\..\..\tests\test-hdr\map\hdr_refinable_hashmap_boost_map.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\map\hdr_refinable_hashmap_boost_unordered_map.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\map\hdr_refinable_hashmap_hashmap_std.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\map\hdr_refinable_hashmap_hashmap_vc.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\map\hdr_refinable_hashmap_list.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\map\hdr_refinable_hashmap_map.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\map\hdr_refinable_hashmap_slist.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\map\hdr_striped_hashmap_boost_map.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\map\hdr_striped_hashmap_boost_unordered_map.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\map\hdr_striped_hashmap_hashmap_std.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\map\hdr_striped_hashmap_hashmap_vc.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\map\hdr_striped_hashmap_list.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\map\hdr_striped_hashmap_map.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\map\hdr_striped_hashmap_slist.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\map\hdr_refinable_hashmap_hashmap_std.cpp">\r
<Filter>striped</Filter>\r
</ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\map\hdr_refinable_hashmap_hashmap_vc.cpp">\r
- <Filter>striped</Filter>\r
- </ClCompile>\r
<ClCompile Include="..\..\..\tests\test-hdr\map\hdr_refinable_hashmap_list.cpp">\r
<Filter>striped</Filter>\r
</ClCompile>\r
<ClCompile Include="..\..\..\tests\test-hdr\map\hdr_striped_hashmap_hashmap_std.cpp">\r
<Filter>striped</Filter>\r
</ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\map\hdr_striped_hashmap_hashmap_vc.cpp">\r
- <Filter>striped</Filter>\r
- </ClCompile>\r
<ClCompile Include="..\..\..\tests\test-hdr\map\hdr_striped_hashmap_list.cpp">\r
<Filter>striped</Filter>\r
</ClCompile>\r
return m_pCurTestCase;
}
- virtual void setUpParams( const TestCfg& cfg ) {}
+ virtual void setUpParams( const TestCfg& /*cfg*/ ) {}
virtual void endTestCase() {}
virtual void myRun(const char * /*in_name*/, bool /*invert*/ = false) {}
pThread->m_nDuration = pThread->m_Timer.duration();
}
- void ThreadPool::onThreadFiniDone( TestThread * pThread )
+ void ThreadPool::onThreadFiniDone( TestThread * /*pThread*/ )
{
// Calls in context of caller thread
// Wait while all threads done
struct my_copy_policy {
typedef map_t::iterator iterator;
- void operator()( map_t& m, iterator itInsert, iterator itWhat )
+ void operator()( map_t& m, iterator /*itInsert*/, iterator itWhat )
{
m.insert( std::make_pair(itWhat->first, itWhat->second ) );
}
struct my_copy_policy {
typedef map_t::iterator iterator;
- void operator()( map_t& m, iterator itInsert, iterator itWhat )
+ void operator()( map_t& m, iterator /*itInsert*/, iterator itWhat )
{
m.insert( std::make_pair(itWhat->first, itWhat->second ) );
}
+++ /dev/null
-//$$CDS-header$$
-
-#include "map/hdr_striped_map.h"
-#include <cds/container/striped_map/std_hash_map.h>
-#include <cds/container/striped_map.h>
-#include <cds/lock/spinlock.h>
-
-#if (CDS_COMPILER == CDS_COMPILER_MSVC || (CDS_COMPILER == CDS_COMPILER_INTEL && CDS_OS_INTERFACE == CDS_OSI_WINDOWS)) && _MSC_VER < 1600
-
-namespace map {
-
- namespace {
- typedef stdext::hash_map< StripedMapHdrTest::key_type, StripedMapHdrTest::value_type > map_t;
-
- struct my_copy_policy {
- typedef map_t::iterator iterator;
-
- void operator()( map_t& m, iterator itInsert, iterator itWhat )
- {
- m.insert( std::make_pair(itWhat->first, itWhat->second ) );
- }
- };
- }
-
- void StripedMapHdrTest::Refinable_hashmap()
- {
- CPPUNIT_MESSAGE( "cmp");
- typedef cc::StripedMap< map_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp >
- > map_cmp;
- test_striped< map_cmp >();
-
- CPPUNIT_MESSAGE( "less");
- typedef cc::StripedMap< map_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less >
- > map_less;
- test_striped< map_less >();
-
- CPPUNIT_MESSAGE( "cmpmix");
- typedef cc::StripedMap< map_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp >
- , co::less< less >
- > map_cmpmix;
- test_striped< map_cmpmix >();
-
- // Spinlock as lock policy
- CPPUNIT_MESSAGE( "spinlock");
- typedef cc::StripedMap< map_t
- ,co::mutex_policy< cc::striped_set::refinable<cds::lock::Spin> >
- , co::hash< hash_int >
- , co::less< less >
- > map_spin;
- test_striped< map_spin >();
-
- // Resizing policy
- CPPUNIT_MESSAGE( "load_factor_resizing<0>(1024)");
- {
- typedef cc::StripedMap< map_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<0> >
- > map_less_resizing_lf;
- map_less_resizing_lf m(30, cc::striped_set::load_factor_resizing<0>(1024));
- test_striped_with(m);
- }
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>");
- typedef cc::StripedMap< map_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- > map_less_resizing_lf16;
- test_striped< map_less_resizing_lf16 >();
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(1024)");
- {
- typedef cc::StripedMap< map_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> >
- > map_less_resizing_sbt;
- map_less_resizing_sbt m(30, cc::striped_set::single_bucket_size_threshold<0>(1024));
- test_striped_with(m);
- }
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<256>");
- typedef cc::StripedMap< map_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<256> >
- > map_less_resizing_sbt16;
- test_striped< map_less_resizing_sbt16 >();
-
- // Copy policy
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, copy_item");
- typedef cc::StripedMap< map_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< cc::striped_set::copy_item >
- > set_copy_item;
- test_striped< set_copy_item >();
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, swap_item");
- typedef cc::StripedMap< map_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< cc::striped_set::swap_item >
- > set_swap_item;
- test_striped< set_swap_item >();
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, move_item");
- typedef cc::StripedMap< map_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< cc::striped_set::move_item >
- > set_move_item;
- test_striped< set_move_item >();
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, special copy_policy");
- typedef cc::StripedMap< map_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< my_copy_policy >
- > set_special_copy_item;
- test_striped< set_special_copy_item >();
- }
-} // namespace map
-
-#endif // #if CDS_COMPILER == CDS_COMPILER_MSVC && CDS_COMPILER_VERSION < 1600
struct my_copy_policy {
typedef map_t::iterator iterator;
- void operator()( map_t& m, iterator itInsert, iterator itWhat )
+ void operator()( map_t& m, iterator /*itInsert*/, iterator itWhat )
{
m.insert( std::make_pair(itWhat->first, itWhat->second ) );
}
struct my_copy_policy {
typedef map_t::iterator iterator;
- void operator()( map_t& m, iterator itInsert, iterator itWhat )
+ void operator()( map_t& m, iterator /*itInsert*/, iterator itWhat )
{
m.insert( std::make_pair(itWhat->first, itWhat->second ) );
}
+++ /dev/null
-//$$CDS-header$$
-
-#include "map/hdr_striped_map.h"
-#include <cds/container/striped_map/std_hash_map.h>
-#include <cds/container/striped_map.h>
-#include <cds/lock/spinlock.h>
-
-#if (CDS_COMPILER == CDS_COMPILER_MSVC || (CDS_COMPILER == CDS_COMPILER_INTEL && CDS_OS_INTERFACE == CDS_OSI_WINDOWS)) && _MSC_VER < 1600
-
-namespace map {
-
- namespace {
- typedef stdext::hash_map< StripedMapHdrTest::key_type, StripedMapHdrTest::value_type > map_t;
-
- struct my_copy_policy {
- typedef map_t::iterator iterator;
-
- void operator()( map_t& m, iterator itInsert, iterator itWhat )
- {
- m.insert( std::make_pair(itWhat->first, itWhat->second ) );
- }
- };
- }
-
- void StripedMapHdrTest::Striped_hashmap()
- {
- CPPUNIT_MESSAGE( "cmp");
- typedef cc::StripedMap< map_t
- , co::hash< hash_int >
- , co::compare< cmp >
- ,co::mutex_policy< cc::striped_set::striping<> >
- > map_cmp;
- test_striped< map_cmp >();
-
- CPPUNIT_MESSAGE( "less");
- typedef cc::StripedMap< map_t
- , co::hash< hash_int >
- , co::less< less >
- > map_less;
- test_striped< map_less >();
-
- CPPUNIT_MESSAGE( "cmpmix");
- typedef cc::StripedMap< map_t
- , co::hash< hash_int >
- , co::compare< cmp >
- , co::less< less >
- > map_cmpmix;
- test_striped< map_cmpmix >();
-
- // Spinlock as lock policy
- CPPUNIT_MESSAGE( "spinlock");
- typedef cc::StripedMap< map_t
- , co::hash< hash_int >
- , co::less< less >
- ,co::mutex_policy< cc::striped_set::striping<cds::lock::Spin> >
- > map_spin;
- test_striped< map_spin >();
-
- // Resizing policy
- CPPUNIT_MESSAGE( "load_factor_resizing<0>(1024)");
- {
- typedef cc::StripedMap< map_t
- , co::hash< hash_int >
- , co::less< less >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<0> >
- > map_less_resizing_lf;
- map_less_resizing_lf m(30, cc::striped_set::load_factor_resizing<0>(1024));
- test_striped_with(m);
- }
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>");
- typedef cc::StripedMap< map_t
- , co::hash< hash_int >
- , co::less< less >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- > map_less_resizing_lf16;
- test_striped< map_less_resizing_lf16 >();
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(1024)");
- {
- typedef cc::StripedMap< map_t
- , co::hash< hash_int >
- , co::compare< cmp >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> >
- > map_less_resizing_sbt;
- map_less_resizing_sbt m(30, cc::striped_set::single_bucket_size_threshold<0>(1024));
- test_striped_with(m);
- }
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<256>");
- typedef cc::StripedMap< map_t
- , co::hash< hash_int >
- , co::less< less >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<256> >
- > map_less_resizing_sbt16;
- test_striped< map_less_resizing_sbt16 >();
-
- // Copy policy
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, copy_item");
- typedef cc::StripedMap< map_t
- , co::hash< hash_int >
- , co::less< less >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< cc::striped_set::copy_item >
- > set_copy_item;
- test_striped< set_copy_item >();
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, swap_item");
- typedef cc::StripedMap< map_t
- , co::hash< hash_int >
- , co::less< less >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< cc::striped_set::swap_item >
- > set_swap_item;
- test_striped< set_swap_item >();
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, move_item");
- typedef cc::StripedMap< map_t
- , co::hash< hash_int >
- , co::less< less >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< cc::striped_set::move_item >
- > set_move_item;
- test_striped< set_move_item >();
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, special copy_policy");
- typedef cc::StripedMap< map_t
- , co::hash< hash_int >
- , co::less< less >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< my_copy_policy >
- > set_special_copy_item;
- test_striped< set_special_copy_item >();
- }
-
-} // namespace map
-
-#endif // #if CDS_COMPILER == CDS_COMPILER_MSVC && CDS_COMPILER_VERSION < 1600
}
};
struct dummy_insert_functor {
- void operator ()( item& i )
+ void operator ()( item& /*i*/ )
{
// This functor should not be called
TestCase::current_test()->error( "CPPUNIT_ASSERT", "dummy_insert_functor should not be called", __FILE__, __LINE__ );
{
i.nVal = i.nKey * 1024;
}
- static void dummy_insert_function( item& i )
+ static void dummy_insert_function( item& /*i*/ )
{
// This function should not be called
TestCase::current_test()->error( "CPPUNIT_ASSERT", "dummy_insert_function should not be called", __FILE__, __LINE__ );
};
struct dummy_check_value {
- void operator()( item& i, int )
+ void operator()( item& /*i*/, int )
{
// This functor should not be called
TestCase::current_test()->error( "CPPUNIT_ASSERT", "dummy_check_value should not be called", __FILE__, __LINE__ );
};
struct ensure_functor {
- void operator()( bool bNew, item& i, int n )
+ void operator()( bool /*bNew*/, item& i, int n )
{
i.nVal = i.nKey * 1024;
}
};
- static void ensure_func( bool bNew, item& i, int n )
+ static void ensure_func( bool /*bNew*/, item& i, int n )
{
i.nVal = n * 1033;
}
struct ensure_functor {
template <typename T>
- void operator()( bool bNew, T& pair )
+ void operator()( bool /*bNew*/, T& pair )
{
pair.second.m_val = pair.first * 50;
}
}
};
struct dummy_insert_functor {
- void operator ()( item& i )
+ void operator ()( item& /*i*/ )
{
// This functor should not be called
TestCase::current_test()->error( "CPPUNIT_ASSERT", "dummy_insert_functor should not be called", __FILE__, __LINE__ );
{
i.nVal = i.nKey * 1024;
}
- static void dummy_insert_function( item& i )
+ static void dummy_insert_function( item& /*i*/ )
{
// This function should not be called
TestCase::current_test()->error( "CPPUNIT_ASSERT", "dummy_insert_function should not be called", __FILE__, __LINE__ );
};
struct dummy_check_value {
- void operator()( item& i, int )
+ void operator()( item& /*i*/, int )
{
// This functor should not be called
TestCase::current_test()->error( "CPPUNIT_ASSERT", "dummy_check_value should not be called", __FILE__, __LINE__ );
};
struct ensure_functor {
- void operator()( bool bNew, item& i, int n )
+ void operator()( bool /*bNew*/, item& i, int n )
{
i.nVal = i.nKey * 1024;
}
};
- static void ensure_func( bool bNew, item& i, int n )
+ static void ensure_func( bool /*bNew*/, item& i, int n )
{
i.nVal = n * 1033;
}
struct ensure_functor {
template <typename T>
- void operator()( bool bNew, T& pair )
+ void operator()( bool /*bNew*/, T& pair )
{
pair.second.m_val = pair.first * 50;
}
: m_nCallCount(0)
{}
template <typename T>
- void operator()( T& p )
+ void operator()( T& )
{
++m_nCallCount;
}
{}
template <typename T>
- void operator()( T& p )
+ void operator()( T& )
{
++m_nCallCount;
}
struct find_functor
{
template <typename Item, typename T>
- void operator()( Item& item, T& val )
+ void operator()( Item& item, T& /*val*/ )
{
++item.nFindCount;
}
struct ensure_functor
{
template <typename Item>
- void operator()( bool bNew, Item& item, Item& val )
+ void operator()( bool bNew, Item& item, Item& /*val*/ )
{
if ( bNew )
++item.nEnsureNewCount;
struct find_functor
{
template <typename Item, typename T>
- void operator()( Item& i, T& val )
+ void operator()( Item& i, T& /*val*/ ) const
{
++i.nFindCount;
}
template <typename Item, typename T>
- void operator()( Item& i, T const& val )
+ void operator()( Item& i, T const& /*val*/ ) const
{
++i.nFindCount;
}
typedef typename std_allocator::value_type value_type;
// Allocation function
- pointer allocate( size_type _Count, const void* _Hint = nullptr )
+ pointer allocate( size_type _Count, const void* /*_Hint*/ = nullptr )
{
return reinterpret_cast<pointer>( s_MichaelHeap.alloc( sizeof(T) * _Count ));
}
// Deallocation function
- void deallocate( pointer _Ptr, size_type _Count )
+ void deallocate( pointer _Ptr, size_type /*_Count*/ )
{
s_MichaelHeap.free( _Ptr );
}
<< "\t\t m_nResizeCount: " << s.m_nResizeCount.get() << "\n"
;
}
- static inline ostream& operator <<( ostream& o, cds::intrusive::cuckoo::empty_striping_stat const& s )
+ static inline ostream& operator <<( ostream& o, cds::intrusive::cuckoo::empty_striping_stat const& /*s*/ )
{
return o;
}
#include <ostream>
namespace std {
- static inline ostream& operator <<( ostream& o, cds::intrusive::ellen_bintree::empty_stat const& s )
+ static inline ostream& operator <<( ostream& o, cds::intrusive::ellen_bintree::empty_stat const& /*s*/ )
{
return o;
}
#include <cds/container/mspriority_queue.h>
namespace std {
- static inline ostream& operator <<( ostream& o, cds::container::mspriority_queue::empty_stat const& s )
+ static inline ostream& operator <<( ostream& o, cds::container::mspriority_queue::empty_stat const& /*s*/ )
{
return o;
}
<< "\t Segment deleted: " << s.m_nSegmentDeleted.get() << "\n";
}
- static inline ostream& operator <<( ostream& o, cds::intrusive::segmented_queue::empty_stat const& s )
+ static inline ostream& operator <<( ostream& o, cds::intrusive::segmented_queue::empty_stat const& /*s*/ )
{
return o;
}
static inline ostream& operator <<( ostream& o, cds::intrusive::skip_list::stat<> const& s )
{
o << "Skip-list stat [cds::intrusive::skip_list::stat]\n"
- << "\t\t node height (add/delete):\n"
-;
+ << "\t\t node height (add/delete):\n";
+
for ( unsigned int i = 0; i < 9; ++i )
o << "\t\t\t[ " << (i + 1) << "]: " << s.m_nNodeHeightAdd[i].get() << '/' << s.m_nNodeHeightDel[i].get() << "\n";
for ( unsigned int i = 9; i < sizeof(s.m_nNodeHeightAdd) / sizeof(s.m_nNodeHeightAdd[0] ); ++i )
<< "\t\t m_nExtractWhileFind: " << s.m_nExtractWhileFind.get() << "\n";
}
- static inline ostream& operator <<( ostream& o, cds::intrusive::skip_list::empty_stat const& s )
+ static inline ostream& operator <<( ostream& o, cds::intrusive::skip_list::empty_stat const& /*s*/ )
{
return o;
}
<< "\t\t m_nBusyWaitBucketInit: " << s.m_nBusyWaitBucketInit.get() << "\n";
}
- static inline ostream& operator <<( ostream& o, cds::intrusive::split_list::empty_stat const& s )
+ static inline ostream& operator <<( ostream& o, cds::intrusive::split_list::empty_stat const& /*s*/ )
{
return o;
}