ecs/sized-tag
src/ecs/sized-tag.tur
SizedTag: phantom-indexed bitset tag storage.
Since: E2c -- see docs/upcoming/ecs-sized-world-plan.md.
defopaque
SizedTag
(SizedTag [n] :int))
defn
sized-tag-new
(sized-tag-new [n])
allocate a (SizedTag n) covering `k` bits.
Since: E2c
defn
sized-tag-cap
(sized-tag-cap [n])
physical capacity in bits (rounded up to word).
Since: E2c
defn
sized-tag-set!
(sized-tag-set! [n])
mark slot idx as tagged. Aborts on out-of-range.
Since: E2c
defn
sized-tag-clear!
(sized-tag-clear! [n])
mark slot idx as untagged. No-op out-of-range.
Since: E2c
defn
sized-tag-has?
(sized-tag-has? [n])
is slot idx tagged?
Since: E2c
defn
sized-tag-count
(sized-tag-count [n])
popcount across the bitset.
Since: E2c
defn
sized-tag-free
(sized-tag-free [n])
release the backing words.
Since: E2c
defn
sized-tag-zip-cap
(sized-tag-zip-cap [n])
cross-parameter unification probe.
Since: E2c
Internal definitions
__sized-tag-new-raw__sized-tag-cap-raw__sized-tag-set!-raw__sized-tag-clear!-raw__sized-tag-has?-raw__sized-tag-count-raw__sized-tag-free-raw