Liking cljdoc? Tell your friends :D

vaelii.impl.types.dense-roots

The columnar index's key-interning root backend, as a held namespace (vaelii.impl.types.prover states what that means). DenseRoots mutates its own fields, which only its inline methods can do, so the type and the code it calls live here together; it calls only held namespaces. Building one, and the snapshot sections it is written into, are vaelii.impl.dense-roots.

The columnar index's key-interning root backend, as a held namespace
(`vaelii.impl.types.prover` states what that means).  `DenseRoots` mutates its own
fields, which only its inline methods can do, so the type and the code it calls live
here together; it calls only held namespaces.  Building one, and the snapshot sections
it is written into, are `vaelii.impl.dense-roots`.
raw docstring

PMappedRootscljprotocol

install-mapped!clj

(install-mapped! b keys offsets handles n)

Install mapped columns (a LongBuffer and two IntBuffers over a snapshot), replacing whatever the routed families held.

Install mapped columns (a `LongBuffer` and two `IntBuffer`s over a snapshot), replacing
whatever the routed families held.

mapped?clj

(mapped? b)

Are the routed families reading out of an mmap'd snapshot? True exactly while nothing has been written since one was installed, since a write thaws.

Are the routed families reading out of an mmap'd snapshot?  True exactly while nothing
has been written since one was installed, since a write thaws.

sectionsclj

(sections b)

What this backend holds, by section — {:routed :keys :offsets :handles :argfam :fallback} — for a residency measurement (vaelii.bench.budget). The objects themselves, never a copy: snapshot-columns builds fresh heap arrays to write, and sizing those would size a temporary rather than what a running KB holds.

Which section carries the mass is the whole reading, so each says what it scales with:

  • :routed — the mutable map the routed families use before a snapshot is installed and after a write thaws one. Fact-scaled: every handle family is in here.
  • :keys / :offsets / :handles — the installed columns. The first two are vocabulary-scaled, :handles is the fact-scaled mass, and all three are buffers over the image, so they belong in a caller's mapped total rather than its heap one.
  • :argfam — the (pred, pos) scope dictionary the packed argument keys cite (argfam-id). Vocabulary-scaled, bounded by distinct predicates × their arities.
  • :fallback — the backend under everything the routed families do not claim: the term roster and the slot roster, whose members are names rather than handles (fallback-entries). Vocabulary-scaled, which is what lets a snapshot write it as one nippy blob.

The heap/mapped split is the caller's to make from the objects — a buffer says whether it is direct — so this reports the shape and judges nothing.

What this backend **holds**, by section — `{:routed :keys :offsets :handles :argfam
:fallback}` — for a residency measurement (`vaelii.bench.budget`).  The objects
themselves, never a copy: `snapshot-columns` builds fresh heap arrays to write, and
sizing those would size a temporary rather than what a running KB holds.

Which section carries the mass is the whole reading, so each says what it scales
with:

- `:routed` — the mutable map the routed families use before a snapshot is installed
  and after a write thaws one.  **Fact-scaled**: every handle family is in here.
- `:keys` / `:offsets` / `:handles` — the installed columns.  The first two are
  vocabulary-scaled, `:handles` is the fact-scaled mass, and all three are buffers
  over the image, so they belong in a caller's *mapped* total rather than its heap
  one.
- `:argfam` — the `(pred, pos)` scope dictionary the packed argument keys cite
  (`argfam-id`).  **Vocabulary-scaled**, bounded by distinct predicates × their
  arities.
- `:fallback` — the backend under everything the routed families do not claim: the
  term roster and the slot roster, whose members are names rather than handles
  (`fallback-entries`).  **Vocabulary-scaled**, which is what lets a snapshot write
  it as one nippy blob.

The heap/mapped split is the caller's to make from the objects — a buffer says
whether it is direct — so this reports the shape and judges nothing.

snapshot-columnsclj

(snapshot-columns b remap)

The routed families as {:keys :offsets :handles} heap arrays, keys sorted and their term ids taken through remap (an int[] from this dictionary's ids to the durable ones). The roster key holds no term, so it is passed through unmapped.

The routed families as `{:keys :offsets :handles}` heap arrays, keys sorted and their
term ids taken through `remap` (an `int[]` from this dictionary's ids to the durable
ones).  The roster key holds no term, so it is passed through unmapped.
source

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close