Module Backend_intf.Constant_key

The key of a device's constant cache (gh-ocannl-1654). A node every routine of a compile only reads, and that is not context_owned, lives in a constant pool that outlives the context that allocated it, until the last release unit binding it is released (field-device.constant_owners). A host-initialized literal (Host_inits) is Shared: one buffer per device, uploaded once, which every root on the device binds while any of them holds it. Any other such node -- a data input, a zero-valid accumulator -- is Rooted under the field-context.constant_root of the independently created context that allocated it, so compile siblings and descendants of one root share it while another root gets a buffer of its own: a write in one root can never change what another root reads.

module T : sig ... end
include module type of struct include T end
type t = T.t =
  1. | Shared of Tnode.t
  2. | Rooted of Base.int * Tnode.t
val compare : t -> t -> Base.int
val sexp_of_t : t -> Sexplib0.Sexp.t
val hash_fold_t : Ppx_hash_lib.Std.Hash.state -> t -> Ppx_hash_lib.Std.Hash.state
val hash : t -> Ppx_hash_lib.Std.Hash.hash_value
include sig ... end
type comparator_witness = Base__Comparator.Make(T).comparator_witness
val comparator : (T.t, comparator_witness) Base__Comparator.comparator