From aa9a9b433704a5db08b40028bff4ae40ad3c4962 Mon Sep 17 00:00:00 2001 From: khizmax Date: Thu, 24 Dec 2015 15:24:22 +0300 Subject: [PATCH] Text formatting, docfix --- cds/algo/split_bitstring.h | 36 +++++++++++----------- cds/container/bronson_avltree_map_rcu.h | 2 +- cds/container/feldman_hashmap_rcu.h | 2 +- cds/container/feldman_hashset_rcu.h | 2 +- cds/container/lazy_kvlist_nogc.h | 3 +- cds/container/lazy_list_nogc.h | 3 +- cds/container/michael_kvlist_nogc.h | 6 ++-- cds/container/michael_list_nogc.h | 3 +- cds/container/michael_map_nogc.h | 3 +- cds/container/michael_set.h | 3 +- cds/container/michael_set_nogc.h | 3 +- cds/container/michael_set_rcu.h | 3 +- cds/container/skip_list_map_nogc.h | 3 +- cds/container/split_list_map_nogc.h | 3 +- cds/container/split_list_set_nogc.h | 12 +++++--- cds/container/striped_set.h | 9 ++++-- cds/container/striped_set/adapter.h | 2 +- cds/container/vyukov_mpmc_cycle_queue.h | 9 ++++-- cds/gc/details/dhp.h | 6 ++-- cds/intrusive/basket_queue.h | 6 ++-- cds/intrusive/feldman_hashset_rcu.h | 5 +-- cds/intrusive/michael_set.h | 3 +- cds/intrusive/michael_set_nogc.h | 3 +- cds/intrusive/michael_set_rcu.h | 3 +- cds/urcu/details/gpt.h | 6 ++-- tests/data/test-debug.conf | 30 ++++++++++++------ tests/data/test-express.conf | 30 ++++++++++++------ tests/data/test.conf | 30 ++++++++++++------ tests/unit/map2/map_type_cuckoo.h | 3 +- tests/unit/queue/bounded_queue_fulness.cpp | 3 +- tests/unit/set2/set_defs.h | 6 ++-- tests/unit/set2/set_type_cuckoo.h | 3 +- 32 files changed, 155 insertions(+), 89 deletions(-) diff --git a/cds/algo/split_bitstring.h b/cds/algo/split_bitstring.h index 82cf1242..0c9049e0 100644 --- a/cds/algo/split_bitstring.h +++ b/cds/algo/split_bitstring.h @@ -14,7 +14,7 @@ namespace cds { namespace algo { and keeps the position inside bit-string for the next call. The splitter stores a const reference to bit-string, not a copy. - The maximum count of bits that can be cut for single call is sizeof(UInt) * 8 + The maximum count of bits that can be cut in a single call is sizeof(UInt) * 8 */ template class split_bitstring @@ -34,7 +34,7 @@ namespace cds { namespace algo { /// Initializises the splitter with reference to \p h and zero start bit offset explicit split_bitstring( bitstring const& h ) : m_ptr(reinterpret_cast( &h )) - , m_pos(0) + , m_offset(0) , m_first( m_ptr ) # ifdef _DEBUG , m_last( m_ptr + c_nHashSize ) @@ -44,7 +44,7 @@ namespace cds { namespace algo { /// Initializises the splitter with reference to \p h and start bit offset \p nBitOffset split_bitstring( bitstring const& h, size_t nBitOffset ) : m_ptr( reinterpret_cast( &h ) + nBitOffset / c_nBitPerInt ) - , m_pos( nBitOffset ) + , m_offset( nBitOffset ) , m_first( reinterpret_cast(&h)) # ifdef _DEBUG , m_last( m_first + c_nHashSize ) @@ -61,7 +61,7 @@ namespace cds { namespace algo { /// Returns \p true if end-of-stream encountered bool eos() const { - return m_pos >= c_nBitPerHash; + return m_offset >= c_nBitPerHash; } /// Cuts next \p nBits from bit-string @@ -75,14 +75,14 @@ namespace cds { namespace algo { { assert( !eos() ); assert( nBits <= c_nBitPerInt ); - assert( m_pos + nBits <= c_nBitPerHash ); + assert( m_offset + nBits <= c_nBitPerHash ); # ifdef _DEBUG assert( m_ptr < m_last ); # endif uint_type result; - uint_type const nRest = c_nBitPerInt - m_pos % c_nBitPerInt; - m_pos += nBits; + uint_type const nRest = c_nBitPerInt - m_offset % c_nBitPerInt; + m_offset += nBits; if ( nBits < nRest ) { result = *m_ptr << ( nRest - nBits ); result = result >> ( c_nBitPerInt - nBits ); @@ -90,7 +90,7 @@ namespace cds { namespace algo { else if ( nBits == nRest ) { result = *m_ptr >> ( c_nBitPerInt - nRest ); ++m_ptr; - assert( m_pos % c_nBitPerInt == 0 ); + assert( m_offset % c_nBitPerInt == 0 ); } else { uint_type const lsb = *m_ptr >> ( c_nBitPerInt - nRest ); @@ -102,7 +102,7 @@ namespace cds { namespace algo { result = (result << nRest) + lsb; } - assert( m_pos <= c_nBitPerHash ); + assert( m_offset <= c_nBitPerHash ); # ifdef _DEBUG assert( m_ptr <= m_last ); # endif @@ -122,8 +122,8 @@ namespace cds { namespace algo { assert( nBits <= sizeof(uint_type) * c_nBitPerByte ); - if ( m_pos + nBits > c_nBitPerHash ) - nBits = c_nBitPerHash - m_pos; + if ( m_offset + nBits > c_nBitPerHash ) + nBits = c_nBitPerHash - m_offset; return nBits ? cut( nBits ) : 0; } @@ -131,10 +131,10 @@ namespace cds { namespace algo { void reset() CDS_NOEXCEPT { m_ptr = m_first; - m_pos = 0; + m_offset = 0; } - // Returns pointer to source bitstring + /// Returns pointer to source bitstring bitstring const * source() const { return reinterpret_cast( m_first ); @@ -143,16 +143,16 @@ namespace cds { namespace algo { /// Returns current bit offset from beginning of bit-string size_t bit_offset() const { - return m_pos; + return m_offset; } private: //@cond - uint_type const* m_ptr; ///< current position in the hash - size_t m_pos; ///< current position in bits - uint_type const* m_first; ///< first position + uint_type const* m_ptr; ///< current position in the hash + size_t m_offset; ///< current bit offset in bit-string + uint_type const* m_first; ///< first position # ifdef _DEBUG - uint_type const* m_last; ///< last position + uint_type const* m_last; ///< last position # endif //@endcond }; diff --git a/cds/container/bronson_avltree_map_rcu.h b/cds/container/bronson_avltree_map_rcu.h index 51a94da3..ae2d794f 100644 --- a/cds/container/bronson_avltree_map_rcu.h +++ b/cds/container/bronson_avltree_map_rcu.h @@ -281,7 +281,7 @@ namespace cds { namespace container { The operation performs inserting or changing data with lock-free manner. If the \p key not found in the map, then the new item created from \p key - will be inserted into the map iff \p bAllowInsert is \p true + will be inserted into the map iff \p bAllowInsert is \p true (note that in this case the \ref key_type should be constructible from type \p K). Otherwise, the functor \p func is called with item found. The functor \p Func signature is: diff --git a/cds/container/feldman_hashmap_rcu.h b/cds/container/feldman_hashmap_rcu.h index ebbd50e5..7a11254d 100644 --- a/cds/container/feldman_hashmap_rcu.h +++ b/cds/container/feldman_hashmap_rcu.h @@ -680,7 +680,7 @@ namespace cds { namespace container { i->second.payload++; } } // at this point RCU lock is released - /endcode + \endcode Each iterator object supports the common interface: - dereference operators: diff --git a/cds/container/feldman_hashset_rcu.h b/cds/container/feldman_hashset_rcu.h index d6b3bfa9..5563a9da 100644 --- a/cds/container/feldman_hashset_rcu.h +++ b/cds/container/feldman_hashset_rcu.h @@ -448,7 +448,7 @@ namespace cds { namespace container { i->payload++; } } // at this point RCU lock is released - /endcode + \endcode Each iterator object supports the common interface: - dereference operators: diff --git a/cds/container/lazy_kvlist_nogc.h b/cds/container/lazy_kvlist_nogc.h index 1cf0729a..48bb3b75 100644 --- a/cds/container/lazy_kvlist_nogc.h +++ b/cds/container/lazy_kvlist_nogc.h @@ -377,7 +377,8 @@ namespace cds { namespace container { /// Updates the item /** - If \p key is not in the list and \p bAllowInsert is \p true, + If \p key is not in the list and \p bAllowInsert is \p true, + the function inserts a new item. Otherwise, the function returns an iterator pointing to the item found. diff --git a/cds/container/lazy_list_nogc.h b/cds/container/lazy_list_nogc.h index c4d8a2ea..605b344a 100644 --- a/cds/container/lazy_list_nogc.h +++ b/cds/container/lazy_list_nogc.h @@ -298,7 +298,8 @@ namespace cds { namespace container { /// Updates the item /** - If \p key is not in the list and \p bAllowInsert is \p true, + If \p key is not in the list and \p bAllowInsert is \p true, + the function inserts a new item. Otherwise, the function returns an iterator pointing to the item found. diff --git a/cds/container/michael_kvlist_nogc.h b/cds/container/michael_kvlist_nogc.h index ad0a7c4d..23c39c66 100644 --- a/cds/container/michael_kvlist_nogc.h +++ b/cds/container/michael_kvlist_nogc.h @@ -393,7 +393,8 @@ namespace cds { namespace container { /// Updates the item /** - If \p key is not in the list and \p bAllowInsert is \p true, + If \p key is not in the list and \p bAllowInsert is \p true, + the function inserts a new item. Otherwise, the function returns an iterator pointing to the item found. @@ -532,7 +533,8 @@ namespace cds { namespace container { scoped_node_ptr pNode( alloc_node( key )); node_type * pItemFound = nullptr; - std::pair ret = base_class::update_at( refHead, *pNode, + std::pair ret = base_class::update_at( refHead, *pNode, + [&pItemFound](bool, node_type& item, node_type&){ pItemFound = &item; }, bAllowInsert ); diff --git a/cds/container/michael_list_nogc.h b/cds/container/michael_list_nogc.h index 3c41b4de..43ea8076 100644 --- a/cds/container/michael_list_nogc.h +++ b/cds/container/michael_list_nogc.h @@ -294,7 +294,8 @@ namespace cds { namespace container { /// Updates the item /** - If \p key is not in the list and \p bAllowInsert is \p true, + If \p key is not in the list and \p bAllowInsert is \p true, + the function inserts a new item. Otherwise, the function returns an iterator pointing to the item found. diff --git a/cds/container/michael_map_nogc.h b/cds/container/michael_map_nogc.h index 68d0c575..fc4f69b8 100644 --- a/cds/container/michael_map_nogc.h +++ b/cds/container/michael_map_nogc.h @@ -397,7 +397,8 @@ namespace cds { namespace container { Otherwise, the function returns an iterator pointing to the item found. Returns std::pair where \p first is an iterator pointing to - item found or inserted (if inserting is not allowed and \p key is not found, the iterator will be \p end()), + item found or inserted (if inserting is not allowed and \p key is not found, the iterator will be \p end()), + \p second is true if new item has been added or \p false if the item already is in the map. diff --git a/cds/container/michael_set.h b/cds/container/michael_set.h index fcfc917c..03948f60 100644 --- a/cds/container/michael_set.h +++ b/cds/container/michael_set.h @@ -614,7 +614,8 @@ namespace cds { namespace container { //@endcond /// Checks whether the set contains \p key - /** + /** + The function searches the item with key equal to \p key and returns \p true if the key is found, and \p false otherwise. diff --git a/cds/container/michael_set_nogc.h b/cds/container/michael_set_nogc.h index e66ddb69..878534b7 100644 --- a/cds/container/michael_set_nogc.h +++ b/cds/container/michael_set_nogc.h @@ -227,7 +227,8 @@ namespace cds { namespace container { If the item \p val not found in the set, then \p val is inserted iff \p bAllowInsert is \p true. Returns std::pair where \p first is an iterator pointing to - item found or inserted, or \p end() if \p bAllowInsert is \p false, + item found or inserted, or \p end() if \p bAllowInsert is \p false, + \p second is true if new item has been added or \p false if the item is already in the set. @warning For \ref cds_intrusive_MichaelList_hp "MichaelList" as the bucket see \ref cds_intrusive_item_creating "insert item troubleshooting". diff --git a/cds/container/michael_set_rcu.h b/cds/container/michael_set_rcu.h index a2a3180d..42dfb181 100644 --- a/cds/container/michael_set_rcu.h +++ b/cds/container/michael_set_rcu.h @@ -614,7 +614,8 @@ namespace cds { namespace container { //@endcond /// Checks whether the set contains \p key - /** + /** + The function searches the item with key equal to \p key and returns \p true if the key is found, and \p false otherwise. diff --git a/cds/container/skip_list_map_nogc.h b/cds/container/skip_list_map_nogc.h index 33a41e4c..fe68e64b 100644 --- a/cds/container/skip_list_map_nogc.h +++ b/cds/container/skip_list_map_nogc.h @@ -266,7 +266,8 @@ namespace cds { namespace container { { return base_class::contains( key ); } - //@cond + //@cond + template CDS_DEPRECATED("deprecated, use contains()") iterator find( K const& key ) diff --git a/cds/container/split_list_map_nogc.h b/cds/container/split_list_map_nogc.h index c6708856..509bd05c 100644 --- a/cds/container/split_list_map_nogc.h +++ b/cds/container/split_list_map_nogc.h @@ -229,7 +229,8 @@ namespace cds { namespace container { Otherwise, the function returns an iterator pointing to the item found. Returns std::pair where \p first is an iterator pointing to - item found or inserted (if inserting is not allowed and \p key is not found, the iterator will be \p end()), + item found or inserted (if inserting is not allowed and \p key is not found, the iterator will be \p end()), + \p second is true if new item has been added or \p false if the item already is in the map. */ diff --git a/cds/container/split_list_set_nogc.h b/cds/container/split_list_set_nogc.h index f84cc019..fc9c7723 100644 --- a/cds/container/split_list_set_nogc.h +++ b/cds/container/split_list_set_nogc.h @@ -286,13 +286,16 @@ namespace cds { namespace container { Otherwise, the function returns an iterator pointing to the item found. Returns std::pair where \p first is an iterator pointing to - item found or inserted (if inserting is not allowed and \p key is not found, the iterator will be \p end()), + item found or inserted (if inserting is not allowed and \p key is not found, the iterator will be \p end()), + \p second is true if new item has been added or \p false if the item already is in the set. - @warning If the set is based on \ref cds_nonintrusive_MichaelList_nogc "MichaelList", + @warning If the set is based on \ref cds_nonintrusive_MichaelList_nogc "MichaelList", + see \ref cds_intrusive_item_creating "insert item troubleshooting". - \ref cds_nonintrusive_LazyList_nogc "LazyList" as the base provides exclusive access to inserted item + \ref cds_nonintrusive_LazyList_nogc "LazyList" as the base provides exclusive access to inserted item + and does not require any node-level synchronization. */ template @@ -300,7 +303,8 @@ namespace cds { namespace container { { scoped_node_ptr pNode( alloc_node( key )); - std::pair ret = base_class::update_( *pNode, + std::pair ret = base_class::update_( *pNode, + [](bool /*bNew*/, node_type& /*item*/, node_type& /*val*/){}, bAllowInsert ); if ( ret.first != base_class::end() && ret.second ) { diff --git a/cds/container/striped_set.h b/cds/container/striped_set.h index 50940753..cee434bc 100644 --- a/cds/container/striped_set.h +++ b/cds/container/striped_set.h @@ -498,7 +498,8 @@ namespace cds { namespace container { /// Ctor with initial capacity specified StripedSet( size_t nCapacity ///< Initial size of bucket table and lock array. Must be power of two, the minimum is 16. - ) + ) + : base_class( nCapacity ) {} @@ -509,7 +510,8 @@ namespace cds { namespace container { StripedSet( size_t nCapacity ///< Initial size of bucket table and lock array. Must be power of two, the minimum is 16. ,resizing_policy const& resizingPolicy ///< Resizing policy - ) + ) + : base_class( nCapacity, resizingPolicy ) {} @@ -521,7 +523,8 @@ namespace cds { namespace container { StripedSet( size_t nCapacity ///< Initial size of bucket table and lock array. Must be power of two, the minimum is 16. ,resizing_policy&& resizingPolicy ///< Resizing policy - ) + ) + : base_class( nCapacity, std::forward(resizingPolicy) ) {} diff --git a/cds/container/striped_set/adapter.h b/cds/container/striped_set/adapter.h index c0f13063..22fbe170 100644 --- a/cds/container/striped_set/adapter.h +++ b/cds/container/striped_set/adapter.h @@ -203,7 +203,7 @@ namespace cds { namespace container { class RecursiveLock = std::recursive_mutex, typename BackOff = cds::backoff::yield, class Alloc = CDS_DEFAULT_ALLOCATOR - > + > using refinable = cds::intrusive::striped_set::refinable; //@cond diff --git a/cds/container/vyukov_mpmc_cycle_queue.h b/cds/container/vyukov_mpmc_cycle_queue.h index 5f57d115..e40a26bc 100644 --- a/cds/container/vyukov_mpmc_cycle_queue.h +++ b/cds/container/vyukov_mpmc_cycle_queue.h @@ -55,7 +55,8 @@ namespace cds { namespace container { /// Single-consumer version /** - For single-consumer version of algorithm some additional functions + For single-consumer version of algorithm some additional functions + (\p front(), \p pop_front()) is available. Default is \p false @@ -459,7 +460,8 @@ namespace cds { namespace container { }; //@cond - namespace vyukov_queue { + namespace vyukov_queue { + template struct single_consumer_traits : public Traits { @@ -468,7 +470,8 @@ namespace cds { namespace container { } // namespace vyukov_queue //@endcond - /// Vyukov's queue multiple producer - single consumer version + /// Vyukov's queue multiple producer - single consumer version + template using VyukovMPSCCycleQueue = VyukovMPMCCycleQueue< T, vyukov_queue::single_consumer_traits >; diff --git a/cds/gc/details/dhp.h b/cds/gc/details/dhp.h index 017d8d3d..e1816823 100644 --- a/cds/gc/details/dhp.h +++ b/cds/gc/details/dhp.h @@ -394,7 +394,8 @@ namespace cds { namespace gc { , m_pEpochFree( epoch_array_alloc().NewArray( m_nEpochBitmask + 1)) , m_pGlobalFreeHead( nullptr ) { - + + for (unsigned int i = 0; i <= m_nEpochBitmask; ++i ) m_pEpochFree[i].store( nullptr, atomics::memory_order_relaxed ); @@ -764,7 +765,8 @@ namespace cds { namespace gc { By perforce the local thread's guard pool is grown automatically from common pool. When the thread terminated its guard pool is backed to common GC's pool. - \p nEpochCount: internally, DHP memory manager uses epoch-based schema to solve - ABA problem for internal data. \p nEpochCount specifies the epoch count, + ABA problem for internal data. \p nEpochCount specifies the epoch count, + i.e. the count of simultaneously working threads that remove the elements of DHP-based concurrent data structure. Default value is 8. diff --git a/cds/intrusive/basket_queue.h b/cds/intrusive/basket_queue.h index 5a0658fa..5ff4117e 100644 --- a/cds/intrusive/basket_queue.h +++ b/cds/intrusive/basket_queue.h @@ -673,8 +673,10 @@ namespace cds { namespace intrusive { typename gc::template GuardArray<2> g; g.assign( 0, node_traits::to_value_ptr( pNext.ptr())); - if ( m_pTail.load( memory_model::memory_order_acquire ) != t - || t->m_pNext.load( memory_model::memory_order_relaxed ) != pNext ) + if ( m_pTail.load( memory_model::memory_order_acquire ) != t + + || t->m_pNext.load( memory_model::memory_order_relaxed ) != pNext ) + { m_Stat.onEnqueueRace(); bkoff(); diff --git a/cds/intrusive/feldman_hashset_rcu.h b/cds/intrusive/feldman_hashset_rcu.h index 0f3bc27f..4495b8ab 100644 --- a/cds/intrusive/feldman_hashset_rcu.h +++ b/cds/intrusive/feldman_hashset_rcu.h @@ -45,7 +45,8 @@ namespace cds { namespace intrusive { @note Before including you should include appropriate RCU header file, see \ref cds_urcu_gc "RCU type" for list of existing RCU class and corresponding header files. - The set supports @ref cds_intrusive_FeldmanHashSet_rcu_iterators "bidirectional thread-safe iterators" + The set supports @ref cds_intrusive_FeldmanHashSet_rcu_iterators "bidirectional thread-safe iterators" + with some restrictions. */ template < @@ -898,7 +899,7 @@ namespace cds { namespace intrusive { i->payload++; } } // at this point RCU lock is released - /endcode + \endcode Each iterator object supports the common interface: - dereference operators: diff --git a/cds/intrusive/michael_set.h b/cds/intrusive/michael_set.h index 803bcaf9..ac11cf2b 100644 --- a/cds/intrusive/michael_set.h +++ b/cds/intrusive/michael_set.h @@ -669,7 +669,8 @@ namespace cds { namespace intrusive { //@endcond /// Checks whether the set contains \p key - /** + /** + The function searches the item with key equal to \p key and returns \p true if the key is found, and \p false otherwise. diff --git a/cds/intrusive/michael_set_nogc.h b/cds/intrusive/michael_set_nogc.h index 2bb45837..0710b1d0 100644 --- a/cds/intrusive/michael_set_nogc.h +++ b/cds/intrusive/michael_set_nogc.h @@ -225,7 +225,8 @@ namespace cds { namespace intrusive { //@endcond /// Checks whether the set contains \p key - /** + /** + The function searches the item with key equal to \p key and returns the pointer to an element found or \p nullptr. diff --git a/cds/intrusive/michael_set_rcu.h b/cds/intrusive/michael_set_rcu.h index 3331795b..177cfb62 100644 --- a/cds/intrusive/michael_set_rcu.h +++ b/cds/intrusive/michael_set_rcu.h @@ -468,7 +468,8 @@ namespace cds { namespace intrusive { } /// Checks whether the set contains \p key - /** + /** + The function searches the item with key equal to \p key and returns \p true if the key is found, and \p false otherwise. diff --git a/cds/urcu/details/gpt.h b/cds/urcu/details/gpt.h index 519a704f..62d89920 100644 --- a/cds/urcu/details/gpt.h +++ b/cds/urcu/details/gpt.h @@ -27,7 +27,8 @@ namespace cds { namespace urcu { There is a wrapper \ref cds_urcu_general_threaded_gc "gc" for \p %general_threaded class that provides unified RCU interface. You should use this wrapper class instead \p %general_threaded - The \p Buffer contains items of \ref cds_urcu_retired_ptr "epoch_retired_ptr" type + The \p Buffer contains items of \ref cds_urcu_retired_ptr "epoch_retired_ptr" type + and it should support a multiple producer/single consumer queue with the following interface: - bool push( epoch_retired_ptr& p ) - places the retired pointer \p p into queue. If the function returns \p false it means that the buffer is full and RCU synchronization cycle must be processed. @@ -38,7 +39,8 @@ namespace cds { namespace urcu { The buffer is considered as full if \p push() returns \p false or the buffer size reaches the RCU threshold. Template arguments: - - \p Buffer - MPSC (muliple producer/single consumer) buffer type with FIFO semantics. + - \p Buffer - MPSC (muliple producer/single consumer) buffer type with FIFO semantics. + Default is \p cds::container::VyukovMPSCCycleQueue. The buffer contains the objects of \ref epoch_retired_ptr type that contains additional \p m_nEpoch field. This field specifies an epoch when the object has been placed into the buffer. The \p %general_threaded object has a global epoch counter diff --git a/tests/data/test-debug.conf b/tests/data/test-debug.conf index 6b9e4444..7e8ca1b3 100644 --- a/tests/data/test-debug.conf +++ b/tests/data/test-debug.conf @@ -131,7 +131,8 @@ PrintGCStateFlag=1 CuckooInitialSize=256 CuckooProbesetSize=8 # 0 - use default -CuckooProbesetThreshold=0 +CuckooProbesetThreshold=0 + # *** FeldmanHashMap properties FeldmanMapHeadBits=8 FeldmanMapArrayBits=4 @@ -147,7 +148,8 @@ PrintGCStateFlag=1 CuckooInitialSize=256 CuckooProbesetSize=8 # 0 - use default -CuckooProbesetThreshold=0 +CuckooProbesetThreshold=0 + # *** FeldmanHashMap properties FeldmanMapHeadBits=8 FeldmanMapArrayBits=4 @@ -163,7 +165,8 @@ PrintGCStateFlag=1 CuckooInitialSize=256 CuckooProbesetSize=8 # 0 - use default -CuckooProbesetThreshold=0 +CuckooProbesetThreshold=0 + # *** FeldmanHashMap properties FeldmanMapHeadBits=8 FeldmanMapArrayBits=4 @@ -180,7 +183,8 @@ PrintGCStateFlag=1 CuckooInitialSize=256 CuckooProbesetSize=8 # 0 - use default -CuckooProbesetThreshold=0 +CuckooProbesetThreshold=0 + # *** FeldmanHashMap properties FeldmanMapHeadBits=8 FeldmanMapArrayBits=4 @@ -196,7 +200,8 @@ PrintGCStateFlag=1 CuckooInitialSize=256 CuckooProbesetSize=8 # 0 - use default -CuckooProbesetThreshold=0 +CuckooProbesetThreshold=0 + # *** FeldmanHashMap properties FeldmanMapHeadBits=8 FeldmanMapArrayBits=4 @@ -212,7 +217,8 @@ PrintGCStateFlag=1 CuckooInitialSize=256 CuckooProbesetSize=8 # 0 - use default -CuckooProbesetThreshold=0 +CuckooProbesetThreshold=0 + # *** FeldmanHashMap properties FeldmanMapHeadBits=8 FeldmanMapArrayBits=4 @@ -228,7 +234,8 @@ PrintGCStateFlag=1 CuckooInitialSize=256 CuckooProbesetSize=8 # 0 - use default -CuckooProbesetThreshold=0 +CuckooProbesetThreshold=0 + # *** FeldmanHashMap properties FeldmanMapHeadBits=8 FeldmanMapArrayBits=4 @@ -242,7 +249,8 @@ PrintGCStateFlag=1 CuckooInitialSize=256 CuckooProbesetSize=8 # 0 - use default -CuckooProbesetThreshold=0 +CuckooProbesetThreshold=0 + # *** FeldmanHashMap properties FeldmanMapHeadBits=8 FeldmanMapArrayBits=4 @@ -259,7 +267,8 @@ PrintGCStateFlag=1 CuckooInitialSize=256 CuckooProbesetSize=8 # 0 - use default -CuckooProbesetThreshold=0 +CuckooProbesetThreshold=0 + # *** FeldmanHashMap properties FeldmanMapHeadBits=8 FeldmanMapArrayBits=4 @@ -275,7 +284,8 @@ PrintGCStateFlag=1 CuckooInitialSize=256 CuckooProbesetSize=8 # 0 - use default -CuckooProbesetThreshold=0 +CuckooProbesetThreshold=0 + # *** FeldmanHashMap properties FeldmanMapHeadBits=8 FeldmanMapArrayBits=4 diff --git a/tests/data/test-express.conf b/tests/data/test-express.conf index 6f9b2f55..3569b3e0 100644 --- a/tests/data/test-express.conf +++ b/tests/data/test-express.conf @@ -125,7 +125,8 @@ PrintGCStateFlag=1 CuckooInitialSize=1024 CuckooProbesetSize=16 # 0 - use default -CuckooProbesetThreshold=0 +CuckooProbesetThreshold=0 + # *** FeldmanHashMap properties FeldmanMapHeadBits=8 FeldmanMapArrayBits=4 @@ -141,7 +142,8 @@ PrintGCStateFlag=1 CuckooInitialSize=1024 CuckooProbesetSize=16 # 0 - use default -CuckooProbesetThreshold=0 +CuckooProbesetThreshold=0 + # *** FeldmanHashMap properties FeldmanMapHeadBits=8 FeldmanMapArrayBits=4 @@ -157,7 +159,8 @@ PrintGCStateFlag=1 CuckooInitialSize=1024 CuckooProbesetSize=16 # 0 - use default -CuckooProbesetThreshold=0 +CuckooProbesetThreshold=0 + # *** FeldmanHashMap properties FeldmanMapHeadBits=8 FeldmanMapArrayBits=4 @@ -174,7 +177,8 @@ PrintGCStateFlag=1 CuckooInitialSize=1024 CuckooProbesetSize=16 # 0 - use default -CuckooProbesetThreshold=0 +CuckooProbesetThreshold=0 + # *** FeldmanHashMap properties FeldmanMapHeadBits=8 FeldmanMapArrayBits=4 @@ -190,7 +194,8 @@ PrintGCStateFlag=1 CuckooInitialSize=1024 CuckooProbesetSize=16 # 0 - use default -CuckooProbesetThreshold=0 +CuckooProbesetThreshold=0 + # *** FeldmanHashMap properties FeldmanMapHeadBits=8 FeldmanMapArrayBits=4 @@ -206,7 +211,8 @@ PrintGCStateFlag=1 CuckooInitialSize=1024 CuckooProbesetSize=16 # 0 - use default -CuckooProbesetThreshold=0 +CuckooProbesetThreshold=0 + # *** FeldmanHashMap properties FeldmanMapHeadBits=8 FeldmanMapArrayBits=4 @@ -222,7 +228,8 @@ PrintGCStateFlag=1 CuckooInitialSize=1024 CuckooProbesetSize=16 # 0 - use default -CuckooProbesetThreshold=0 +CuckooProbesetThreshold=0 + # *** FeldmanHashMap properties FeldmanMapHeadBits=8 FeldmanMapArrayBits=4 @@ -236,7 +243,8 @@ PrintGCStateFlag=1 CuckooInitialSize=1024 CuckooProbesetSize=16 # 0 - use default -CuckooProbesetThreshold=0 +CuckooProbesetThreshold=0 + # *** FeldmanHashMap properties FeldmanMapHeadBits=8 FeldmanMapArrayBits=4 @@ -253,7 +261,8 @@ PrintGCStateFlag=1 CuckooInitialSize=1024 CuckooProbesetSize=16 # 0 - use default -CuckooProbesetThreshold=0 +CuckooProbesetThreshold=0 + # *** FeldmanHashMap properties FeldmanMapHeadBits=8 FeldmanMapArrayBits=4 @@ -269,7 +278,8 @@ PrintGCStateFlag=1 CuckooInitialSize=1024 CuckooProbesetSize=16 # 0 - use default -CuckooProbesetThreshold=0 +CuckooProbesetThreshold=0 + # *** FeldmanHashMap properties FeldmanMapHeadBits=8 FeldmanMapArrayBits=4 diff --git a/tests/data/test.conf b/tests/data/test.conf index 2d35bd01..702c6bf8 100644 --- a/tests/data/test.conf +++ b/tests/data/test.conf @@ -124,7 +124,8 @@ PrintGCStateFlag=1 CuckooInitialSize=1024 CuckooProbesetSize=16 # 0 - use default -CuckooProbesetThreshold=0 +CuckooProbesetThreshold=0 + # *** FeldmanHashMap properties FeldmanMapHeadBits=10 FeldmanMapArrayBits=4 @@ -140,7 +141,8 @@ PrintGCStateFlag=1 CuckooInitialSize=1024 CuckooProbesetSize=16 # 0 - use default -CuckooProbesetThreshold=0 +CuckooProbesetThreshold=0 + # *** FeldmanHashMap properties FeldmanMapHeadBits=10 FeldmanMapArrayBits=4 @@ -156,7 +158,8 @@ PrintGCStateFlag=1 CuckooInitialSize=1024 CuckooProbesetSize=16 # 0 - use default -CuckooProbesetThreshold=0 +CuckooProbesetThreshold=0 + # *** FeldmanHashMap properties FeldmanMapHeadBits=10 FeldmanMapArrayBits=4 @@ -173,7 +176,8 @@ PrintGCStateFlag=1 CuckooInitialSize=1024 CuckooProbesetSize=16 # 0 - use default -CuckooProbesetThreshold=0 +CuckooProbesetThreshold=0 + # *** FeldmanHashMap properties FeldmanMapHeadBits=10 FeldmanMapArrayBits=4 @@ -189,7 +193,8 @@ PrintGCStateFlag=1 CuckooInitialSize=1024 CuckooProbesetSize=16 # 0 - use default -CuckooProbesetThreshold=0 +CuckooProbesetThreshold=0 + # *** FeldmanHashMap properties FeldmanMapHeadBits=10 FeldmanMapArrayBits=4 @@ -205,7 +210,8 @@ PrintGCStateFlag=1 CuckooInitialSize=1024 CuckooProbesetSize=16 # 0 - use default -CuckooProbesetThreshold=0 +CuckooProbesetThreshold=0 + # *** FeldmanHashMap properties FeldmanMapHeadBits=10 FeldmanMapArrayBits=4 @@ -221,7 +227,8 @@ PrintGCStateFlag=1 CuckooInitialSize=1024 CuckooProbesetSize=16 # 0 - use default -CuckooProbesetThreshold=0 +CuckooProbesetThreshold=0 + # *** FeldmanHashMap properties FeldmanMapHeadBits=10 FeldmanMapArrayBits=4 @@ -235,7 +242,8 @@ PrintGCStateFlag=1 CuckooInitialSize=1024 CuckooProbesetSize=16 # 0 - use default -CuckooProbesetThreshold=0 +CuckooProbesetThreshold=0 + # *** FeldmanHashMap properties FeldmanMapHeadBits=10 FeldmanMapArrayBits=4 @@ -252,7 +260,8 @@ PrintGCStateFlag=1 CuckooInitialSize=1024 CuckooProbesetSize=16 # 0 - use default -CuckooProbesetThreshold=0 +CuckooProbesetThreshold=0 + # *** FeldmanHashMap properties FeldmanMapHeadBits=10 FeldmanMapArrayBits=4 @@ -269,7 +278,8 @@ PrintGCStateFlag=1 CuckooInitialSize=1024 CuckooProbesetSize=16 # 0 - use default -CuckooProbesetThreshold=0 +CuckooProbesetThreshold=0 + # *** FeldmanHashMap properties FeldmanMapHeadBits=10 FeldmanMapArrayBits=4 diff --git a/tests/unit/map2/map_type_cuckoo.h b/tests/unit/map2/map_type_cuckoo.h index 312c64f9..a1c3cbda 100644 --- a/tests/unit/map2/map_type_cuckoo.h +++ b/tests/unit/map2/map_type_cuckoo.h @@ -18,7 +18,8 @@ namespace map2 { public: template CuckooMap( Config const& cfg ) - : base_class( + : base_class( + cfg.c_nCuckooInitialSize, static_cast( cfg.c_nCuckooProbesetSize ), static_cast( cfg.c_nCuckooProbesetThreshold ) diff --git a/tests/unit/queue/bounded_queue_fulness.cpp b/tests/unit/queue/bounded_queue_fulness.cpp index 2d681f77..6f63dd5a 100644 --- a/tests/unit/queue/bounded_queue_fulness.cpp +++ b/tests/unit/queue/bounded_queue_fulness.cpp @@ -109,7 +109,8 @@ namespace queue { for ( size_t i = 0; i < nSize; ++i ) testQueue.push( i ); - CPPUNIT_MSG( " Thread count=" << s_nThreadCount << ", push/pop pairs=" << s_nPassCount + CPPUNIT_MSG( " Thread count=" << s_nThreadCount << ", push/pop pairs=" << s_nPassCount + << ", queue capacity=" << testQueue.capacity() << " ..."); pool.run(); diff --git a/tests/unit/set2/set_defs.h b/tests/unit/set2/set_defs.h index addee6e1..76d91d2b 100644 --- a/tests/unit/set2/set_defs.h +++ b/tests/unit/set2/set_defs.h @@ -720,7 +720,8 @@ CDSUNIT_TEST_FeldmanHashSet_stdhash_RCU_signal -// CityHash -only for 64bit +// CityHash -only for 64bit + #undef CDSUNIT_DECLARE_FeldmanHashSet_city #undef CDSUNIT_DECLARE_FeldmanHashSet_city_RCU_signal #undef CDSUNIT_TEST_FeldmanHashSet_city @@ -808,7 +809,8 @@ #endif // CDS_BUILD_BITS == 64 -// All +// All + #define CDSUNIT_DECLARE_FeldmanHashSet \ CDSUNIT_DECLARE_FeldmanHashSet_fixed \ CDSUNIT_DECLARE_FeldmanHashSet_stdhash \ diff --git a/tests/unit/set2/set_type_cuckoo.h b/tests/unit/set2/set_type_cuckoo.h index 31010b9a..bf7d2120 100644 --- a/tests/unit/set2/set_type_cuckoo.h +++ b/tests/unit/set2/set_type_cuckoo.h @@ -19,7 +19,8 @@ namespace set2 { public: template CuckooSet( Config const& cfg ) - : cuckoo_base_class( + : cuckoo_base_class( + cfg.c_nCuckooInitialSize, static_cast( cfg.c_nCuckooProbesetSize ), static_cast( cfg.c_nCuckooProbesetThreshold ) -- 2.34.1