import Bitfield from "bitfield"; const field = new Bitfield(256); // Create a bitfield with 256 bits. field.set(128); // Set the 128th bit. field.set(128, true); // Same as above. field.get(128); // `true` field
| true -> t lor axis_bit axis | false -> t land lnot (axis_bit axis)let singleton axis = add empty axis let empty = 0let remove t axis = Axis_collection.set ~axis t false let[@inline] add t axis = set ~axis ~to_:true tlet...
const uint32_t bit = index % NUM_BITS_IN_WORD; return bits[slot].fetch_or(static_cast<uint32_t>(cond) << bit, cpp::MemoryOrder::RELAXED) & (1u << bit); } /// Conditionally clear the n-th bit in the atomic bitfield. LIBC_INLINE static constexpr uint32_t clear_nth(cpp::At...