Lines Matching refs:b

166     static void add_to_bucket( bucket* b, node_base* n ) {  in add_to_bucket()  argument
167 __TBB_ASSERT(!rehash_required(b->node_list.load(std::memory_order_relaxed)), nullptr); in add_to_bucket()
168 n->next = b->node_list.load(std::memory_order_relaxed); in add_to_bucket()
169 b->node_list.store(n, std::memory_order_relaxed); // its under lock and flag is set in add_to_bucket()
288 segment_index_type insert_new_node( bucket *b, node_base *n, hashcode_type mask ) { in insert_new_node() argument
290 add_to_bucket( b, n ); in insert_new_node()
469 hash_map_iterator( const Container &map, std::size_t index, const bucket *b, node_base *n ) : in hash_map_iterator() argument
470 my_map(&map), my_index(index), my_bucket(b), my_node(static_cast<node*>(n)) in hash_map_iterator()
472 if( b && !map_base::is_valid(n) ) in hash_map_iterator()
559 auto b = my_begin.my_map->get_bucket(m); in set_midpoint() local
560 my_midpoint = Iterator(*my_begin.my_map,m,b,b->node_list.load(std::memory_order_relaxed)); in set_midpoint()
697 node *search_bucket( const K &key, bucket *b ) const { in __TBB_requires()
698 node *n = static_cast<node*>( b->node_list.load(std::memory_order_relaxed) ); in __TBB_requires()
965 hashcode_type b = (mask+1)>>1; // size or first index of the last segment in __TBB_requires() local
966 __TBB_ASSERT((b&(b-1))==0, nullptr); // zero or power of 2 in __TBB_requires()
967 bucket *bp = this->get_bucket( b ); // only the last segment should be scanned for rehashing in __TBB_requires()
968 for(; b <= mask; b++, bp++ ) { in __TBB_requires()
973 hashcode_type h = b; bucket *b_old = bp; in __TBB_requires()
1287 bucket_accessor b( this, h & m ); in __TBB_requires()
1289 n = search_bucket( key, b() ); in __TBB_requires()
1296 while ( !b.is_writer() && !b.upgrade_to_writer() ) { // TODO: improved insertion in __TBB_requires()
1298 n = search_bucket(key, b()); in __TBB_requires()
1300 if (!b.downgrade_to_reader()) { in __TBB_requires()
1303 n = search_bucket(key, b()); in __TBB_requires()
1317 grow_segment = this->insert_new_node( b(), n = tmp_n, m ); in __TBB_requires()
1338 b.release(); in __TBB_requires()
1388 bucket_accessor b( this, hash & mask, /*writer=*/true ); in __TBB_requires()
1390 node_base* curr = b()->node_list.load(std::memory_order_relaxed); in __TBB_requires()
1406 b()->node_list.store(curr->next, std::memory_order_relaxed); in __TBB_requires()
1431 bucket_accessor b( this, hash & mask ); in __TBB_requires()
1434 erase_node = b()->node_list.load(std::memory_order_relaxed); in __TBB_requires()
1444 } else if (!b.is_writer() && !b.upgrade_to_writer()) { in __TBB_requires()
1452 b()->node_list.store(erase_node->next, std::memory_order_relaxed); in __TBB_requires()
1473 bucket *b = this->get_bucket( h ); in __TBB_requires() local
1474 while (rehash_required(b->node_list.load(std::memory_order_relaxed))) { in __TBB_requires()
1476 b = this->get_bucket( h &= m ); in __TBB_requires()
1478 node *n = search_bucket( key, b ); in __TBB_requires()
1481 iterator lower(*this, h, b, n), upper(lower); in __TBB_requires()
1516 bucket *b = this->get_bucket( h & m ); in __TBB_requires() local
1517 …__TBB_ASSERT(!rehash_required(b->node_list.load(std::memory_order_relaxed)), "Invalid bucket in de… in __TBB_requires()
1519 this->add_to_bucket( b, node_ptr ); in __TBB_requires()
1579 bucket *b = this->get_bucket( h & m ); in __TBB_requires() local
1581 if (rehash_required(b->node_list.load(std::memory_order_acquire))) in __TBB_requires()
1584 if( lock.try_acquire( b->mutex, /*write=*/true ) ) { in __TBB_requires()
1585 if (rehash_required(b->node_list.load(std::memory_order_relaxed))) in __TBB_requires()
1586 … const_cast<concurrent_hash_map*>(this)->rehash_bucket( b, h & m ); //recursive rehashing in __TBB_requires()
1588 else lock.acquire( b->mutex, /*write=*/false ); in __TBB_requires()
1589 __TBB_ASSERT(!rehash_required(b->node_list.load(std::memory_order_relaxed)), nullptr); in __TBB_requires()
1591 n = search_bucket( key, b ); in __TBB_requires()
1632 …rent_hash_map<Key, T, HashCompare, A1> &a, const concurrent_hash_map<Key, T, HashCompare, A2> &b) {
1633 if(a.size() != b.size()) return false;
1635 typename concurrent_hash_map<Key, T, HashCompare, A2>::const_iterator j, j_end(b.end());
1637 j = b.equal_range(i->first).first;
1645 …urrent_hash_map<Key, T, HashCompare, A1> &a, const concurrent_hash_map<Key, T, HashCompare, A2> &b)
1646 { return !(a == b); }
1650 …wap(concurrent_hash_map<Key, T, HashCompare, A> &a, concurrent_hash_map<Key, T, HashCompare, A> &b) in swap() argument
1651 { a.swap( b ); } in swap()