FastLED 3.10.9
Loading...
Searching...
No Matches

◆ find_unoccupied_index_using_bitset()

template<typename Key, typename T, typename Hash = Hash<Key>, typename KeyEqual = EqualTo<Key>, int INLINED_COUNT = FASTLED_HASHMAP_INLINED_COUNT>
fl::size fl::unordered_map< Key, T, Hash, KeyEqual, INLINED_COUNT >::find_unoccupied_index_using_bitset ( const Key & key,
const fl::bitset< 1024 > & occupied_set ) const
inlineprivate

Definition at line 900 of file unordered_map.h.

901 {
902 const fl::size cap = _buckets.size();
903 const fl::size mask = cap - 1;
904 const fl::size h = _hash(key) & mask;
905
906 // Probe via the shared helper -- see find_slot() comment above.
907 for (fl::size i = 0; i < cap; ++i) {
909 if (!occupied_set.test(idx)) {
910 return idx;
911 }
912 }
913 return npos();
914 }
static fl::size npos() FL_NO_EXCEPT
fl::vector_inlined< Entry, INLINED_COUNT > _buckets
FL_NO_INLINE fl::size unordered_map_probe_idx(fl::size h, fl::size i, fl::size mask, fl::size cap) FL_NO_EXCEPT