[#CuckooCache-bit_packed_atomic_flags] = xref:CuckooCache.adoc[CuckooCache]::bit_packed_atomic_flags :relfileprefix: ../ :mrdocs: xref:CuckooCache/bit_packed_atomic_flags/2constructor-0e.adoc[`bit_packed_atomic_flags`] implements a container for garbage collection flags that is only thread unsafe on calls to setup. This class bit‐packs collection flags for memory efficiency. == Synopsis Declared in `<cuckoocache.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class bit_packed_atomic_flags; ---- == Description All operations are `std::memory_order_relaxed` so external mechanisms must ensure that writes and reads are properly synchronized. On setup(n), all bits up to `n` are marked as collected. Under the hood, because it is an 8‐bit type, it makes sense to use a multiple of 8 for setup, but it will be safe if that is not the case as well. == Member Functions [cols="1,4"] |=== | Name| Description | xref:CuckooCache/bit_packed_atomic_flags/2constructor-0e.adoc[`bit_packed_atomic_flags`] [.small]#[constructor]# | Constructors | xref:CuckooCache/bit_packed_atomic_flags/bit_is_set.adoc[`bit_is_set`] | bit_is_set queries the table for discardability at `s`. | xref:CuckooCache/bit_packed_atomic_flags/bit_set.adoc[`bit_set`] | bit_set sets an entry as discardable. | xref:CuckooCache/bit_packed_atomic_flags/bit_unset.adoc[`bit_unset`] | bit_unset marks an entry as something that should not be overwritten. | xref:CuckooCache/bit_packed_atomic_flags/setup.adoc[`setup`] | setup marks all entries and ensures that bit_packed_atomic_flags can store at least `b` entries. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#